update: 从application中读取配置, 1.内置redis配置默认值,2内置es配置默认值

V0.5.x
jay 2024-02-27 12:03:07 +08:00
parent debbc8e836
commit 8c44979dcf
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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