package com.springboot.pojo;
@Configuration
@ConfigurationProperties(prefix="com.springboot.opensource")
@PropertySource(value="classpath:resource.properties")
@Configuration
@ConfigurationProperties(prefix="com.springboot.opensource")
@PropertySource(value="classpath:resource.properties")
2018-04-14
resource.properties 文件内容:
com.springboot.opensource.name=springboot
com.springboot.opensource.website=www.springboot.com
com.springboot.opensource.language=java
com.springboot.opensource.name=springboot
com.springboot.opensource.website=www.springboot.com
com.springboot.opensource.language=java
2018-04-14
报错:Failed to parse configuration class [com.springboot.SpringbooteApplication]; nested exception is java.io.FileNotFoundException: class path resource [resource.properties] cannot be opened because it does not exist
2018-04-14
最新回答 / 叶0528
二、spring-boot-devtools 在pom中直接引入依赖
& &dependency> &k.bgroupId&groorg.springframework.boot&fac/groupId&rin &;/aartifactId&t; spring-boot-devtools>/artifactId&ion &ncyoptiona...
2018-04-14
最赞回答 / 小西瓜籽
当我们修改了java类后,IDEA默认是不自动编译的,而spring-boot-devtools又是监测classpath下的文件发生变化才会重启应用,所以需要设置IDEA的自动编译:(1)File-Settings-Compiler-Build Project automatically(2)ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running
2018-04-12
最新回答 / Tkilous
依赖看下是否正确