
springboot
写给自己的信纸
这个作者很懒,什么都没留下…
展开
-
springboot集成mybatis
springboot版本1.5.2 <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.11</version> </dependency> <dependency>原创 2020-05-17 13:48:13 · 190 阅读 · 0 评论 -
springboot+thymeleaf页面跳转
在templates下是动态页面,在static下是静态页面:在static下的html页面可以通过端口号直接访问,如上图的hello静态页面访问http://localhost:8086/hello.htmltemplates下的只能是controller后的地址跳转controlller有两种方式跳转到templates的页面 @GetMapping("/user/register") public ModelAndView register(Model model) {原创 2020-05-14 12:00:28 · 5569 阅读 · 1 评论 -
springboot自动实现配置原理
Spring Boot的启动类上有一个@SpringBootApplication注解,它里面有一个注解@EnableAutoConfiguration,它的作用是开启自动配置,找到META-INF/spring.factories配置文件中的所有自动配置类,这个spring.factories文件有个键值对,一个key为EnableAutoConfiguration类对多个value为xx...原创 2020-05-07 20:54:35 · 197 阅读 · 0 评论 -
整合thymeleaf、bootstrap
在pom.xml导入jar包 <dependency> <groupId>org.webjars</groupId> <artifactId>bootstrap</artifactId> <version>3.3.5</version> </dependency> <...原创 2020-04-25 15:46:52 · 288 阅读 · 0 评论 -
热更新
一、开启IDEA的自动编译(静态)具体步骤:打开顶部工具栏 File -> Settings -> Default Settings -> Build -> Compiler 然后勾选 Build project automatically 。二、开启IDEA的自动编译(动态)具体步骤:同时按住 Ctrl + Shift + Alt + / 然后进入Registry...转载 2020-04-25 15:43:51 · 159 阅读 · 0 评论 -
spring事务
一、spring支持的事务声明方式1. 编程式事务 当系统需要明确的,细粒度的控制各个事务的边界,应选择编程式事务。2. 声明式事务 当系统...转载 2020-04-17 12:52:40 · 188 阅读 · 0 评论 -
Thymeleaf
1. 作用:不需要 服务端的支持,就能够被以 html 的方式打开,方便前端人员独立设计与调试,jsp 就不行了, 不启动服务器 jsp 都没法运行出结果来。2.修改 pom.xml, 增加了对 thymeleaf 的支持。<dependency> <groupId>org.springframework.boot</groupId> <...原创 2020-06-05 15:51:26 · 316 阅读 · 0 评论