Skip to content

Commit

Permalink
change configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
rbmonster committed Apr 18, 2021
1 parent c44080d commit 5d26550
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 50 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>24.1.1-jre</version>
<version>29.0-jre</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@ spring:
encoding: UTF-8
datasource:
druid:
driver-class-name: com.mysql.jdbc.Driver
driver-class-name: com.mysql.cj.jdbc.Driver
filters: stat
testOnReturn: false
testWhileIdle: true
maxActive: 1
removeAbandoned: true
removeAbandonedTimeoutMillis: 1
name: datasource
testOnBorrow: false
minIdle: 1
initialSize: 1
poolPreparedStatements: true
url: jdbc:mysql://58.87.106.44:3306/tms?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true
url: jdbc:mysql://121.5.73.118:3306/tms?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true
type: com.alibaba.druid.pool.DruidDataSource
validationQuery: select 1
maxOpenPreparedStatements: 300
username: root
password: 'Hsanwu123~'
password: 'Hsql~112233'
jackson:
default-property-inclusion: non_null
#logging:
Expand Down
20 changes: 20 additions & 0 deletions src/test/java/FastTestDemo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import com.four.unittest.UnitTestApplication;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@ActiveProfiles(profiles = {"test-exclusion", "test"})
@SpringBootTest(classes = UnitTestApplication.class,
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)
public class FastTestDemo {

@Test
public void test() {
log.info("~~~");
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
spring:
application:
name: test
name: demo
profiles:
active: test
main:
banner-mode: off
autoconfigure:
exclude:
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
- org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration
- org.mybatis.spring.boot.autoconfigure.MybatisLanguageDriverAutoConfiguration
- org.redisson.spring.cache.RedissonCacheStatisticsAutoConfiguration
Expand Down Expand Up @@ -33,7 +36,8 @@ spring:
- org.springframework.cloud.commons.util.UtilAutoConfiguration
- org.springframework.cloud.configuration.CompatibilityVerifierAutoConfiguration
- org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationAutoConfiguration
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
- org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration
- org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration
- org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
# - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
# - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
# - org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration
# - org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration
# - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
40 changes: 1 addition & 39 deletions src/test/resource/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,4 @@ spring:
- classpath:ddl
h2:
console:
enabled: true


# autoconfigure:
# exclude:
# - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
# - org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration
# - org.mybatis.spring.boot.autoconfigure.MybatisLanguageDriverAutoConfiguration
# - org.redisson.spring.cache.RedissonCacheStatisticsAutoConfiguration
# - org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration
# - org.springframework.cloud.autoconfigure.LifecycleMvcEndpointAutoConfiguration
# - org.springframework.cloud.autoconfigure.RefreshAutoConfiguration
# - org.springframework.cloud.openfeign.FeignAutoConfiguration
# - org.springframework.cloud.openfeign.encoding.FeignAcceptGzipEncodingAutoConfiguration
# - org.springframework.cloud.openfeign.encoding.FeignContentGzipEncodingAutoConfiguration
# - org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration
# - org.springframework.cloud.netflix.archaius.ArchaiusAutoConfiguration
# - org.springframework.cloud.client.CommonsClientAutoConfiguration
# - org.springframework.cloud.client.ReactiveCommonsClientAutoConfiguration
# - org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClientAutoConfiguration
# - org.springframework.cloud.client.discovery.composite.reactive.ReactiveCompositeDiscoveryClientAutoConfiguration
# - org.springframework.cloud.client.discovery.noop.NoopDiscoveryClientAutoConfiguration
# - org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration
# - org.springframework.cloud.client.discovery.simple.reactive.SimpleReactiveDiscoveryClientAutoConfiguration
# - org.springframework.cloud.client.hypermedia.CloudHypermediaAutoConfiguration
# - org.springframework.cloud.client.loadbalancer.AsyncLoadBalancerAutoConfiguration
# - org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration
# - org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration
# - org.springframework.cloud.client.loadbalancer.reactive.ReactorLoadBalancerClientAutoConfiguration
# - org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancerAutoConfiguration
# - org.springframework.cloud.client.serviceregistry.ServiceRegistryAutoConfiguration
# - org.springframework.cloud.commons.httpclient.HttpClientConfiguration
# - org.springframework.cloud.commons.util.UtilAutoConfiguration
# - org.springframework.cloud.configuration.CompatibilityVerifierAutoConfiguration
# - org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationAutoConfiguration
# - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
# - org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration
# - org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration
# - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
enabled: true

0 comments on commit 5d26550

Please sign in to comment.