微服务重大升级说明(暂时只升级后台3.4.0)

-升级Spring Cloud Alibaba 2021.0.1.0,使用 spring.config.import 方式引入nacos配置
-拆分jeecg-boot-starter出来,使用独立项目维护
This commit is contained in:
zhangdaiscott
2022-08-06 17:02:37 +08:00
parent d4bc1439ad
commit 12c4c8cf9a
158 changed files with 625 additions and 5645 deletions

View File

@ -24,6 +24,7 @@ import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.*;
import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.AuthorityRuleCorrectEntity;
import com.alibaba.csp.sentinel.dashboard.rule.nacos.entity.ParamFlowRuleCorrectEntity;
import com.alibaba.nacos.api.PropertyKeyConst;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -150,8 +151,12 @@ public class SentinelConfig {
public ConfigService nacosConfigService() throws Exception {
Properties properties=new Properties();
properties.put(PropertyKeyConst.SERVER_ADDR,nacosConfigProperties.getServerAddr());
properties.put(PropertyKeyConst.USERNAME,nacosConfigProperties.getUsername());
properties.put(PropertyKeyConst.PASSWORD,nacosConfigProperties.getPassword());
if(StringUtils.isNotBlank(nacosConfigProperties.getUsername())){
properties.put(PropertyKeyConst.USERNAME,nacosConfigProperties.getUsername());
}
if(StringUtils.isNotBlank(nacosConfigProperties.getPassword())){
properties.put(PropertyKeyConst.PASSWORD,nacosConfigProperties.getPassword());
}
return ConfigFactory.createConfigService(properties);
}
}

View File

@ -32,8 +32,6 @@ logging:
nacos:
server:
ip: @config.server-addr@
password: @config.password@
username: @config.username@
sentinel:
dashboard:
version: 1.8.2