我正尝试部署一个Spring Boot应用程序,以使用OpenShift读取数据库详细信息的加密密码。
这是我的application.yml
的样子
jpa:
hibernate:
ddl-auto: none
datasource:
username: admin
password: '{cipher}600547f6485119b897e2fbeaee2786addb7550d967f2841f1643ws9'
driver-class-name: org.postgresql.Driver ```
i'm getting this error
``` 19-06-20 15:08:58.683 WARN 1 --- [io-8888-exec-10] o.s.c.c.s.e.CipherEnvironmentEncryptor : Cannot decrypt key: spring.jpa.datasource.password (class java.lang.IllegalStateException: Unable to invoke Cipher due to bad padding)
2019-06-20 15:12:06.884 WARN 1 --- [nio-8888-exec-9] o.s.c.c.s.e.CipherEnvironmentEncryptor : Cannot decrypt key: spring.datasource.password (class java.lang.IllegalStateException: Unable to invoke Cipher due to bad padding)
2019-06-20 15:12:29.940 WARN 1 --- [io-8888-exec-10] o.s.c.c.s.e.CipherEnvironmentEncryptor : Cannot decrypt key: spring.jpa.datasource.password (class java.lang.IllegalStateException: Unable to invoke Cipher due to bad padding)
2019-06-20 15:12:55.770 WARN 1 --- [nio-8888-exec-7] o.s.c.c.s.e.CipherEnvironmentEncryptor : Cannot decrypt key: spring.datasource.password (class java.lang.IllegalStateException: Unable to invoke Cipher due to bad padding) ```
答案 0 :(得分:0)
请检查您是否在系统中配置了JCE,并验证bootstrap.yml文件中是否提供了加密密钥。