mirror of
https://github.com/drtrang/druid-spring-boot.git
synced 2026-11-01 14:33:46 +00:00
1.0.2
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.github.drtrang</groupId>
|
||||
<artifactId>druid-spring-boot</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>druid-spring-boot-samples</artifactId>
|
||||
|
||||
@@ -47,6 +47,8 @@ spring:
|
||||
db-type: h2
|
||||
log-violation: true
|
||||
throw-exception: false
|
||||
config:
|
||||
select-all-column-allow: false
|
||||
aop-stat:
|
||||
enabled: false
|
||||
patterns:
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.github.trang.druid.test;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.wall.WallFilter;
|
||||
import com.github.trang.druid.mapper.CityMapper;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -19,6 +21,10 @@ public class DruidTests {
|
||||
|
||||
@Autowired
|
||||
private DruidDataSource dataSource;
|
||||
@Autowired
|
||||
private WallFilter wallFilter;
|
||||
@Autowired
|
||||
private CityMapper cityMapper;
|
||||
|
||||
@Test
|
||||
public void testDataSource() {
|
||||
@@ -36,4 +42,9 @@ public class DruidTests {
|
||||
assertEquals(dataSource.isUseGlobalDataSourceStat(), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMybatis() {
|
||||
System.out.println(cityMapper.findById(1L));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user