update: 从application中读取配置, 1.内置redis配置默认值,2内置es配置默认值
parent
debbc8e836
commit
8c44979dcf
|
@ -23,10 +23,10 @@ import java.util.Collections;
|
|||
@Component
|
||||
public class EmbeddedElasticSearchConfig {
|
||||
|
||||
@Value("${spring.elasticsearch.embedded.enabled}")
|
||||
@Value("${spring.elasticsearch.embedded.enabled:false}")
|
||||
private boolean embeddedElasticsearchEnabled;
|
||||
|
||||
@Value("${spring.elasticsearch.embedded.port}")
|
||||
@Value("${spring.elasticsearch.embedded.port:9200}")
|
||||
private Integer esPort;
|
||||
|
||||
@PostConstruct
|
||||
|
|
|
@ -20,9 +20,9 @@ import javax.annotation.PostConstruct;
|
|||
@Component
|
||||
public class EmbeddedRedisConfig {
|
||||
|
||||
@Value("${spring.redis.embedded.enabled}")
|
||||
@Value("${spring.redis.embedded.enabled:false}")
|
||||
private boolean embeddedRedisEnabled;
|
||||
@Value("${spring.redis.port}")
|
||||
@Value("${spring.redis.port:6378}")
|
||||
private Integer redisPort;
|
||||
|
||||
@PostConstruct
|
||||
|
|
Loading…
Reference in New Issue