Skip to content

Commit

Permalink
🍻 feat: v2.6.1.0
Browse files Browse the repository at this point in the history
- 重大更新
  1. Spring Boot 版本升级至 2.6.1
  2. Spring Cloud 版本升级至 2021.0.0
  3. 新增 Sentinel 自动降级处理机制。

- 其它更新
  1. 解决 JetCache 2.6.0 在 Spring Boot 2.6.X 环境下,Bean 循环依赖问题。
  2. 解决 Spring Cloud Alibaba Sentinel 2021.1 在 Spring Boot 2.6.X 环境下,Bean 循环依赖问题。
  3. 解决 Spring Boot 2.6.X 环境下,由于代码方法变更,导致接口自动化扫描抛空错误问题。
  4. 解决 Sentinel 与 Feign 冲突问题。
  5. 解决 Spring Cloud OAuth2 由于无用代码的注入,导致的 Bean 循环依赖问题。
  • Loading branch information
herodotus-ecosystem committed Dec 4, 2021
1 parent fd2854e commit 8164985
Show file tree
Hide file tree
Showing 47 changed files with 873 additions and 86 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

<p align="center">
<a href="https://www.oracle.com/java/technologies/javase-downloads.html" target="_blank"><img src="https://shields.io/badge/JDK-1.8%2B-green" alt="JDK 1.8+"></a>
<a href="https://spring.io/projects/spring-boot" target="_blank"><img src="https://shields.io/badge/Spring%20Boot-2.5.7-blue" alt="Spring Boot 2.5.7"></a>
<a href="https://spring.io/projects/spring-cloud" target="_blank"><img src="https://shields.io/badge/Spring%20Cloud-2020.0.4-blue" alt="Spring Cloud 2020.0.4"></a>
<a href="https://spring.io/projects/spring-boot" target="_blank"><img src="https://shields.io/badge/Spring%20Boot-2.6.1-blue" alt="Spring Boot 2.6.1"></a>
<a href="https://spring.io/projects/spring-cloud" target="_blank"><img src="https://shields.io/badge/Spring%20Cloud-2021.0.0-blue" alt="Spring Cloud 2021.0.0"></a>
<a href="https://github.com/alibaba/spring-cloud-alibaba" target="_blank"><img src="https://shields.io/badge/Spring%20Cloud%20Alibaba-2021.1-blue" alt="Spring Cloud Alibaba 2021.1"></a>
<a href="https://nacos.io/zh-cn/index.html" target="_blank"><img src="https://shields.io/badge/Nacos-2.0.3-brightgreen" alt="Nacos 2.0.3"></a>
<a href="./LICENSE"><img src="https://shields.io/badge/License-Apache--2.0-blue" alt="License Apache 2.0"></a>
<a href="https://blog.csdn.net/Pointer_v" target="_blank"><img src="https://shields.io/badge/Author-%E7%A0%81%E5%8C%A0%E5%90%9B-orange" alt="码匠君"></a>
<a href="#" target="_blank"><img src="https://shields.io/badge/Version-2.5.7.20-red" alt="Version 2.5.7.20"></a>
<a href="#" target="_blank"><img src="https://shields.io/badge/Version-2.6.1.0-red" alt="Version 2.6.1.0"></a>
<a href="https://gitee.com/herodotus/eurynome-cloud"><img src="https://gitee.com/herodotus/eurynome-cloud/badge/star.svg?theme=dark" alt="Gitee star"></a>
<a href="https://gitee.com/herodotus/eurynome-cloud"><img src="https://gitee.com/herodotus/eurynome-cloud/badge/fork.svg?theme=dark" alt="Gitee fork"></a>
</p>
Expand All @@ -29,7 +29,7 @@

## 企业级技术中台微服务架构与服务能力开发平台

