摘要:参考文章: https://blog.csdn.net/leeta521/article/details/119532691 SpringBoot通过实现HandlerInterceptor接口实现拦截器,通过实现WebMvcConfigurer接口实现一个配置类,在配置类中注入拦截器,最后再通过@
阅读全文
摘要:jta+atomikos的分布式事务 <!--jta+atomikos分布式事务--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jta-atomikos</arti
阅读全文
摘要:1.application.properties中配置多数据源 #refund数据源#此种标黄的没办法自己进行解析,代码读取spring.datasource.refunddb.url=jdbc:mysql://refund地址spring.datasource.refunddb.username=
阅读全文
摘要:热部署是指当我们修改代码后,服务能自动重启加载新修改的内容,这样大大提高了我们开发的效率; Spring boot热部署通过添加一个插件实现; 插件为:spring-boot-devtools,在Maven中配置如下: <!-- springboot 开发自动热部署 --> <dependency>
阅读全文
摘要:1.pom.xml中添加mybatis依赖 2.application.properties中添加数据源配置 3.反向生成dao的代码 1. <!-- mybatis-spring-boot-starter --><dependency> <groupId>org.mybatis.spring.bo
阅读全文
摘要:1、在pom.xml文件中配置依赖项 <!--前端页面使用JSP--><!--引入Spring Boot内嵌的Tomcat对JSP的解析包--><dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-emb
阅读全文
摘要:1.maven 3.+以上版本 2.jdk 1.8以上要求-springboot2以上的版本 3.创建项目的步骤
阅读全文
摘要:参考博客: https://blog.csdn.net/qq_35387940/article/details/125777457 1.准备好数据库和表 mysql在windows环境下安装参考: https://blog.csdn.net/weixin_43423484/article/detai
阅读全文