上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页

2022年2月15日

SpringBoot - 实现定时任务

摘要: 1.在启动类,加入@EnableScheduling 注解 @SpringBootApplication @EnableScheduling public class SpringbootScheduleApplication { public static void main(String[] a 阅读全文

posted @ 2022-02-15 09:29 每天积极向上 阅读(42) 评论(0) 推荐(0) 编辑

SpringBoot - 实现异步

摘要: 1.在启动类,加入@EnableAsync 注解 @SpringBootApplication @EnableAsync public class AsyncLearnApplication { public static void main(String[] args) { SpringAppli 阅读全文

posted @ 2022-02-15 09:19 每天积极向上 阅读(388) 评论(0) 推荐(0) 编辑

2022年2月12日

SpringBoot - Mybatis分页插件PageHelper的使用

摘要: 1.导入分页插件启动器 <!-- pagehelper 分页查询插件--> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <v 阅读全文

posted @ 2022-02-12 13:17 每天积极向上 阅读(52) 评论(0) 推荐(0) 编辑

2022年2月11日

springBoot - @Validated统一异常处理

摘要: @ControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(BindException.class) public String exception(BindException ex){ //获取异常自定义信息 阅读全文

posted @ 2022-02-11 16:27 每天积极向上 阅读(563) 评论(0) 推荐(0) 编辑

springBoot - 开启mybatis驼峰命名规则

摘要: mybatis: configuration: map-underscore-to-camel-case: true SpringBoot 中开启 驼峰命名 就可以 Mybatis 的mapper中返回结果用 resultType (这个的不一样(数据库 user_name) 实体类(userNam 阅读全文

posted @ 2022-02-11 13:43 每天积极向上 阅读(239) 评论(0) 推荐(0) 编辑

2022年2月9日

SpringBoot - Start

摘要: 常用的starter: spring-boot-starter-activemq spring-boot-starter-aop spring-boot-starter-data-redis spring-boot-starter-freemarker spring-boot-starter-thy 阅读全文

posted @ 2022-02-09 16:59 每天积极向上 阅读(109) 评论(0) 推荐(0) 编辑

SpringBoot - 实现声明式事务

摘要: 低版本在启动类(@SpringBootApplication)上加上@EnableTransactionManagement注解 @EnableTransactionManagement注解其实在大多数情况下,不是必须的,因为SpringBoot在 TransactionAutoConfigurat 阅读全文

posted @ 2022-02-09 16:49 每天积极向上 阅读(191) 评论(0) 推荐(0) 编辑

SpringBoot - 实现AOP

摘要: SpringBoot帮我们自动装配了AOP所以我们直接用就行了 @Component @Aspect/*生成代理对象*/ @Order(0) public class LogProxy { @Pointcut(value="execution(* com.levi..*.*(..))") publi 阅读全文

posted @ 2022-02-09 16:38 每天积极向上 阅读(229) 评论(0) 推荐(0) 编辑

Spring boot默认配置文件加载路径

摘要: classpath:表示资源文件加resources,/:表示项目根目录 加载顺序(优先级高的会覆盖优先级低的配置): /config > / > classpath/config > classpath/ 阅读全文

posted @ 2022-02-09 14:52 每天积极向上 阅读(117) 评论(0) 推荐(0) 编辑

2022年1月20日

事务的特性与隔离级别

摘要: 事务的四大特性:原子性:事务中的操作要么都成功,要么都失败 一致性:事务必须使数据库从一个一致性状态转换到另外一个一致性状态 隔离性:多个用户并发访问数据库时,数据库为每一个用户创建的事务不能被其它事务的操作数据影响,事务之间互相隔离 持久性:事务一旦提交,对数据库中的数据是永久改变的,即使接下来发 阅读全文

posted @ 2022-01-20 14:36 每天积极向上 阅读(40) 评论(0) 推荐(0) 编辑

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页

导航