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 文件內(nèi)容:
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
報(bào)錯(cuò):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...
最贊回答 / Haiyoung
進(jìn)不去這個(gè)類什么意思?你看一下你重寫的異常處理有沒有問題,或者檢查一下,你拋出的異常,這個(gè)異常處理能不能接的住
謝謝老師 這個(gè)課看了幾遍了 明白的不少 覺得說話快就多看幾遍就能明白了
2018-04-13
最贊回答 / 小西瓜籽
當(dāng)我們修改了java類后,IDEA默認(rèn)是不自動(dòng)編譯的,而spring-boot-devtools又是監(jiān)測classpath下的文件發(fā)生變化才會重啟應(yīng)用,所以需要設(shè)置IDEA的自動(dòng)編譯:(1)File-Settings-Compiler-Build Project automatically(2)ctrl + shift + alt + /,選擇Registry,勾上 Compiler autoMake allow when app running
2018-04-12
最新回答 / Tkilous
依賴看下是否正確