Eurynome Cloud是一款企业级微服务架构和服务能力开发平台。基于Spring Boot 2.5.7、Spring Cloud 2020.0.4、Spring Cloud Alibaba 2021.1、Nacos 2.0.3 等最新版本开发,遵循SpringBoot编程思想,高度模块化和可配置化。具备服务发现、配置、熔断、限流、降级、监控、多级缓存、分布式事务、工作流等功能,代码简洁,架构清晰,非常适合学习和企业作为基础框架使用。
Eurynome Cloud是一款企业级微服务架构和服务能力开发平台。基于Spring Boot 2.6.1、Spring Cloud 2021.0.0、Spring Cloud Alibaba 2021.1、Nacos 2.0.3 等最新版本开发,遵循SpringBoot编程思想,高度模块化和可配置化。具备服务发现、配置、熔断、限流、降级、监控、多级缓存、分布式事务、工作流等功能,代码简洁,架构清晰,非常适合学习和企业作为基础框架使用。

## 平台定位

Expand Down Expand Up @@ -66,8 +66,8 @@ Eurynome Cloud是一款企业级微服务架构和服务能力开发平台。基

组件 | 版本
---|---
Spring Boot | 2.5.7
Spring Cloud | 2020.0.4
Spring Boot | 2.6.1
Spring Cloud | 2021.0.0
Spring Cloud Alibaba | 2021.1
Spring Boot Admin | 2.5.4
Nacos | 2.0.3 |
Expand Down
2 changes: 1 addition & 1 deletion configurations/docker/docker-compose/linux/herodotus/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=2.5.7.20
VERSION=2.6.1.0
GATEWAY_SERVICE_NAME=eurynome-cloud-gateway
GATEWAY_SERVICE_PORT=8847
UAA_SERVICE_NAME=eurynome-cloud-uaa
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=2.5.7.20
VERSION=2.6.1.0
GATEWAY_SERVICE_NAME=eurynome-cloud-gateway
GATEWAY_SERVICE_PORT=8847
UAA_SERVICE_NAME=eurynome-cloud-uaa
Expand Down
8 changes: 4 additions & 4 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.7</version>
<version>2.6.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>cn.herodotus.eurynome</groupId>
<artifactId>dependencies</artifactId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
<packaging>pom</packaging>

<name>eurynome-cloud-dependencies</name>
Expand All @@ -59,8 +59,8 @@

<properties>
<!--Spring 家族-->
<spring-boot-dependencies.version>2.5.7</spring-boot-dependencies.version>
<spring-cloud-dependencies.version>2020.0.4</spring-cloud-dependencies.version>
<spring-boot-dependencies.version>2.6.1</spring-boot-dependencies.version>
<spring-cloud-dependencies.version>2021.0.0</spring-cloud-dependencies.version>
<spring-cloud-alibaba-dependencies.version>2021.1</spring-cloud-alibaba-dependencies.version>
<spring-boot-admin.version>2.5.4</spring-boot-admin.version>

Expand Down
4 changes: 2 additions & 2 deletions integrates/eurynome-integration-influxdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
<parent>
<artifactId>integrates</artifactId>
<groupId>cn.herodotus.eurynome</groupId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>eurynome-integration-influxdb</artifactId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions integrates/eurynome-integration-oss/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
<parent>
<artifactId>integrates</artifactId>
<groupId>cn.herodotus.eurynome</groupId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>eurynome-integration-oss</artifactId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions integrates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
<parent>
<artifactId>eurynome-cloud</artifactId>
<groupId>cn.herodotus.eurynome</groupId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
</parent>

<artifactId>integrates</artifactId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
<packaging>pom</packaging>

<name>eurynome-cloud-integrates</name>
Expand Down
2 changes: 1 addition & 1 deletion packages/eurynome-cloud-assistant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<artifactId>packages</artifactId>
<groupId>cn.herodotus.eurynome</groupId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions packages/eurynome-cloud-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
<parent>
<artifactId>packages</artifactId>
<groupId>cn.herodotus.eurynome</groupId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>eurynome-cloud-cache</artifactId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
<packaging>jar</packaging>

