
springboot
文章平均质量分 50
万山寒
这个作者很懒,什么都没留下…
展开
-
springboot使用本地Jar包
springboot使用本地Jar包原创 2023-01-28 15:22:42 · 2642 阅读 · 0 评论 -
Failed to parse multipart servlet request; nested exception is java.io.IOException
Failed to parse multipart servlet request; nested exception is java.io.IOException原创 2023-01-03 10:27:44 · 750 阅读 · 0 评论 -
maven打包找不到程序包错误或找不到符号,但idea编译、运行都正常
maven打包找不到程序包错误或找不到符号,但idea编译、运行都正常原创 2022-10-10 17:20:16 · 2781 阅读 · 0 评论 -
springboot开启事务
springboot开启事务手动事务TransactionTemplate编程式事务原创 2022-09-06 11:28:00 · 9352 阅读 · 0 评论 -
spring事务传播机制
事务传播(PROPAGATION)机制:required :支持当前事务,请求事务,没有就新建一个supports: 支持当前事务,有木有都可以,有就支持当前事务mandatory: 支持当前事务,强制要求有事务,否则抛异常require_new : 不支持当前事务,会将当前事务挂起,新建一个事务,not_suppoert:不支持当前事务,在无事务状态下运行。never:不支持当前事务,有就抛异常nested: 如果当前事务存在,则执行的代码作为子事务嵌套在当前事务原创 2022-03-14 13:55:04 · 565 阅读 · 0 评论 -
springboot的外部配置文件
springboot配置文件生效优先级原创 2022-07-12 10:22:49 · 2593 阅读 · 0 评论 -
jdbcTemplate的使用,RowMapper实现类:BeanPropertyRowMapper和SingleColumnRowMapper
RowMapper匿名类使用这里直接一个个设置返回实体类的属性 public Student getStudentByName(String name) { String sql = "select id,name from student where name = ?"; Student student = this.jdbcTemplate.queryForObject(sql, new Object[]{name}, new RowMapper<Student原创 2022-03-18 14:48:29 · 6308 阅读 · 0 评论 -
springboot使用Scheduled定时任务
一、单线程使用Scheduled在启动类Application上加@EnableSchedulin注解,开启spring定时任务创建任务类,加@Component注解在方法上加@Scheduled()注解,有以下三种方式 // corn模式 @Scheduled(cron = "0 0 0 0/1 * ?") // fixedDelay:在上一次任务执行完成后几豪秒再执行, // initialDelay:应用启动后延迟几豪秒执行该任务 @Scheduled(initialDela原创 2021-09-22 17:09:59 · 791 阅读 · 0 评论