Skip to content

Commit 75fe71d

Browse files
authored
Merge pull request #43 from OpenFluxGate/release/0.3.3
[fluxgate] Release/0.3.3
2 parents d04c545 + be75d36 commit 75fe71d

119 files changed

Lines changed: 6760 additions & 193 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/maven-ci.yml

Lines changed: 167 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
build:
10+
# Build and test with Java 21 (all modules)
11+
build-java21:
12+
name: Build & Test (Java 21 - All Modules)
1113
runs-on: ubuntu-latest
1214

1315
services:
@@ -61,10 +63,10 @@ jobs:
6163
steps:
6264
- uses: actions/checkout@v4
6365

64-
- name: Set up JDK
66+
- name: Set up JDK 21
6567
uses: actions/setup-java@v4
6668
with:
67-
java-version: "21"
69+
java-version: '21'
6870
distribution: temurin
6971
cache: maven
7072

@@ -88,6 +90,167 @@ jobs:
8890
uses: actions/upload-artifact@v4
8991
if: always()
9092
with:
91-
name: test-results
93+
name: test-results-java21
9294
path: '**/target/surefire-reports/*.xml'
9395

96+
# Build and test Spring Boot 2.x modules with Java 11
97+
build-java11:
98+
name: Build & Test (Java 11 - Spring Boot 2.x)
99+
runs-on: ubuntu-latest
100+
101+
services:
102+
mongo:
103+
image: mongo:7.0
104+
env:
105+
MONGO_INITDB_ROOT_USERNAME: fluxgate
106+
MONGO_INITDB_ROOT_PASSWORD: fluxgate123
107+
MONGO_INITDB_DATABASE: fluxgate
108+
ports:
109+
- 27017:27017
110+
options: >-
111+
--health-cmd "mongosh --username fluxgate --password fluxgate123 --authenticationDatabase admin --eval 'db.adminCommand(\"ping\")'"
112+
--health-interval=10s
113+
--health-timeout=5s
114+
--health-retries=5
115+
116+
redis:
117+
image: redis:7-alpine
118+
ports:
119+
- 6379:6379
120+
options: >-
121+
--health-cmd "redis-cli ping"
122+
--health-interval=10s
123+
--health-timeout=5s
124+
--health-retries=5
125+
126+
redis-cluster:
127+
image: grokzen/redis-cluster:7.0.10
128+
env:
129+
IP: "0.0.0.0"
130+
INITIAL_PORT: 7100
131+
ports:
132+
- 7100:7100
133+
- 7101:7101
134+
- 7102:7102
135+
- 7103:7103
136+
- 7104:7104
137+
- 7105:7105
138+
options: >-
139+
--health-cmd "redis-cli -p 7100 cluster info | grep cluster_state:ok"
140+
--health-interval=10s
141+
--health-timeout=10s
142+
--health-retries=10
143+
144+
env:
145+
FLUXGATE_MONGO_URI: "mongodb://fluxgate:fluxgate123@localhost:27017/fluxgate?authSource=admin"
146+
FLUXGATE_MONGO_DB: "fluxgate"
147+
FLUXGATE_REDIS_URI: "redis://localhost:6379"
148+
149+
steps:
150+
- uses: actions/checkout@v4
151+
152+
- name: Set up JDK 11
153+
uses: actions/setup-java@v4
154+
with:
155+
java-version: '11'
156+
distribution: temurin
157+
cache: maven
158+
159+
- name: Build core modules with Java 11
160+
run: |
161+
# Build only Java 11 compatible modules
162+
mvn -B install -DskipTests \
163+
-pl fluxgate-core,fluxgate-mongo-adapter,fluxgate-redis-ratelimiter,fluxgate-spring-boot2-starter \
164+
-am
165+
166+
- name: Test Spring Boot 2.x starter with Java 11
167+
run: |
168+
mvn -B verify \
169+
-pl fluxgate-core,fluxgate-mongo-adapter,fluxgate-redis-ratelimiter,fluxgate-spring-boot2-starter
170+
171+
- name: Upload test results
172+
uses: actions/upload-artifact@v4
173+
if: always()
174+
with:
175+
name: test-results-java11
176+
path: '**/target/surefire-reports/*.xml'
177+
178+
# Build and test with Java 17 (Spring Boot 3.x minimum)
179+
build-java17:
180+
name: Build & Test (Java 17 - Spring Boot 3.x)
181+
runs-on: ubuntu-latest
182+
183+
services:
184+
mongo:
185+
image: mongo:7.0
186+
env:
187+
MONGO_INITDB_ROOT_USERNAME: fluxgate
188+
MONGO_INITDB_ROOT_PASSWORD: fluxgate123
189+
MONGO_INITDB_DATABASE: fluxgate
190+
ports:
191+
- 27017:27017
192+
options: >-
193+
--health-cmd "mongosh --username fluxgate --password fluxgate123 --authenticationDatabase admin --eval 'db.adminCommand(\"ping\")'"
194+
--health-interval=10s
195+
--health-timeout=5s
196+
--health-retries=5
197+
198+
redis:
199+
image: redis:7-alpine
200+
ports:
201+
- 6379:6379
202+
options: >-
203+
--health-cmd "redis-cli ping"
204+
--health-interval=10s
205+
--health-timeout=5s
206+
--health-retries=5
207+
208+
redis-cluster:
209+
image: grokzen/redis-cluster:7.0.10
210+
env:
211+
IP: "0.0.0.0"
212+
INITIAL_PORT: 7100
213+
ports:
214+
- 7100:7100
215+
- 7101:7101
216+
- 7102:7102
217+
- 7103:7103
218+
- 7104:7104
219+
- 7105:7105
220+
options: >-
221+
--health-cmd "redis-cli -p 7100 cluster info | grep cluster_state:ok"
222+
--health-interval=10s
223+
--health-timeout=10s
224+
--health-retries=10
225+
226+
env:
227+
FLUXGATE_MONGO_URI: "mongodb://fluxgate:fluxgate123@localhost:27017/fluxgate?authSource=admin"
228+
FLUXGATE_MONGO_DB: "fluxgate"
229+
FLUXGATE_REDIS_URI: "redis://localhost:6379"
230+
231+
steps:
232+
- uses: actions/checkout@v4
233+
234+
- name: Set up JDK 17
235+
uses: actions/setup-java@v4
236+
with:
237+
java-version: '17'
238+
distribution: temurin
239+
cache: maven
240+
241+
- name: Build all modules with Java 17 (excluding Java 21 samples)
242+
run: |
243+
mvn -B install -DskipTests \
244+
-pl !fluxgate-samples/fluxgate-sample-standalone-java21
245+
246+
- name: Test Spring Boot 3.x starter with Java 17
247+
run: |
248+
mvn -B verify \
249+
-pl fluxgate-core,fluxgate-mongo-adapter,fluxgate-redis-ratelimiter,fluxgate-spring-boot3-starter
250+
251+
- name: Upload test results
252+
uses: actions/upload-artifact@v4
253+
if: always()
254+
with:
255+
name: test-results-java17
256+
path: '**/target/surefire-reports/*.xml'

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,5 @@ jobs:
113113
fluxgate-core/target/*.jar
114114
fluxgate-redis-ratelimiter/target/*.jar
115115
fluxgate-mongo-adapter/target/*.jar
116-
fluxgate-spring-boot-starter/target/*.jar
116+
fluxgate-spring-boot2-starter/target/*.jar
117+
fluxgate-spring-boot3-starter/target/*.jar

CONTRIBUTING.ko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ FluxGate에 기여해 주셔서 감사합니다! 이 문서는 기여를 위한
2626

2727
### 사전 요구 사항
2828

29-
- **Java 21+** - 프로젝트 빌드 및 실행에 필요
29+
- **Java 11+** - 프로젝트 빌드 및 실행에 필요
3030
- **Maven 3.8+** - 빌드 도구
3131
- **Docker** - 개발 중 Redis 및 MongoDB 실행용
3232
- **Git** - 버전 관리

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ By participating in this project, you agree to maintain a respectful and inclusi
2727

2828
### Prerequisites
2929

30-
- **Java 21+** - Required for building and running the project
30+
- **Java 11+** - Required for building and running the project
3131
- **Maven 3.8+** - Build tool
3232
- **Docker** - For running Redis and MongoDB during development
3333
- **Git** - Version control

README.ko.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# FluxGate
22

3-
[![Java](https://img.shields.io/badge/Java-21%2B-blue.svg)](https://openjdk.org/)
4-
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.3.x-brightgreen.svg)](https://spring.io/projects/spring-boot)
3+
[![Java](https://img.shields.io/badge/Java-11%2B-blue.svg)](https://openjdk.org/)
4+
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.7.x%20%7C%203.x-brightgreen.svg)](https://spring.io/projects/spring-boot)
55
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
66
[![Build](https://github.com/OpenFluxGate/fluxgate/actions/workflows/maven-ci.yml/badge.svg)](https://github.com/OpenFluxGate/fluxgate/actions)
77
[![Admin UI](https://img.shields.io/badge/Admin%20UI-FluxGate%20Studio-orange.svg)](https://github.com/OpenFluxGate/fluxgate-studio)
@@ -79,40 +79,51 @@
7979
| **fluxgate-core** | Bucket4j 통합을 포함한 핵심 Rate Limiting 엔진 |
8080
| **fluxgate-redis-ratelimiter** | Lua 스크립트를 사용한 Redis 기반 분산 Rate Limiter |
8181
| **fluxgate-mongo-adapter** | 동적 규칙 관리를 위한 MongoDB 어댑터 |
82-
| **fluxgate-spring-boot-starter** | Spring Boot 자동 설정 및 필터 지원 |
82+
| **fluxgate-spring-boot3-starter** | Spring Boot 3.x 자동 설정 (Java 17+, jakarta.servlet) |
83+
| **fluxgate-spring-boot2-starter** | Spring Boot 2.x 자동 설정 (Java 11+, javax.servlet) |
8384
| **fluxgate-testkit** | 통합 테스트 유틸리티 |
8485
| **fluxgate-samples** | 다양한 사용 사례를 보여주는 샘플 애플리케이션 |
8586

8687
## 빠른 시작
8788

8889
### 사전 요구 사항
8990

90-
- Java 21+
91+
- Java 11+
9192
- Maven 3.8+
9293
- Redis 6.0+ (분산 Rate Limiting용)
9394
- MongoDB 4.4+ (선택사항, 규칙 관리용)
9495

9596
### 1. 의존성 추가
9697

9798
```xml
99+
<!-- Spring Boot 3.x (Java 17+) -->
98100
<dependency>
99101
<groupId>io.github.openfluxgate</groupId>
100-
<artifactId>fluxgate-spring-boot-starter</artifactId>
101-
<version>0.2.0</version>
102+
<artifactId>fluxgate-spring-boot3-starter</artifactId>
103+
<version>0.3.3</version>
102104
</dependency>
103105

106+
<!-- Spring Boot 2.x (Java 11+) -->
107+
<!--
108+
<dependency>
109+
<groupId>io.github.openfluxgate</groupId>
110+
<artifactId>fluxgate-spring-boot2-starter</artifactId>
111+
<version>0.3.3</version>
112+
</dependency>
113+
-->
114+
104115
<!-- For Redis-backed rate limiting -->
105116
<dependency>
106117
<groupId>io.github.openfluxgate</groupId>
107118
<artifactId>fluxgate-redis-ratelimiter</artifactId>
108-
<version>0.2.0</version>
119+
<version>0.3.3</version>
109120
</dependency>
110121

111122
<!-- For MongoDB rule management (optional) -->
112123
<dependency>
113124
<groupId>io.github.openfluxgate</groupId>
114125
<artifactId>fluxgate-mongo-adapter</artifactId>
115-
<version>0.2.0</version>
126+
<version>0.3.3</version>
116127
</dependency>
117128
```
118129

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# FluxGate
22

3-
[![Java](https://img.shields.io/badge/Java-21%2B-blue.svg)](https://openjdk.org/)
4-
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.3.x-brightgreen.svg)](https://spring.io/projects/spring-boot)
3+
[![Java](https://img.shields.io/badge/Java-11%2B-blue.svg)](https://openjdk.org/)
4+
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.7.x%20%7C%203.x-brightgreen.svg)](https://spring.io/projects/spring-boot)
55
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
66
[![Build](https://github.com/OpenFluxGate/fluxgate/actions/workflows/maven-ci.yml/badge.svg)](https://github.com/OpenFluxGate/fluxgate/actions)
77
[![Admin UI](https://img.shields.io/badge/Admin%20UI-FluxGate%20Studio-orange.svg)](https://github.com/OpenFluxGate/fluxgate-studio)
@@ -78,40 +78,51 @@ English | [한국어](README.ko.md)
7878
| **fluxgate-core** | Core rate limiting engine with Bucket4j integration |
7979
| **fluxgate-redis-ratelimiter** | Redis-backed distributed rate limiter with Lua scripts |
8080
| **fluxgate-mongo-adapter** | MongoDB adapter for dynamic rule management |
81-
| **fluxgate-spring-boot-starter** | Spring Boot auto-configuration and filter support |
81+
| **fluxgate-spring-boot3-starter** | Spring Boot 3.x auto-configuration (Java 17+, jakarta.servlet) |
82+
| **fluxgate-spring-boot2-starter** | Spring Boot 2.x auto-configuration (Java 11+, javax.servlet) |
8283
| **fluxgate-testkit** | Integration testing utilities |
8384
| **fluxgate-samples** | Sample applications demonstrating various use cases |
8485

8586
## Quick Start
8687

8788
### Prerequisites
8889

89-
- Java 21+
90+
- Java 11+
9091
- Maven 3.8+
9192
- Redis 6.0+ (for distributed rate limiting)
9293
- MongoDB 4.4+ (optional, for rule management)
9394

9495
### 1. Add Dependencies
9596

9697
```xml
98+
<!-- For Spring Boot 3.x (Java 17+) -->
9799
<dependency>
98100
<groupId>io.github.openfluxgate</groupId>
99-
<artifactId>fluxgate-spring-boot-starter</artifactId>
100-
<version>0.3.1</version>
101+
<artifactId>fluxgate-spring-boot3-starter</artifactId>
102+
<version>0.3.3</version>
101103
</dependency>
102104

105+
<!-- For Spring Boot 2.x (Java 11+) -->
106+
<!--
107+
<dependency>
108+
<groupId>io.github.openfluxgate</groupId>
109+
<artifactId>fluxgate-spring-boot2-starter</artifactId>
110+
<version>0.3.3</version>
111+
</dependency>
112+
-->
113+
103114
<!-- For Redis-backed rate limiting -->
104115
<dependency>
105116
<groupId>io.github.openfluxgate</groupId>
106117
<artifactId>fluxgate-redis-ratelimiter</artifactId>
107-
<version>0.3.1</version>
118+
<version>0.3.3</version>
108119
</dependency>
109120

110121
<!-- For MongoDB rule management (optional) -->
111122
<dependency>
112123
<groupId>io.github.openfluxgate</groupId>
113124
<artifactId>fluxgate-mongo-adapter</artifactId>
114-
<version>0.3.1</version>
125+
<version>0.3.3</version>
115126
</dependency>
116127
```
117128

fluxgate-control-support/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<groupId>io.github.openfluxgate</groupId>
1111
<artifactId>fluxgate</artifactId>
12-
<version>0.3.1</version>
12+
<version>0.3.3</version>
1313
</parent>
1414

1515
<artifactId>fluxgate-control-support</artifactId>
@@ -18,6 +18,10 @@
1818
<name>FluxGate Control Support</name>
1919
<description>Support library for FluxGate Control Plane (Admin/Studio) - provides rule change notification capabilities</description>
2020

21+
<properties>
22+
<skipJacocoForPom>false</skipJacocoForPom>
23+
</properties>
24+
2125
<dependencies>
2226
<!-- Lettuce Redis Client -->
2327
<dependency>

fluxgate-control-support/src/main/java/org/fluxgate/control/notify/RedisRuleChangeNotifier.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.util.Arrays;
1212
import java.util.List;
1313
import java.util.Objects;
14+
import java.util.stream.Collectors;
1415
import org.slf4j.Logger;
1516
import org.slf4j.LoggerFactory;
1617

@@ -191,7 +192,10 @@ private void createStandaloneConnection() {
191192
private void createClusterConnection() {
192193
log.debug("Creating Redis cluster connection");
193194
List<RedisURI> uris =
194-
Arrays.stream(redisUri.split(",")).map(String::trim).map(this::createRedisUri).toList();
195+
Arrays.stream(redisUri.split(","))
196+
.map(String::trim)
197+
.map(this::createRedisUri)
198+
.collect(Collectors.toList());
195199
redisClusterClient = RedisClusterClient.create(uris);
196200
clusterConnection = redisClusterClient.connect();
197201
}

0 commit comments

Comments
 (0)