随笔分类 - springboot
摘要:main 方法上 加这个注解 @EnableAsync asyncservice @Service public class AsyncService { //告诉spring这是个异步任务@Async @Async public void hello(){ try { Thread.sleep(3
阅读全文
摘要:<!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter --><dependency> <groupId>org.mybatis.spring.boot</groupId>
阅读全文
摘要:package com.yao.config; import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.support.http.StatViewServlet; import org.springframewo
阅读全文
摘要:@RestController public class JDBCController { @Autowired JdbcTemplate jdbcTemplate; //查询数据库的所有信息 //没有实体类 数据库中有东西 用Map 获取 @GetMapping("/userList") publ
阅读全文
摘要:引入Thymeleaf 怎么引入呢,对于springboot来说,什么事情不都是一个start的事情嘛,我们去在项目中引入一下。给大家三个网址: Thymeleaf 官网:https://www.thymeleaf.org/ Thymeleaf 在Github 的主页:https://github.
阅读全文