<description>将Cache和Redis相关抽取出独立组件包。降低代码耦合性,提升代码包的独立性。解决依赖过多,使用过程中还需要进行排除的问题。</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@

package cn.herodotus.eurynome.cache.configuration;

import cn.herodotus.eurynome.cache.enhance.jetcache.JetCacheBuilder;
import cn.herodotus.eurynome.cache.enhance.layer.HerodotusCacheManager;
import cn.herodotus.eurynome.cache.properties.CacheProperties;
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
import com.alicp.jetcache.anno.support.SpringConfigProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
Expand All @@ -48,7 +46,7 @@
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(CacheProperties.class)
@EnableCreateCacheAnnotation
@Import({CaffeineConfiguration.class, RedisConfiguration.class, RedissonConfiguration.class})
@Import({CaffeineConfiguration.class, RedisConfiguration.class, RedissonConfiguration.class, JetCacheConfiguration.class})
public class CacheConfiguration {

private static final Logger log = LoggerFactory.getLogger(CacheConfiguration.class);
Expand All @@ -72,11 +70,4 @@ public HerodotusCacheManager herodotusCacheManager(CaffeineCacheManager caffeine

return herodotusCacheManager;
}

@Bean
public JetCacheBuilder jetCacheBuilder(SpringConfigProvider springConfigProvider) {
JetCacheBuilder jetCacheBuilder = new JetCacheBuilder(springConfigProvider);
log.trace("[Herodotus] |- Bean [Jet Cache Builder] Auto Configure.");
return jetCacheBuilder;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* Copyright (c) 2019-2021 Gengwei Zheng ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project Name: eurynome-cloud
* Module Name: eurynome-cloud-cache
* File Name: JetCacheConfiguration.java
* Author: gengwei.zheng
* Date: 2021/12/04 13:38:04
*/

package cn.herodotus.eurynome.cache.configuration;

import cn.herodotus.eurynome.cache.enhance.jetcache.JetCacheBuilder;
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
import com.alicp.jetcache.anno.support.ConfigProvider;
import com.alicp.jetcache.anno.support.GlobalCacheConfig;
import com.alicp.jetcache.anno.support.SpringConfigProvider;
import com.alicp.jetcache.autoconfigure.AutoConfigureBeans;
import com.alicp.jetcache.autoconfigure.JetCacheProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
* <p>Description: JetCacheConfiguration </p>
*
* 新增JetCache配置,解决JetCache依赖循环问题
*
* @author : gengwei.zheng
* @date : 2021/12/4 13:38
*/
@Configuration
@EnableConfigurationProperties(JetCacheProperties.class)
@EnableCreateCacheAnnotation
public class JetCacheConfiguration {

private static final Logger log = LoggerFactory.getLogger(JetCacheConfiguration.class);

@PostConstruct
public void postConstruct() {
log.debug("[Herodotus] |- Plugin [Herodotus JetCache] Auto Configure.");
}

@Bean
public AutoConfigureBeans autoConfigureBeans() {
AutoConfigureBeans autoConfigureBeans = new AutoConfigureBeans();
log.trace("[Herodotus] |- Bean [Auto Configure Beans] Auto Configure.");
return autoConfigureBeans;
}

@Bean
public GlobalCacheConfig globalCacheConfig(AutoConfigureBeans autoConfigureBeans, JetCacheProperties jetCacheProperties) {
GlobalCacheConfig globalCacheConfig = new GlobalCacheConfig();
globalCacheConfig.setHiddenPackages(jetCacheProperties.getHiddenPackages());
globalCacheConfig.setStatIntervalMinutes(jetCacheProperties.getStatIntervalMinutes());
globalCacheConfig.setAreaInCacheName(jetCacheProperties.isAreaInCacheName());
globalCacheConfig.setPenetrationProtect(jetCacheProperties.isPenetrationProtect());
globalCacheConfig.setEnableMethodCache(jetCacheProperties.isEnableMethodCache());
globalCacheConfig.setLocalCacheBuilders(autoConfigureBeans.getLocalCacheBuilders());
globalCacheConfig.setRemoteCacheBuilders(autoConfigureBeans.getRemoteCacheBuilders());
log.trace("[Herodotus] |- Bean [Global Cache Config] Auto Configure.");
return globalCacheConfig;
}

@Bean
@ConditionalOnBean(GlobalCacheConfig.class)
public ConfigProvider configProvider() {
SpringConfigProvider springConfigProvider = new SpringConfigProvider();
log.trace("[Herodotus] |- Bean [Spring Config Provider] Auto Configure.");
return springConfigProvider;
}

@Bean
@ConditionalOnBean(SpringConfigProvider.class)
public JetCacheBuilder jetCacheBuilder(SpringConfigProvider springConfigProvider) {
JetCacheBuilder jetCacheBuilder = new JetCacheBuilder(springConfigProvider);
log.trace("[Herodotus] |- Bean [Jet Cache Builder] Auto Configure.");
return jetCacheBuilder;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2019-2021 Gengwei Zheng ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project Name: eurynome-cloud
* Module Name: eurynome-cloud-cache
* File Name: JetCacheAutoConfiguration.java
* Author: gengwei.zheng
* Date: 2021/12/04 13:40:04
*/

package com.alicp.jetcache.autoconfigure;

import com.alicp.jetcache.anno.support.GlobalCacheConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import javax.annotation.PostConstruct;

/**
* <p>Description: 重新定义JetCacheAutoConfiguration </p>
*
* 解决JetCacheAutoConfiguration依赖循环问题
*
* @author : gengwei.zheng
* @date : 2021/12/4 13:40
*/
@Configuration
@ConditionalOnClass(GlobalCacheConfig.class)
@Import({RedisAutoConfiguration.class,
CaffeineAutoConfiguration.class,
MockRemoteCacheAutoConfiguration.class,
LinkedHashMapAutoConfiguration.class,
RedisLettuceAutoConfiguration.class,
RedisSpringDataAutoConfiguration.class})
public class JetCacheAutoConfiguration {

public static final String GLOBAL_CACHE_CONFIG_NAME = "globalCacheConfig";

private static final Logger log = LoggerFactory.getLogger(JetCacheAutoConfiguration.class);

@PostConstruct
public void postConstruct() {
log.info("[Herodotus] |- Component [Custom JetCache] Auto Configure.");
}
}
4 changes: 2 additions & 2 deletions packages/eurynome-cloud-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
<parent>
<artifactId>packages</artifactId>
<groupId>cn.herodotus.eurynome</groupId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
</parent>

<artifactId>eurynome-cloud-data</artifactId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
<packaging>jar</packaging>

<description>数据相关通用代码组件包,包括JPA,Redis,数据实体等相关内容</description>
Expand Down
17 changes: 15 additions & 2 deletions packages/eurynome-cloud-kernel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
<parent>
<artifactId>packages</artifactId>
<groupId>cn.herodotus.eurynome</groupId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
</parent>

<artifactId>eurynome-cloud-kernel</artifactId>
<version>2.5.7.20</version>
<version>2.6.1.0</version>
<packaging>jar</packaging>

<description>平台通用的基础依赖,以及接入及管理等通用代码,上中台必需的基础代码。增加这层包,主要目的是抽取webflux和web依赖的通用性,降低其它包之间的耦合性,比如之前data要依赖logstash,logstash要依赖managementproperties</description>
Expand Down Expand Up @@ -125,5 +125,18 @@
<artifactId>jasypt-spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>

</dependencies>
</project>
Loading

0 comments on commit 8164985

Please sign in to comment.