Tomcat Not reading Spring-Boot Application Properties

前端 未结 4 1445
慢半拍i
慢半拍i 2020-12-05 18:02

I\'m fairly new to spring/java and have been checking out spring-boot for a project I have at work. I\'ve been following guides and finally have a (semi) working web app MVC

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 18:24

    I think for those who change default naming "application.[properties,yaml,etc]" to, for example, "service.[properties,yaml,etc]", can add this into the build.gradle task as:

    bootRun {
        systemProperties = [
           'spring.config.name':'service'
        ]
    }
    

提交回复
热议问题