今天我安装了 IntelliJ Ultimate 版本 2016.1.1 build 145.597。我后来做的是从 IntelliJ 社区版导入 May 项目。本项目基于 spring-boot 1.3.3。问题是,当我想在 IntelliJ Ultimate 中以某种方式运行我的应用程序时 application.properties 文件被忽略,它以默认的 spring 设置开始。当我在 IntelliJ 社区版或从命令行运行相同的项目时,一切正常。问题仅存在于 Ultimate 版中,当我添加和运行 spring boot run 配置时,如果我使用 gradle 配置和 bootRun 任务,它就可以工作。
IntelliJ Ultimate 之前我没用过。
有谁知道可能有什么问题?我浪费了 2 个小时的谷歌搜索来解决我的问题,但我什么也没找到。
的内容src/main/resources/application.properties :
server.port=2081
server.ssl.key-store=cfg/certs/keystore.p12
server.ssl.key-store-password=dev
server.ssl.key-alias=alias
server.ssl.key-store-type=PKCS12
spring.datasource.url=jdbc:h2:file:./cfg/db/app;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=none
项目结构 :
最佳答案
我对 IntelliJ Ultimate 2016.1.1 有同样的问题
重新导入项目并删除现有项目对我有用。
我相信这个问题与 1.1 版本有关。 IntelliJ IDEA 2016.1.4 没有问题
关于intellij-idea - IntelliJ Ultimate 忽略 spring boot application.properties,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36847452/