#Switch-Config
alibaba / switch-config Goto Github PK
View Code? Open in Web Editor NEWswitch-config
License: Apache License 2.0
switch-config
License: Apache License 2.0
#Switch-Config
阿里内部的开关中心?基于Nacos的?
经过试验,发现在开发时依赖 org.springframework.boot:spring-boot-devtools
时,自己编写代码的ClassLoader是RestartClassLoader
,但SwitchManager的ClassLoader是AppClassLoader
,由于ClassLoader不一样,会导致功能开关修改后无法生效。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
打印ClassLoader信息:
log.info(CommonTypeSwitch.class.getClassLoader().toString());
log.info(SwitchManager.class.getClassLoader().toString());
输出:
2021-11-26 16:49:41.813 INFO 50082 --- [nio-8080-exec-8] c.s.p.a.a.c.CommonTypeSwitchController : org.springframework.boot.devtools.restart.classloader.RestartClassLoader@64edd270
2021-11-26 16:49:41.818 INFO 50082 --- [nio-8080-exec-8] c.s.p.a.a.c.CommonTypeSwitchController : sun.misc.Launcher$AppClassLoader@18b4aac2
建议在本工程文档或阿里云AHAS功能开关的文档中补充这种情况的说明。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.