-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Failed to bind properties under 'rsa.public-key' to java.security.interfaces.RSAPublicKey #13771
Copy link
Copy link
Closed
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comin: coreAn issue in spring-security-coreAn issue in spring-security-core
Description
Describe the bug
I am getting the following error when I build my Spring Boot application:
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-09-02T12:34:26.525+05:30 ERROR 1128677 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'rsa.public-key' to java.security.interfaces.RSAPublicKey:
Property: rsa.public-key
Value: "classpath:public.pem"
Origin: class path resource [application.properties] - 1:17
Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.security.interfaces.RSAPublicKey]
Action:
Update your application's configuration
Versions
- Java: 17.0.7
- Spring Boot: 3.1.3
- Spring: 6.0.11
To Reproduce
- Clone the repository: https://github.com/ContractSPAN/ConverterIssue
- Execute
mvn clean install
Expected behavior
As mentioned in the description of ResourceKeyConverterAdapter , "By default, keys can be read from the file system, the classpath, and from HTTP endpoints.". However, it can be observed that no converter is found.
Sample
GitHub repository to reproduce issue: https://github.com/ContractSPAN/ConverterIssue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comin: coreAn issue in spring-security-coreAn issue in spring-security-core