![](https://img-blog.csdnimg.cn/0ddd07bf9d0847c58a4fec51bab7e3c8.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
SpringBoot
文章平均质量分 86
springboot学习
Q渡劫
不会写还不滚去看官方文档
展开
-
spring执行异步任务
spring执行异步任务。原创 2022-07-16 22:40:54 · 1827 阅读 · 0 评论 -
Swagger
swagger学习原创 2022-07-13 22:43:12 · 614 阅读 · 0 评论 -
Shiro
springboot集成shiro原创 2022-07-03 22:35:22 · 169 阅读 · 0 评论 -
SpringSecurity
此时在浏览器输入http://localhost:8001,会跳转到登录页面:默认用户名为user,密码就是控制台打印的。以上信息说明SpringSecurity生效了!正确输入上面的用户和密码即可登陆将进入首页!原创 2022-07-01 00:22:28 · 347 阅读 · 0 评论 -
thymeleaf中抽取公共片段
将dashbord.html和emps下的list.html重复的导航栏和侧边栏代码删掉,抽取到common下的common.html文件中使用th:fragment="topnav"为公共片段命名(导航栏)th:fragment=“side”(侧边栏)在dashbord.html中使用引入头部导航栏;使用引入侧边栏同样在emps下的list.html中执行同样的操作!最好和dashbord.html中使用一样的方法引入头部导航栏和侧边栏即可做到代码重用,类似于vue中的组件!但是上面都使用原创 2022-06-03 22:47:19 · 1928 阅读 · 0 评论 -
定制拦截器
其中 method="post"必须写,否则即使后端使用@PostMapping依然会出现请求方式错误的提醒,因为前端没有写 method=“post”在WebConfig implements WebMvcConfigurer下重写WebMvcConfigurer中的addViewControllers方法,达到控制视图跳转的目的(2)提供服务代码(3)、编写LoginHandlerInterceptor implements HandlerInterceptor文件(4)、在WebConfig原创 2022-06-02 22:50:51 · 108 阅读 · 0 评论 -
mybatis操作数据库
1.引入第三方工具mybatis的场景启动器y如果有错误可以根据Ide提示修改2.在resources下建立mybatis文件写入mybatis-config.xml全局配置文件<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/myba.原创 2021-10-14 18:37:50 · 927 阅读 · 0 评论 -
springboot分页操作
1、后端首先在bean目录下添加组件//分页插件@Configurationpublic class myBatisConfig { @Bean public MybatisPlusInterceptor paginationInterceptor(){ MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor(); PaginationInnerIntercep原创 2021-10-27 23:38:28 · 1239 阅读 · 0 评论 -
前后端数据操作
1.前端代码如下<td> <a th:href="@{/user/delete/{id}(id=${user.id})}" class="btn btn-danger btn-sm" type="button">删除</a></td>当然如果还要停留在删除页,可以携带请求参数(参数为当前页)<td> <a th:href="@{/user/delete/{id}(id=${user.id},p=${uesrs.curre原创 2021-10-28 16:21:47 · 872 阅读 · 0 评论 -
国际化配置
1、编写国际化资源文件在 src/main/resources 下创建一个 i18n 的目录,并在该目录中按照国际化资源文件命名格式分别创建以下三个文件,login.properties:无语言设置时生效login_en_US.properties :英语时生效login_zh_CN.properties:中文时生效以上国际化资源文件创建完成后,IDEA 会自动识别它们,并转换成如下的模式:然后就可以使用Resource Bundle进行可视化配置,如果没有这个插件,下载Resource Bu原创 2022-05-28 22:43:54 · 1210 阅读 · 0 评论