update Nacos by using the Spring cloud version (#225)
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
package we;
|
||||
|
||||
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -180,7 +179,6 @@ import we.log.LogSendAppender;
|
||||
QuartzAutoConfiguration.class
|
||||
}
|
||||
)
|
||||
@NacosPropertySource(dataId = "${nacos.config.data-id}", groupId = "${nacos.config.group}", autoRefreshed = true)
|
||||
@EnableDiscoveryClient
|
||||
public class FizzBootstrapApplication {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(FizzBootstrapApplication.class);
|
||||
|
||||
@@ -12,30 +12,6 @@ apollo:
|
||||
enabled: false #use Apollo?
|
||||
################################################### Apollo config end ###################################################
|
||||
|
||||
# if you do not use Nacos, ignore the follow config
|
||||
################################################## Nacos config start ###################################################
|
||||
nacos:
|
||||
config:
|
||||
# if use Nacos config set this flag to true
|
||||
enabled: false #use Nacos Config? (default:false)
|
||||
# need replace
|
||||
server-addr: localhost:8848 #please input the nacos config server-addr (default:localhost:8848)
|
||||
auto-refresh: true
|
||||
group: fizz-gateway #please input the nacos config group (default:fizz-gateway)
|
||||
data-id: application #please input the nacos config data-id (default:application)
|
||||
type: PROPERTIES #please input the nacos config type (default:PROPERTIES)
|
||||
# need replace
|
||||
namespace: null #please input the nacos config type (default:null)
|
||||
discovery:
|
||||
# if use Nacos discovery set this flag to true
|
||||
enabled: false #use Nacos Discovery? (default:false)
|
||||
# need replace
|
||||
server-addr: localhost:8848 #please input the nacos discovery server-addr (default:localhost:8848)
|
||||
auto-register: true
|
||||
register:
|
||||
group-name: fizz-gateway #please input the nacos discovery register group-name (default:fizz-gateway)
|
||||
################################################### Nacos config end ####################################################
|
||||
|
||||
# if you do not use Eureka, ignore the follow config
|
||||
################################################## Eureka config start ##################################################
|
||||
eureka:
|
||||
@@ -62,6 +38,14 @@ spring:
|
||||
loadbalancer:
|
||||
ribbon:
|
||||
enabled: false
|
||||
nacos:
|
||||
discovery:
|
||||
# if use Nacos discovery set this flag to true
|
||||
enabled: false #use Nacos Discovery? (default:false)
|
||||
# need replace
|
||||
server-addr: localhost:8848 #please input the nacos discovery server-addr (default:localhost:8848)
|
||||
namespace: null #please input the nacos config type (default:null)
|
||||
group: fizz-gateway #please input the nacos discovery register group (default:fizz-gateway)
|
||||
|
||||
aggregate:
|
||||
redis:
|
||||
|
||||
15
fizz-bootstrap/src/main/resources/bootstrap.yml
Normal file
15
fizz-bootstrap/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
# if use Nacos config set this flag to true
|
||||
enabled: false #use Nacos Config? (default:false)
|
||||
# need replace
|
||||
server-addr: localhost:8848 #please input the nacos config server-addr (default:localhost:8848)
|
||||
namespace: null #please input the nacos config type (default:null)
|
||||
group: fizz-gateway #please input the nacos config group (default:fizz-gateway)
|
||||
prefix: application #please input the nacos config data-id (default:application)
|
||||
extension-configs[0]:
|
||||
refresh: true
|
||||
data-id: ${spring.cloud.nacos.config.prefix}
|
||||
group: ${spring.cloud.nacos.config.group}
|
||||
@@ -17,6 +17,8 @@
|
||||
<AppenderRef ref="Console" />
|
||||
<AppenderRef ref="LogSend" />
|
||||
</Root>
|
||||
<!-- suppress the warn 'No URLs will be polled as dynamic configuration sources.' -->
|
||||
<logger name="com.netflix.config.sources.URLConfigurationSource" level="ERROR"/>
|
||||
<Logger name="we" level="warn" additivity="false" />
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
||||
Reference in New Issue
Block a user