Springboot
文章平均质量分 79
Ada5899
这个作者很懒,什么都没留下…
展开
-
Springboot与Interceptor(HandlerInterceptorAdapter)
Springboot与Interceptor 絮絮叨叨: 最近在看一个项目,在登录的时候,作者用了Spring的Interceptor和WebConfig实现了对用户登录的拦截。主要涉及到两个类:HandlerInterceptorAdapter 类和 WebMvcConfigurerAdapter 类(已经过时,Spring5 已经将其摒弃)现用实现WebMvcConfigurer 接口实现。 ...原创 2020-05-08 15:59:14 · 1677 阅读 · 0 评论 -
Springboot整合Mybatis(xml)
springboot整合Mybatis1. 引进mybatis依赖2. 新建数据库springboot,并创建表user。3. 配置application.yml文件4. 创建项目结构(controller、domain、mapper)5. 在resources中新建mapper文件夹,并新建UserMapper.xml文件6. 测试 1. 引进mybatis依赖 <!...原创 2020-04-15 22:35:36 · 150 阅读 · 0 评论 -
springboot学习之使用SpringData JPA报错 java.sql.SQLSyntaxErrorException: Table 'demojpa.hibernate_sequence'
springboot学习之使用SpringData JPA 报错 java.sql.SQLSyntaxErrorException: Table ‘demojpa.hibernate_sequence’ 原因: 在数据库表中设置了主键id自动增长,在实体中没有设置主键自动增长 解决办法: 在实体主键Id属性值中添加 @GeneratedValue(strategy = GenerationType...原创 2020-03-31 16:11:13 · 444 阅读 · 0 评论