1、SpringBoot网址:https://spring.io/projects/spring-boot
Spring Initializr. 在线生成初始化SpringBoot项目:https://start.spring.io/
2、Thymeleaf依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
Thymeleaf语法:https://www.cnblogs.com/jnba/p/10832878.html
Thymeleaf restful传参:<a href="@{/emp/{id}(id=${emp.id})}">Edit</a>
Thymeleaf自动404错误页:新增 src\main\resources\templates\error\404.html,出错后会自动找到这个错误页
loginout:

@RequestMapping("/loginout")
    public String loginout(HttpSession session) {
//        session.removeAttribute("userinfo");
        session.invalidate();
        return "redirect:/index";
}

3、SpringBoot连接mysql数据库:https://www.cnblogs.com/liangblog/p/5228548.html
4、SpringBoot配置Druid:https://www.cnblogs.com/yjq520/p/10779356.html,这个文档有个问题,就是参数写多了一个*,要写/druid/*
ServletRegistrationBean<StatViewServlet> bean=new ServletRegistrationBean<>(new StatViewServlet(),"/druid/*");
5、学习视频:https://www.bilibili.com/video/BV19K4y1L7MT?p=6
https://www.bilibili.com/video/BV1PE411i7CV?p=1

posted on 2021-08-11 10:41  邢帅杰  阅读(39)  评论(0编辑  收藏  举报