Spring boot ignores application.properties file in IntellijIdea

120 views Asked by At

After I cloned my spring-boot application from repository it fails to start with error:

"Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured."

My application.properties file:

server.port=1598
spring.datasource.url=jdbc:postgresql://localhost/Server
spring.datasource.username=admin
spring.datasource.password=admin

When I removed this file - nothing changes.

1

There are 1 answers

0
Simon Afanasyev On

Solution was to mark directory "resources" as Resources Root in Idea.enter image description here