记得上下班打卡 | git大法好,push需谨慎

Commit d6add5d8 authored by 胡佳晨's avatar 胡佳晨

提交 dev 环境配置文件

parent 330d2838
......@@ -40,6 +40,18 @@
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.liquidnet.service.kylin.config;
/**
* @author AnJiabin <jiabin.an@lightnet.io>
* @version V1.0
* @Description:
* @class: MongoSSL
* @Package com.liquidnet.service.adam.config
* @Copyright: LightNet @ Copyright (c) 2020
* @date 2020/12/18 11:51 上午
*/
import com.mongodb.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//mongoSSl连接配置类
@Slf4j
@Configuration
public class MongoSslConfig {
@Value("${spring.data.mongodb.trustStore}")
private String trustStore;
@Value("${spring.data.mongodb.trustStorePassword}")
private String trustStorePassword;
@Value("${spring.data.mongodb.uri}")
private String mongodbUri;
@Value("${spring.data.mongodb.sslEnabled}")
private boolean sslEnabled;
@Bean
public MongoClient createMongoClientByUri() {
log.info("MongoSslConfig trustStore:{}",trustStore);
log.info("MongoSslConfig trustStorePassword:{}",trustStorePassword);
log.info("MongoSslConfig mongodbUri:{}",mongodbUri);
log.info("MongoSslConfig sslEnabled:{}",sslEnabled);
System.setProperty("javax.net.ssl.trustStore",trustStore);
System.setProperty("javax.net.ssl.trustStorePassword",trustStorePassword);
MongoClientURI uri = new MongoClientURI(mongodbUri,MongoClientOptions.builder().sslEnabled(sslEnabled));
return new MongoClient(uri);
}
}
......@@ -11,7 +11,7 @@ liquidnet:
spring:
profiles:
include: service-ticket
include: service-kylin
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://39.106.122.201:3308/devmall?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=UTC
......@@ -22,15 +22,24 @@ spring:
port: 6380
password: PO@B!Iud32
database: 0
# rabbitmq:
## host: 127.0.0.1
## port: 15672
## username: hujiachen
## password: hujiachen123
# addresses: 127.0.0.1
rabbitmq:
# host: 127.0.0.1
# port: 15672
# username: hujiachen
# password: hujiachen123
addresses: 127.0.0.1
port: 5672
username: hujiachen
password: hujiachen123
data:
mongodb:
uri: mongodb://172.16.3.11:27017/kylin_mdb
#本地测试证书
# sslEnabled: false
# trustStore:
# trustStorePassword:
# uri: mongodb://smartnet:a43ljKmK8oqdOO902P@smartnet-nonprod-docdb-docdb.cluster-cgjsqu7tuka2.ap-southeast-1.docdb.amazonaws.com:27017/liquidnet_mgdb?ssl=true&ssl_ca_certs=/Users/anjiabin/Downloads/rds-combined-ca-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false
mybatis-plus:
mapper-locations: classpath:com.liquidnet.service.kylin.mapper/*Mapper.xml
......
......@@ -2,4 +2,6 @@ spring:
application:
name: liquidnet-service-kylin
profiles:
active: dev
\ No newline at end of file
active: dev
server:
port: 9000
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment