change - broker 项目启动加载修改

dev
Wen JY 1 year ago
parent d826e53a08
commit 838a1b47e5

@ -3,8 +3,9 @@ package com.hw.mqtt;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
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.jdbc.DataSourceAutoConfiguration;
@SpringBootApplication @SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class HwMqttBrokerApplication { public class HwMqttBrokerApplication {
public static void main(String[] args) { public static void main(String[] args) {

@ -5,18 +5,18 @@ server:
# Spring # Spring
spring: spring:
application: application:
# ???? # 应用名称
name: hw-mqtt-broker name: hw-mqtt-broker
profiles: profiles:
# ???? # 环境配置
active: dev active: dev
cloud: cloud:
nacos: nacos:
config: config:
# ?????? # 配置中心地址
server-addr: huawei-nacos:8848 server-addr: huawei-nacos:8848
# ?????? # 配置文件格式
file-extension: yml file-extension: yml
# ???? # 共享配置
shared-configs: shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

Loading…
Cancel
Save