随笔分类 -  SpringBoot

mysql中查询表自身属性的语句
摘要:mysql语句 此处查询了 表名、引擎、表注释、表创建时间 select table_name tableName, engine, table_comment tableComment, create_time createTime from information_schema.tables w 阅读全文
posted @ 2021-10-28 11:03 汤姆猫8 阅读(142) 评论(0) 推荐(0)
xml中关于批量删除的sql语句
摘要:XML: <delete id="deleteBatch"> delete from sys_role_menu where role_id in <foreach item="roleId" collection="array" open="(" separator="," close=")"> 阅读全文
posted @ 2021-10-26 17:07 汤姆猫8 阅读(1455) 评论(0) 推荐(0)
Spring mail 邮件发送
摘要:1.pom引入依赖包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> 2.配置文件配置 #发件人邮箱服务器 阅读全文
posted @ 2021-09-30 11:11 汤姆猫8 阅读(581) 评论(0) 推荐(0)
IDEA如何将本地jar包,添加到maven仓库
摘要:-- Intellj idea如何将本地的jar包,添加到本地meavn库mvn install:install-file -Dfile=D:\soft\esdk-obs-java-3.19.7.jar -DgroupId=com.huawei.storage groupId -DartifactI 阅读全文
posted @ 2021-09-22 15:25 汤姆猫8 阅读(1290) 评论(0) 推荐(0)
属性sec:authorize、sec:authentication
摘要:使用案例: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-ext 阅读全文
posted @ 2021-07-16 13:51 汤姆猫8 阅读(2920) 评论(0) 推荐(0)
Spring scheduler定时任务
摘要:1-Spring 中的定时任务 2.特定位置中添加上注解开启任务 @EnableScheduling //可以在启动类上注解也可以在当前文件 3.在需要定时执行任务的方法前加上注解 @Scheduled(cron = "0 * * * * *") //每隔一分钟执行一次 @Scheduled(fix 阅读全文
posted @ 2021-07-07 11:03 汤姆猫8 阅读(438) 评论(0) 推荐(0)
Spring security+Thymeleaf遇见的post请求403错误。
摘要:1.首先:403错误,表示资源不可用。服务器理解客户的请求,但拒绝处理它,通常由于服务器上文件或目录的权限设置导致的WEB访问错误。 2.遇见这个问题,首先我想到的是security中拦截器是否能设置post请求的释放,所以我去尝试了一下。 发现了方法中有个参数设置Http请求的, ——然后我设置后 阅读全文
posted @ 2021-07-06 12:06 汤姆猫8 阅读(879) 评论(1) 推荐(0)
List、ArrayList放置元素错误
摘要:java.lang.IndexOutOfBoundsException: Index: 2, Size: 0。 阅读全文
posted @ 2021-07-02 13:28 汤姆猫8 阅读(47) 评论(0) 推荐(0)
Invalid bound statement (not found): com.example.demo.mapper.B18040208Mapper.search
摘要:这种报错,启动的时候一般不会报错,在你调用到对应的服务的时候,找不到对应的mapper文件时,报错。 有一种原因是xxxMapper.xml文件编写有问题,这个原因这里不做讨论 第二种:对mapper.xml文件未加扫描 启动springboot对象上添加:@MapperScan("com.exam 阅读全文
posted @ 2021-06-25 23:45 汤姆猫8 阅读(2118) 评论(0) 推荐(0)
Spring Boot——Security(安全管理)
摘要:重要前提说明:Spring Boot项目中引入了Spring Security框架后,自动开启了CSRF防护功能(跨站请求伪造防护——get),所以要实现一些特定功能需要使用post请求。 WebSecurityConfigurerAdapter类中有 configure方法进行身份验证,实现安全控 阅读全文
posted @ 2021-06-22 15:47 汤姆猫8 阅读(759) 评论(0) 推荐(0)