ulisesbocchio / jasypt-spring-boot

Jasypt integration for Spring boot
MIT License
2.88k stars 514 forks source link

SpringBoot 2.4.0 Failed to bind properties under 'xxx' to java.lang.String: #248

Closed patpatpat123 closed 3 years ago

patpatpat123 commented 3 years ago

Hello Team,

Just upgraded my app from 2.3.5 to 2.4.0, no code change, no property change, just a version change.

When with version 2.4.0, I encounter

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'server.ssl.key-password' to java.lang.String:

    Reason: Failed to bind properties under 'server.ssl.key-password' to java.lang.String

Action:

Update your application's configuration

And other fields.

Confirmed if I revert back to 2.3.5, the same property

server.ssl.key-store-password=ENC(t7fMfRC+3bzia+9jqmAOk6XCpWvcqL1XsnPx56zRbGl4WZRKQ6ksYoy9irsJtDkZ)

Can be read without issue, while 2.4.0 will yield Failed to bind properties under 'server.ssl.key-password' to java.lang.String:

Is

<dependency>
            <groupId>com.github.ulisesbocchio</groupId>
            <artifactId>jasypt-spring-boot-starter</artifactId>
            <version>3.0.3</version>
        </dependency>

Not compatible with springboot 2.4.0 please?

Thank you

jerchende commented 3 years ago

I have no issues with Spring Boot 2.4.0 🤔

snicoll commented 3 years ago

@patpatpat123 the error message mentions server.ssl.key-password and your configuration property that you claim to be "the same property" is server.ssl.key-store-password. Can you please give it a try with 2.4.1 for a start as we've fixing bugs in this area based on feedback from the community.

I don't know about that jasypt spring boot starter but we can figure it out if you provide a minimal sample that reproduces the exception above. You can do so by attaching a zip to this issue or sharing a link to a GitHub repository.

EDIT: I've just realised this was reported against the starter. Regardless, I'll be watching this issue in case we can help.

patpatpat123 commented 3 years ago

Indeed, updated to 2.4.1 and things are back to normal.

Thanks!