Commit eb02ed9e by 阳浪

配置信息

parent 917f30d4
...@@ -3,6 +3,7 @@ package com.yizhi.application; ...@@ -3,6 +3,7 @@ package com.yizhi.application;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
...@@ -15,7 +16,7 @@ import org.springframework.context.annotation.ComponentScan; ...@@ -15,7 +16,7 @@ import org.springframework.context.annotation.ComponentScan;
* @date 2018/11/12 * @date 2018/11/12
**/ **/
@SpringBootApplication @SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableCaching @EnableCaching
@EnableFeignClients(basePackages = {"com.yizhi"}) @EnableFeignClients(basePackages = {"com.yizhi"})
......
...@@ -17,20 +17,20 @@ public class RedissonManager { ...@@ -17,20 +17,20 @@ public class RedissonManager {
// config.useClusterServers() // 这是用的集群server // config.useClusterServers() // 这是用的集群server
// .setScanInterval(2000) // 设置集群状态扫描时间 // .setScanInterval(2000) // 设置集群状态扫描时间
// .setMasterConnectionPoolSize(10000) // 设置连接数 // .setMasterConnectionPoolSize(10000) // 设置连接数
// .setSlaveConnectionPoolSize(10000).addNodeAddress("redis://127.0.0.1:6379") // .setSlaveConnectionPoolSize(10000).addNodeAddress("redis://10.23.1.183:6379")
// .addNodeAddress("redis://127.0.0.1:6389").addNodeAddress("redis://127.0.0.1:6399"); // .addNodeAddress("redis://10.23.1.183:6389").addNodeAddress("redis://10.23.1.183:6399");
if (key == null || "".equals(key)) { if (key == null || "".equals(key)) {
key = RAtomicName; key = RAtomicName;
} }
config.useSingleServer().setAddress("redis://127.0.0.1:6379"); config.useSingleServer().setAddress("redis://10.23.1.183:6379");
redisson = Redisson.create(config); redisson = Redisson.create(config);
// redisson = (Redisson) Redisson.create(); // redisson = (Redisson) Redisson.create();
// config.useClusterServers() // config.useClusterServers()
// .setScanInterval(2000) // 集群状态扫描间隔时间,单位是毫秒 // .setScanInterval(2000) // 集群状态扫描间隔时间,单位是毫秒
// //可以用"rediss://"来启用SSL连接 // //可以用"rediss://"来启用SSL连接
// .addNodeAddress("redis://127.0.0.1:6389").addNodeAddress("redis://127.0.0.1:6395") // .addNodeAddress("redis://10.23.1.183:6389").addNodeAddress("redis://10.23.1.183:6395")
// .addNodeAddress("redis://127.0.0.1:6396").addNodeAddress("redis://127.0.0.1:6397") // .addNodeAddress("redis://10.23.1.183:6396").addNodeAddress("redis://10.23.1.183:6397")
// .addNodeAddress("redis://127.0.0.1:6398").addNodeAddress("redis://127.0.0.1:6399"); // .addNodeAddress("redis://10.23.1.183:6398").addNodeAddress("redis://10.23.1.183:6399");
// redisson = Redisson.create(config); // redisson = Redisson.create(config);
// 清空自增的ID数字 // 清空自增的ID数字
......
server.port=34008 server.port=34008
spring.application.name=customproject spring.application.name=customproject
ACTIVE=${spring.profiles.active} ACTIVE=${spring.profiles.active}
spring.profiles.active=dev spring.profiles.active=prod
# nacos # nacos
spring.cloud.nacos.config.shared-dataids=common-${spring.profiles.active}.properties spring.cloud.nacos.config.shared-dataids=common-${spring.profiles.active}.properties
spring.cloud.nacos.config.namespace=${spring.profiles.active} spring.cloud.nacos.config.namespace=${spring.profiles.active}
spring.cloud.nacos.config.prefix=${spring.application.name} spring.cloud.nacos.config.prefix=${spring.application.name}
spring.cloud.nacos.config.file-extension=properties spring.cloud.nacos.config.file-extension=properties
spring.cloud.nacos.config.server-addr=192.168.1.22:3333,192.168.1.22:4444,192.168.1.22:5555 spring.cloud.nacos.config.server-addr=10.23.1.183:8848
\ No newline at end of file \ 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