#Java Spring, application.properties not seen when compiling

1 messages · Page 1 of 1 (latest)

royal sigilBOT
#

<@&1004656351647117403> please have a look, thanks.

plush solar
#

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

plush solar
#

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

dim sinew
#

@arctic iron Can you please show your folder structure and how do you create the jar?

plush solar
#

I was thinking the same, but its literally in the jar 🤷‍♂️

#

mvn package should work

#

(or mvnw if you use the wrapper)

dim sinew
#

Yes, please try that first. From my experience doing it via IntelliJ often results in some error

plush solar
#

he does have that in the pom already

dim sinew
#

Ah, I missed that because gray on gray background ^^

#

But then why create a jar via IntelliJ instead of the maven task?

plush solar