Java ship密钥库及其应用程序
我正在制作一个应用程序,它使用Java ship密钥库及其应用程序,java,keystore,Java,Keystore,我正在制作一个应用程序,它使用Logback和SSL登录到我的日志服务器,但是在每个需要对服务器进行日志访问的内部服务器上排序keystore会带来极大的不便 logback允许您以以下方式指定密钥存储: <appender name="name" <!-- Enable SSL and use a different truststore --> <ssl> <trustStore>
Logback
和SSL
登录到我的日志服务器,但是在每个需要对服务器进行日志访问的内部服务器上排序keystore
会带来极大的不便
logback允许您以以下方式指定密钥存储:
<appender name="name"
<!-- Enable SSL and use a different truststore -->
<ssl>
<trustStore>
<location>classpath:server.truststore</location>
<password>${server.truststore.password}</password>
</trustStore>
</ssl>
</appender>
classpath:server.truststore
听起来该文件已经作为类路径资源进行了查找,并且您的应用程序的JAR或WAR或任何东西已经在类路径上。您是否已尝试将该文件放在应用程序的根包目录中?classpath:server.truststore
听起来好像该文件已被查找为类路径资源,并且您的应用程序的JAR或WAR或任何已在类路径上的内容。您是否尝试过将文件放在应用程序的根包目录中?
<appender name="name"
<!-- Enable SSL and use a different truststore -->
<ssl>
<trustStore>
<location>project-root/some/path</location>
<password>${server.truststore.password}</password>
</trustStore>
</ssl>
</appender>