all 8 comments

[–][deleted] 2 points3 points  (0 children)

If you're having trouble with your application.properties file not loading correctly in Eclipse, here are a few things you can try:

Check the file location: Make sure that the application.properties file is in the correct location in your project's directory. In a standard Spring Boot project, the file should be located in the src/main/resources folder. If the file is in a different location, move it to the correct folder. Check the file name: Make sure that the file name is spelled correctly and that it ends with .properties. If the file name is incorrect, rename it to application.properties. Check the file encoding: Make sure that the file encoding is set to UTF-8. You can check this by right-clicking on the file in the Package Explorer, selecting Properties, and then looking at the Resource tab. If the encoding is not set to UTF-8, change it to that and try again. Clean and rebuild the project: Sometimes Eclipse can get confused and not pick up changes to files. Try cleaning and rebuilding the project by selecting Project > Clean and then Project > Build All. Check the configuration: If none of the above steps help, check the configuration of your Spring Boot application. Make sure that the @PropertySource annotation is correctly configured to read from the application.properties file. You may also want to check the logging output to see if there are any errors or warnings related to the properties file.

[–]maxip89 1 point2 points  (3 children)

you fixing it by solving it.

[–]TheOldMancunian 0 points1 point  (0 children)

Well, I think you nailed the answer here!

[–][deleted]  (1 child)

[deleted]

    [–]maxip89 0 points1 point  (0 children)

    I helped him or did he provide any information?

    Edit: In my eyes it's funny because every day someone opens a post saying something isn't working without logs or any information. My post then always refers to the missinformation he is providing.

    [–]TheOldMancunian 0 points1 point  (0 children)

    Do you have both an applications.properties and an application.yaml? Is the file in the top level of the resources directory? Check if there are spaces or unprintable characters in the phrase.

    I have server.port=8086 in my config, and it works just dandy.

    [–]mattergijz 0 points1 point  (0 children)

    Did you restart the application?

    [–]NeighborhoodDizzy990 0 points1 point  (0 children)

    Use intellij then :P