Skip to content

Commit 64feb77

Browse files
committed
[improve] Added a sample for configuring the excluded classes
1 parent 400f28f commit 64feb77

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

d02/d02s02/d02s02e01-properties-files/src/main/resources/application.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ logging.level.org.springframework=warn
77
logging.pattern.console=%clr([%date{HH:mm:ss.SSS}]){faint} %clr(%2p) %clr(%-40.40logger{36}){cyan} %m%n%wex
88

99
# defining a custom property
10-
connection.timeout=5000
10+
connection.timeout=5000
11+
12+
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\
13+
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration,\
14+
org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration

d02/d02s02/d02s02e02-yaml-files/src/main/resources/application.yml

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ spring:
33
application:
44
name: spring-boot-yaml-usage-demo
55

6+
autoconfigure:
7+
exclude:
8+
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
9+
- org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
10+
- org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration
11+
612
# logging settings
713
logging:
814
level:

0 commit comments

Comments
 (0)