I have the application.properties, which is located in the resources
apllication.properties
hsm.provider=software hsm.name=TestHsm h
I had the same issue before and @Value was not working for controller but working for component classes so i had used below solution.
You can @Autowire Environment environment and then environment.getProperty("hsm.provider").
@Autowire Environment environment
environment.getProperty("hsm.provider")
Note: This is just a workaround solution.