Spring Boot 使用Repository 實(shí)現(xiàn)增刪改查
出現(xiàn)no property find found for type
原因一:引入兩個(gè)類似depencies
org.springframework.dataspring-data-mongodb
org.springframework.dataspring-data-jpa
解決:需要?jiǎng)h除spring-data-jpa雇毫,導(dǎo)致的沖突問題
原因二:*Repository中命名不規(guī)范
public interface *Repository extends MongoRepository<*, Long> {
//方法:滿足包含要求
}
刪除方法后,運(yùn)行正常。