jasypt-spring-boot
jasypt-spring-boot copied to clipboard
Windows and Linux compatibility issues
I find Windows and Linux compatibility issue.
Repositorie:https://github.com/herosql/spring-jasypt-demo
I pull my own code and package it under Linux system
mvn package
Running the project
cd target
java -jar demo-0.0.1-SNAPSHOT.jar
Using commands for testing
curl http://localhost:8080/demo/get
Test passed
Send demo-0.0.1-SNAPSHOT.jar to Windows
Running
java -jar demo-0.0.1-SNAPSHOT.jar
error info:
ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoController': Injection of autowired dependencies failed; nested exception is com.ulisesbocchio.jasyptspringboot.exception.DecryptionException: Unable to decrypt property: ENC(pBkhjhBscoFceXlO18XUkz+GoGkbjTz0K9JconRTnWbo3UM5sjvAZo2gMAPYdU5+) resolved to: ENC(pBkhjhBscoFceXlO18XUkz+GoGkbjTz0K9JconRTnWbo3UM5sjvAZo2gMAPYdU5+). Decryption of Properties failed, make sure encryption/decryption passwords match
machine environment
windows
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) Client VM (build 25.144-b01, mixed mode, sharing)
Windows 10 Professional 64-bit
Linux
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
@ulisesbocchio
I also have the same problem. However, they are all Linux systems with different versions of JDK.
The problematic one is 1.8.0_ 152, there is no problem with 1.8.0_ 171