`
eimhee
  • 浏览: 2153016 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

通过spring来设置SSL的keystore和trust store

 
阅读更多

pass the keystore and trust store of the client and server as follows:

通过下面方法设置SSL的keystore和trust store, 注入环境变量

 

<bean id="trustStore" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}" />
<property name="targetMethod" value="putAll" />
<property name="arguments">
<props>
<prop key="javax.net.ssl.trustStore"><jks key location></prop>
<prop key="javax.net.ssl.keyStorePassword">password</prop>
</props>
</property>
</bean>
 
<bean id="keystore" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}" />
<property name="targetMethod" value="putAll" />
<property name="arguments">
<props>
<prop key="javax.net.ssl.keyStore"><jks key location></prop>
<prop key="javax.net.ssl.keyStorePassword">password</prop>
</props>
</property>
</bean>

 

1
0
分享到:
评论
1 楼 bewithme 2014-02-25  
何处可以用上它?

相关推荐

Global site tag (gtag.js) - Google Analytics