Loading

随笔分类 -  Spring Boot

摘要:整合Spring Security 整合方法 创建项目时选择security依赖或在pom中添加security依赖 建立SpringSecurityConfig类,继承WebSecurityConfigurerAdapter方法 在刚刚创建的类上添加@EnableWebSecurity注解 设置授 阅读全文
posted @ 2020-06-13 18:37 shimeath 阅读(123) 评论(0) 推荐(0)
摘要:整合MyBatis 注意点 在相应Mapper接口上通过@Mapper注解进行注入;或在程序入口添加@MapperScan(com.hxh.Mapper),这其中的所有接口都会被扫描 XXXXMapper.xml存放在resources/MyBatis/mapper目录下 整合方法 配置整合依赖 < 阅读全文
posted @ 2020-06-13 15:15 shimeath 阅读(109) 评论(0) 推荐(0)
摘要:整合Druid 整合Druid方法 在Maven中配置Druid依赖 <!-- https://mvnrepository.com/artifact/com.alibaba/druid --> <dependency> <groupId>com.alibaba</groupId> <artifact 阅读全文
posted @ 2020-06-13 11:34 shimeath 阅读(98) 评论(0) 推荐(0)
摘要:整合jdbc 整合方法 创建项目,选择相关依赖:Spring Web、JDBC API、MySQL Driver 在yaml中配置相关参数 spring: datasource: username: root password: 123456 url: jdbc:mysql://localhost: 阅读全文
posted @ 2020-06-12 20:32 shimeath 阅读(98) 评论(0) 推荐(0)
摘要:Spring Boot 入门 原理初探 主程序 @SpringBootApplication public class SpringBoot01Application { public static void main(String[] args) { SpringApplication.run(S 阅读全文
posted @ 2020-06-11 20:29 shimeath 阅读(121) 评论(0) 推荐(0)