File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 <artifactId>druid-spring-boot-starter</artifactId>
2323 <version>1.1.21</version>
2424 </dependency>
25- [2]在application.yml中配置Druid数据源:(Spring Boot的数据源配置的默认类型是org.apache.tomcat.jdbc.pool.Datasource)
25+ [2]在application.yml中配置Druid数据源:
26+ (Spring Boot的数据源配置的默认类型是org.apache.tomcat.jdbc.pool.Datasource)
2627 server:
2728 servlet:
2829 context-path: /web
8586 filter:
8687 stat:
8788 log-slow-sql: true
88- (上述配置配置了Druid作为连接池,还开启了Druid的监控功能;其他配置可参考官方wiki——https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter)
89+ (上述配置配置了Druid作为连接池,还开启了Druid的监控功能;其他配置可参考
90+ 官方wiki——https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter)
8991 [3]运行项目,Druid监控后台:http://localhost:8080/web/druid
90923.使用JdbcTemplate:
9193 [1]创建数据库表及插入数据(mysql5.5)
243245 "sex": "M"
244246 }
245247 测试删除数据: http://localhost:8080/web/deletestudent/004
246- ```
248+ ```
You can’t perform that action at this time.
0 commit comments