数据层解决方案----SQL

 

 

 starter

 

 

 

 

 

 

 

 

 

 

 

 这是一个map,一般不这样用

 

 

 再来一次就是重新查询,因为缓存只有50行,你查询的数据缓存里面没有,所以你要从数据库重新查询

 

 

 

<dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

 

 

 

 

 初始化后,重启,就可以不要刚才的初始化配置了

h2内嵌数据库不要加入任何约束 

 

 

 

 

 

 

 

 

  

 

 

猜你喜欢

转载自blog.csdn.net/weixin_59496235/article/details/126674581