#Java Spring, application.properties not seen when compiling
1 messages · Page 1 of 1 (latest)
can you share some more context
Also these two arent directly related to loading application.properties:
2025-07-11T19:12:48.706+02:00 INFO 17000 --- [demo] [ restartedMain] com.example.demo.DemoApplication : The following 1 profile is active: "production"
17:15:03.265 [main] INFO com.example.demo.DemoApplication -- No active profile set, falling back to 1 default profile: "default"
also make sure that there is no config/application.properties or application.properties directly next to the jar file
these get prioritized
hm are you sure the application.properties got the actual content in the .jar
you just checked if its there
hm thats weird
but we are talking about Spring Boot right?
hm
your pom.xml
and using @SpringBootApplication on your main
yeah hm, then idk
maybe we are missing something small
someone else maybe knows about it
@arctic iron Can you please show your folder structure and how do you create the jar?
I was thinking the same, but its literally in the jar 🤷♂️
mvn package should work
(or mvnw if you use the wrapper)
Yes, please try that first. From my experience doing it via IntelliJ often results in some error
Or even better use the recommended way https://docs.spring.io/spring-boot/how-to/build.html#howto.build.create-an-executable-jar-with-maven
he does have that in the pom already
Ah, I missed that because gray on gray background ^^
But then why create a jar via IntelliJ instead of the maven task?
