添加docker容器化部署,配置区分dev和prod环境
This commit is contained in:
10
mall-search/src/main/resources/application-dev.properties
Normal file
10
mall-search/src/main/resources/application-dev.properties
Normal file
@@ -0,0 +1,10 @@
|
||||
#===datasource start===
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/mall
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
||||
#===datasource end===
|
||||
|
||||
#===es start===
|
||||
spring.data.elasticsearch.repositories.enabled = true
|
||||
spring.data.elasticsearch.cluster-nodes = 127.0.0.1:9300
|
||||
#===es end===
|
||||
10
mall-search/src/main/resources/application-prod.properties
Normal file
10
mall-search/src/main/resources/application-prod.properties
Normal file
@@ -0,0 +1,10 @@
|
||||
#===datasource start===
|
||||
spring.datasource.url=jdbc:mysql://db:3306/mall
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
||||
#===datasource end===
|
||||
|
||||
#===es start===
|
||||
spring.data.elasticsearch.repositories.enabled = true
|
||||
spring.data.elasticsearch.cluster-nodes = es:9300
|
||||
#===es end===
|
||||
@@ -1,21 +1,12 @@
|
||||
#Ĭ<><C4AC>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
spring.profiles.active=dev
|
||||
|
||||
#===server start===
|
||||
server.port=8081
|
||||
#===server end===
|
||||
|
||||
logging.level.root=info
|
||||
|
||||
#===datasource start===
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/mall
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
||||
#===datasource end===
|
||||
|
||||
#===mybatis start===
|
||||
mybatis.mapper-locations=classpath:dao/*.xml,classpath*:com/**/mapper/*.xml
|
||||
#===mybatis end===
|
||||
|
||||
#===es start===
|
||||
spring.data.elasticsearch.repositories.enabled = true
|
||||
spring.data.elasticsearch.cluster-nodes = 127.0.0.1:9300
|
||||
#spring.data.elasticsearch.cluster-nodes = 192.168.1.66:9300
|
||||
#===es end===
|
||||
#===mybatis end===
|
||||
@@ -28,7 +28,7 @@
|
||||
p.recommand_status recommandStatus,
|
||||
p.stock stock,
|
||||
p.promotion_type promotionType,
|
||||
P.keywords keywords,
|
||||
p.keywords keywords,
|
||||
p.sort sort,
|
||||
pav.id attr_id,
|
||||
pav.value attr_value,
|
||||
|
||||
Reference in New Issue
Block a user