Note 1
🎈分页查询代码中的 Page
爆红
此 Page
来源于 org.springframework.data.domain.Page
因此需要在 pom.xml
加 dependency
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<version> 会自动跟着 spring-boot-starter-parents 的 version 走
引入任何其他 spring-boot-data 相关的包 这个 spring-data-commons
都会跟着引进来。
比如
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
Note 2
会报错
No bean of type ‘dao.PmsAttrDao’ available: expected 1 bean as autowire candidate
解决方式是 interface XxxDao{} 头上加 @Mapper
. 详见
No bean of type ‘xxDao’ available