記錄一次Springboot Data Jdbc的autoWorkController異常

轻寒發表於2024-05-14
Error creating bean with name 'autoWorkController': Unsatisfied dependency expressed through field 'jdbcRouteRepository': 
Error creating bean with name 'jdbcRouteRepository' defined in com.chint.infrastructure.repository.jdbc.JdbcRouteRepository
defined in @EnableJdbcRepositories declared on JdbcRepositoriesRegistrar.EnableJdbcRepositoriesConfiguration: Could not create
query for public abstract org.springframework.data.domain.Page com.chint.infrastructure.repository.jdbc.JdbcRouteRepository.
findAllByXXXX(java.lang.String,java.lang.String,org.springframework.data.domain.Pageable);
Reason: No property 'XXX' found on class com.chint.domain.aggregates.order.RouteOrder; Did you mean: XXX,XXX

以上異常是因為Springboot Data Jdbc注入時會檢查Repository中的find方法,即使方法未呼叫也會檢查,特此記錄

解決方法:

修改語句或者刪除即可

相關文章