2022年10月17日

Spring boot 打war包

摘要: 导出checkout 第1步:<packaging>war</packaging> 第2步:将内置的tomcat排除掉<exclusions>,再打包 第3步:继续类 第4步:添加finalName打包名称 第5步:maven clean 后再package 阅读全文

posted @ 2022-10-17 21:42 王飞侠 阅读(44) 评论(0) 推荐(0) 编辑

Spring boot 替换tomcat jetty undertow

摘要: jetty 阅读全文

posted @ 2022-10-17 21:38 王飞侠 阅读(29) 评论(0) 推荐(0) 编辑

Spring boot 嵌入式容器的运行参数配置 server properties调优、为Web Server配置Https

摘要: application.yml配置 https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties.server se 阅读全文

posted @ 2022-10-17 21:26 王飞侠 阅读(47) 评论(0) 推荐(0) 编辑

Spring boot 应用启动监听器接口、

摘要: 第一种 第二种 阅读全文

posted @ 2022-10-17 20:35 王飞侠 阅读(24) 评论(0) 推荐(0) 编辑

Spring boot 自定义事件的发布与监听

摘要: 满足以上2个条件的系统就可以使用自定义事件监听 创建事件 事件监听器 1.使用写代码的方式将监听器注册到Spring容器中。 2.Component推荐的注册监听器事件 3.通过application.yml中配置来注册监听器 4.推荐的注册监听器 最终:在任何地方来发布事件如下: 阅读全文

posted @ 2022-10-17 20:20 王飞侠 阅读(89) 评论(0) 推荐(0) 编辑

Spring boot Servlet规范监听器@WebListener 、过滤器、spring拦截器(分模块、分业务场景使用)

摘要: @ServletComponentScan扫描Servlet组件 @WebListener注册类的Servlet监听器 从数据库加载静态数据到ServletContext 二、过滤器 @WebFilter无法保证过滤器的执行顺序。如果非要按顺序,可以给过滤器的filterName按字母顺序来命名。 阅读全文

posted @ 2022-10-17 20:01 王飞侠 阅读(27) 评论(0) 推荐(0) 编辑

Spring boot JSP

摘要: 路径 静态资源图片读取 阅读全文

posted @ 2022-10-17 19:17 王飞侠 阅读(13) 评论(0) 推荐(0) 编辑

thymeleaf模板引擎,公共代码片段

摘要: Expression varia钩去掉 集成 配置 使用id javascript 和thymeleaf内联语法 阅读全文

posted @ 2022-10-17 17:42 王飞侠 阅读(22) 评论(0) 推荐(0) 编辑

webjars、JSP、FreeMarker

摘要: FreeMarker 学习链接 http://freemarker.foofun.cn/index.html Spring提供的静态资源存放目录 2、自定义静态资源目录 不建议 去除版本包 jsp页面 ES6\ES7\TypeScript 三、FreeMarker 生产阶段需要把cache设置为tr 阅读全文

posted @ 2022-10-17 14:37 王飞侠 阅读(16) 评论(0) 推荐(0) 编辑

Spring boot 、Spring Data REST、Swagger3

摘要: 整合swagger3 阅读全文

posted @ 2022-10-17 12:37 王飞侠 阅读(5) 评论(0) 推荐(0) 编辑

Spring boot Mybatis、Mybatis + Atomikos分布式事务、Spring事务、事务的传播行为

摘要: 复杂的sql语句,建议使用xml 简单的sql可以使用注解 开启驼峰映射 比较老的用法,不建议使用 第一种,扫描包的配置 第二种,使用@Mapper注解注入,每个接口都 得使用 二、Mybatis + Atomikos分布式事务 主primary 副secondary 统一事务管理器 三、Sprin 阅读全文

posted @ 2022-10-17 07:11 王飞侠 阅读(35) 评论(0) 推荐(0) 编辑

Spring Boot Mybatis plus中国人开发的,直接参考官方文档

摘要: 扫描路径 mybatis多条件查询 @Override public JsonResult getList(BaseQuery query) { if (query == null) { return JsonResult.error("参数错误!"); } if (StringUtils.isEm 阅读全文

posted @ 2022-10-17 07:03 王飞侠 阅读(62) 评论(0) 推荐(0) 编辑

导航