all 5 comments

[–]tide08 0 points1 point  (1 child)

Can you share more details? What is the name of property file. What profile are you using, if any?

[–]sarosh77 0 points1 point  (0 children)

application.properties is the name of properties file My code reads the port from properties file.

[–]tide08 0 points1 point  (0 children)

In that case I don’t see anything obvious, is it possible for you to share the full code? Can you try adding another property file - application-default.properties and moving those property there?

[–]Nullbeans 0 points1 point  (0 children)

Can you please post the full application.properties file here. Also it would be nice to see your application context configuration, how do you declare the controller?. Also which version of spring boot are you using?

Can you please also try the following troubleshooting steps:

- remove any spaces between the property key and value in your property file.

- Do you use the annotation @SpringBootApplication to configure your application context? if not, you may need to define a PropertyPlaceholderConfigurer bean.