[英]Using jasypt-spring-boot when deploying to Apache Tomcat
I'm trying to use the jasypt-spring-boot and deploy it to a Tomcat server as war.我正在尝试使用jasypt-spring-boot并将其部署到 Tomcat 服务器作为战争。 How to pass the encryptor password, in this case, to ensure the encrypted values could be read?
在这种情况下,如何传递加密器密码以确保可以读取加密值? All the provided example are about running a
jar
file or a Spring Boot app as follows:所有提供的示例都是关于运行
jar
文件或 Spring 引导应用程序,如下所示:
java -Djasypt.encryptor.password={my-password-to-decrypt} -jar target/jasypt-spring-boot-demo-0.0.1-SNAPSHOT.jar
May be add some settings to catalina.properties
file in the Tomcat conf
folder as we do for example when defining active profile?可以像我们在定义活动配置文件时所做的那样,向 Tomcat
conf
文件夹中的catalina.properties
文件添加一些设置?
I figured out how to achieve that:我想出了如何实现这一目标:
setenv.sh
file in CATALINE_HOME/bin foldersetenv.sh
文件export JASYPT_ENCRYPTOR_PASSWORD=your-password
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.