已采納回答 / LmeetR
spring: ?profiles: ? ?active: dev ?datasource: ? ?driver-class-name: com.mysql.jdbc.Driver ? ?url: jdbc:mysql://127.0.0.1:3306/test ? ?username: root ? ?password: root ?jpa: ? ?hibernate: ? ? ?ddl-auto: create ? ?show-sql: true ? ?database-platform: org.h...
2018-03-08
最贊回答 / Dtic
轉載@未來_0004? 的回答自問自答,找到問題所在了,是由于jdk8的原因,有可能和spring boot的版本也關系,兩種方式可選?注冊,返回類是Optional<Girl>,?Optional是jdk8自帶的@GetMapping(value = "/girls/{id}")public Optional<Girl> girlFindOne(@PathVariable("id") Integer id) {? ?//直接用findById查找? ?//return ?girl...
2018-03-08
mvn install 的時候報Could not open ServletContext resource [/application.yml] 有人遇到這種情況嗎
2018-03-07
報錯 spring boot Configuration Annotation Proessor not found in classpath
pom.xml里添加
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
pom.xml里添加
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
2018-03-07
最新回答 / 精慕門1546425
高版本中,也可以使用下面的方法解決1.修改實體類
@Entity @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) public?class?Girl?{ … … … }2.GirlController中使用getOne方法替代findOne...
2018-03-07