Spring boot 整合mybtais和druid
来源:互联网 发布:百度云 知乎 编辑:程序博客网 时间:2024/05/20 06:31
一. 整合druid
druid官方指南
pom.xml配置
<dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId></dependency><dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId></dependency>
yml配置
spring: datasource: # 使用druid数据源 druid: url: jdbc:mysql://url/database?useUnicode=true&characterEncoding=utf-8 username: xx password: 123456 driver-class-name: com.mysql.jdbc.Driver filters: stat maxActive: 300 initialSize: 5 maxWait: 60000 minIdle: 5 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true maxOpenPreparedStatements: 20 WebStatFilter: enabled: true #是否启用StatFilter默认值true urlPattern: /* exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' StatViewServlet: enabled: true # 是否启用StatViewServlet默认值true urlPattern: /druid/* #Spring监控AOP切入点,如x.y.z.service.*,配置多个英文逗号分隔 aop-patterns:
二. 整合mybatis
官方指南
pom.xml配置
<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId></dependency>
yml配置
mybatis: config-location: classpath:mybatis-config.xml mapper-locations: classpath*:mapper/**/*.xml
阅读全文
0 0
- Spring boot 整合mybtais和druid
- Spring Boot整合MyBatis和Druid
- spring-mybtais整合
- spring boot整合druid以及druid监控
- Spring boot 整合 mybatis + druid
- spring-boot整合druid配置
- spring boot 1.4 整合 mybatis druid
- spring boot 整合 druid + Mysql + Mybatis
- 基于注解的spring boot整合Druid
- spring boot + jta + druid整合demo
- Spring Boot 使用 Druid 和监控配置
- Spring Boot使用Druid和监控配置
- Spring Boot 使用 Druid 和监控配置
- Spring Boot 使用 Druid 和监控配置
- Spring Boot 使用 Druid 和监控配置
- Spring Boot 使用 Druid 和监控配置
- Spring Boot 使用 Druid 和监控配置
- Spring Boot 使用 Druid 和监控配置
- 进程、线程间通信方式
- openlayers3 聚合分析专题图 cluster
- Android中点击图片放大的简单方法
- CodeForces 4 A.Watermelon(水~)
- Go语言学习笔记 --- 入门介绍
- Spring boot 整合mybtais和druid
- JDBC技术
- spring boot 使用hibernate-validation
- osgViewer应用基础
- NVcaffe源码阅读——Blob的重新构建
- 排序算法
- NOIP2016Day1T1玩具谜题解题报告
- spring boot 多数据源动态切换
- Ubuntu14.04安装最新版Docker