feat: change nacos config
This commit is contained in:
parent
c9ab19d68b
commit
b7a6bf4572
src/main
@ -42,11 +42,19 @@ public class TenantConfigManager {
|
||||
@Value("${spring.cloud.nacos.config.namespace}")
|
||||
private String namespace;
|
||||
|
||||
@Value("${spring.cloud.nacos.username}")
|
||||
private String username;
|
||||
|
||||
@Value("${spring.cloud.nacos.password}")
|
||||
private String password;
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws Exception {
|
||||
Properties properties = new Properties();
|
||||
properties.put("serverAddr", nacosServerAddr);
|
||||
properties.put("namespace", namespace);
|
||||
properties.put("username", username);
|
||||
properties.put("password", password);
|
||||
ConfigService configService = NacosFactory.createConfigService(properties);
|
||||
|
||||
for (String tenant : tenantProperties.getList()) {
|
||||
|
@ -1,14 +1,15 @@
|
||||
spring:
|
||||
application:
|
||||
name: CollaboraOnline
|
||||
profiles:
|
||||
active: local
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
namespace: office
|
||||
group: ATTACHMENT_VIA_GROUP
|
||||
# server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.3.100:8848
|
||||
username: nacos
|
||||
password: nacos
|
||||
config:
|
||||
import: nacos:application-tenant.yml
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user