Where is the application.properties file in a Spring Boot project?

后端 未结 4 858
攒了一身酷
攒了一身酷 2020-12-15 02:19

I started a new Spring boot project, I want to change the port number and I read that I have to modify the /resource/application.properties to do so.

I

4条回答
  •  庸人自扰
    2020-12-15 02:56

    You will need to add the application.properties file in your classpath.

    If you are using Maven or Gradle, you can just put the file under src/main/resources.
    If you are not using Maven or any other build tools, put that under your src folder and you should be fine.

    Then you can just add an entry server.port = xxxx in the properties file.

提交回复
热议问题