提交 fb27bfa3 作者: 布红亮

添加nacos配置

上级 85d95f0d
......@@ -95,10 +95,21 @@
</dependency>
<!-- 注册中心-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>-->
<!-- <version>2.1.5.RELEASE</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<version>2.1.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.1.5.RELEASE</version>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
<version>2.1.4.RELEASE</version> <!-- 请注意,这里需要使用与Spring Boot 2.1兼容的版本 -->
</dependency>
<dependency>
......
......@@ -3,13 +3,12 @@ package com.zzsn.thinktank;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
//@EnableAsync
@MapperScan(value = {"com.zzsn.thinktank.mapper*"})
@EnableEurekaClient
@EnableDiscoveryClient
public class ThinkTankApplication {
public static void main(String[] args) {
......
server:
port: 9099
eureka:
instance:
#注册到注册中心通过Feign调用时,hostname必须是服务器ip
hostname: 1.95.42.138
instance-id: 1.95.42.138:9099
prefer-ip-address: false
client:
register-with-eureka: true
fetch-registry: false
service-url:
defaultZone: http://sasac:Sasac09ckJHyujT!W@192.168.200.226:8017/eureka/
spring:
cloud:
nacos:
config:
namespace: smartDev
discovery:
namespace: smartDev
server:
port: 9098
eureka:
instance:
#注册到注册中心通过Feign调用时,hostname必须是服务器ip
hostname: 1.95.42.138
instance-id: 1.95.42.138:9098
prefer-ip-address: false
client:
register-with-eureka: true
fetch-registry: false
service-url:
defaultZone: http://sasac:BE4cYRvN2WG!YV5z@106.38.99.147:20717/eureka/
\ No newline at end of file
spring:
cloud:
nacos:
config:
namespace: smartProd
discovery:
namespace: smartProd
\ No newline at end of file
server:
port: 9099
eureka:
instance:
#注册到注册中心通过Feign调用时,hostname必须是服务器ip
hostname: 1.95.42.138
instance-id: 1.95.42.138:9099
prefer-ip-address: false
client:
register-with-eureka: true
fetch-registry: false
service-url:
#线上测试环境
defaultZone: http://sasac:Sasac09ckJHyujT!W@106.38.99.147:20591/eureka/
\ No newline at end of file
spring:
cloud:
nacos:
config:
namespace: smartTest
discovery:
namespace: smartTest
\ No newline at end of file
spring:
cloud:
nacos:
config:
server-addr: 1.95.57.223:8848
username: ZZSN(ZIgriRlkxZ2g3SxM9x6sVYcMQe2QVxXx0/l4BAivWsTeVPkAYERSKxlHxzUwHF5M)
password: ZZSN(zB38iUSsp2RptT9HMrjJ0qGdSJ5iwq3jToor7ozqfMOYTiC6RwOvAxdayF7x9qm/)
file-extension: yml
discovery:
server-addr: 1.95.57.223:8848
username: ZZSN(ZIgriRlkxZ2g3SxM9x6sVYcMQe2QVxXx0/l4BAivWsTeVPkAYERSKxlHxzUwHF5M)
password: ZZSN(zB38iUSsp2RptT9HMrjJ0qGdSJ5iwq3jToor7ozqfMOYTiC6RwOvAxdayF7x9qm/)
jasypt:
encryptor:
property:
prefix: ZZSN(
suffix: )
algorithm: PBEWITHHMACSHA512ANDAES_256
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论