66<a href =" https://github.com/hoangtien2k3/keycloak-auth-service " >✨Live Demo</a >
77</h3 >
88
9- ## Reactify - Powerful Reactive Java Library for Spring WebFlux
9+ ## Powerful Reactive Java Library for Spring WebFlux
1010
1111[ ![ Lines of Code] ( https://sonarcloud.io/api/project_badges/measure?project=hoangtien2k3_reactify&metric=ncloc )] ( https://sonarcloud.io/summary/overall?id=hoangtien2k3_reactify )
1212[ ![ GitHub Release] ( https://img.shields.io/github/v/release/hoangtien2k3/reactify?label=latest%20release )] ( https://mvnrepository.com/artifact/io.github.hoangtien2k3/reactify-core )
@@ -54,16 +54,16 @@ Add the dependency to your project build.gradle file or maven pom:
5454``` kotlin
5555dependencies {
5656 // Core reactive framework with Spring WebFlux integration
57- implementation(" io.github.hoangtien2k3:reactify-core:1.2.8 " )
57+ implementation(" io.github.hoangtien2k3:reactify-core:1.2.9 " )
5858
5959 // In-memory reactive caching for high-speed data access
60- implementation(" io.github.hoangtien2k3:reactify-cache:1.2.3 " )
60+ implementation(" io.github.hoangtien2k3:reactify-cache:1.2.4 " )
6161
6262 // Reactive REST/SOAP client with fault-tolerant design
63- implementation(" io.github.hoangtien2k3:reactify-client:1.2.3 " )
63+ implementation(" io.github.hoangtien2k3:reactify-client:1.2.4 " )
6464
6565 // Essential utilities for reactive development
66- implementation(" io.github.hoangtien2k3:reactify-utils:1.2.3 " )
66+ implementation(" io.github.hoangtien2k3:reactify-utils:1.2.4 " )
6767}
6868```
6969
@@ -73,28 +73,28 @@ dependencies {
7373 <dependency>
7474 <groupId>io.github.hoangtien2k3</groupId>
7575 <artifactId>reactify-core</artifactId>
76- <version>1.2.8 </version>
76+ <version>1.2.9 </version>
7777 </dependency>
7878
7979 <!-- In-memory reactive caching for high-speed data access -->
8080 <dependency>
8181 <groupId>io.github.hoangtien2k3</groupId>
8282 <artifactId>reactify-cache</artifactId>
83- <version>1.2.3 </version>
83+ <version>1.2.4 </version>
8484 </dependency>
8585
8686 <!-- Reactive REST/SOAP client with fault-tolerant design -->
8787 <dependency>
8888 <groupId>io.github.hoangtien2k3</groupId>
8989 <artifactId>reactify-client</artifactId>
90- <version>1.2.3 </version>
90+ <version>1.2.4 </version>
9191 </dependency>
9292
9393 <!-- Essential utilities for reactive development -->
9494 <dependency>
9595 <groupId>io.github.hoangtien2k3</groupId>
9696 <artifactId>reactify-utils</artifactId>
97- <version>1.2.3 </version>
97+ <version>1.2.4 </version>
9898 </dependency>
9999</dependencies>
100100```
@@ -123,23 +123,7 @@ dependencies {
123123</dependency>
124124```
125125
126- 2 . Use annotation [ ` @ComponentScan ` ] ( ) to scan all libraries
127-
128- ``` java
129-
130- @ComponentScan (basePackages = {
131- " com.reactify" , // Add required default: com.reactify
132- " com.example.myproject" // Change according to your project path
133- })
134- @SpringBootApplication
135- public class ExampleApplication {
136- public static void main (String [] args ) {
137- SpringApplication . run(Example . class, args);
138- }
139- }
140- ```
141-
142- 3 . Config your project file ` application.yml ` or ` application.properties `
126+ 2 . Config your project file ` application.yml ` or ` application.properties `
143127
144128- Required security configuration ` Oauth2 with Keycloak ` :
145129 - Install keycloak and postgresql on docker [ docker-compose] ( docker-compose.yml )
@@ -193,22 +177,6 @@ dependencies {
193177</dependency>
194178` ` `
195179
196- 2. Use annotation [`@ComponentScan`]() to scan all libraries
197-
198- ` ` ` java
199-
200- @ComponentScan(basePackages = {
201- "com.reactify", //Add required default: com.reactify
202- "com.example.myproject" //Change according to your project path
203- })
204- @SpringBootApplication
205- public class ExampleApplication {
206- public static void main(String[] args) {
207- SpringApplication.run(Example.class, args);
208- }
209- }
210- ` ` `
211-
212180# ## Reactify client configs
213181
2141821. Add the dependency in `build.gradle` or `maven` pom
@@ -227,23 +195,7 @@ dependencies {
227195</dependency>
228196` ` `
229197
230- 2. Use annotation [`@ComponentScan`]() to scan all libraries
231-
232- ` ` ` java
233-
234- @ComponentScan(basePackages = {
235- "com.reactify", //Add required default: com.reactify
236- "com.example.myproject" //Change according to your project path
237- })
238- @SpringBootApplication
239- public class ExampleApplication {
240- public static void main(String[] args) {
241- SpringApplication.run(Example.class, args);
242- }
243- }
244- ` ` `
245-
246- 3. Configuration in `application.yml` file
198+ 2. Configuration in `application.yml` file
247199
248200` ` ` yml
249201# web client config
@@ -260,7 +212,7 @@ client:
260212 write: 1000
261213` ` `
262214
263- 4 . Using Rest/Soap API calls
215+ 3 . Using Rest/Soap API calls
264216
265217 - See configuration demo in
266218 client [reactify-test](https://github.com/hoangtien2k3/reactify-core/tree/main/reactify-test/src/main/java/com/reactify/test/client)
@@ -283,28 +235,11 @@ dependencies {
283235</dependency>
284236` ` `
285237
286- 2. Use annotation [`@ComponentScan`]() to scan all libraries
287-
288- ` ` ` java
289-
290- @ComponentScan(basePackages = {
291- "com.reactify", //Add required default: com.reactify
292- "com.example.myproject" //Change according to your project path
293- })
294- @SpringBootApplication
295- public class ExampleApplication {
296- public static void main(String[] args) {
297- SpringApplication.run(Example.class, args);
298- }
299- }
300- ` ` `
301-
302238# # Features
303239
304240# ## Local cache
305241
306242` ` ` java
307-
308243@LocalCache(durationInMinute = 30, maxRecord = 10000, autoCache = true)
309244@GetMapping("/students")
310245public Mono<List<Student>> getStudents() {
@@ -323,21 +258,13 @@ public Mono<GeoPluginResponse> getBaseCurrency(String baseCurrency) {
323258 MultiValueMap<String, String> req = new LinkedMultiValueMap<>();
324259 req.set("base_currency", baseCurrency);
325260 return baseRestClientQualifier.get(baseCurrencyClient, "/json.gp", null, req, GeoPluginResponse.class)
326- .flatMap(optionalResponse -> optionalResponse
327- .map(Mono::just)
328- .orElseGet(Mono::empty)
329- );
261+ .flatMap(optionalResponse -> optionalResponse
262+ .map(Mono::just)
263+ .orElseGet(Mono::empty)
264+ );
330265}
331266` ` `
332267
333- # ## Data utils
334-
335- ` ` ` java
336- if(DataUtil.isNullOrEmpty(studentDemo)){
337- //TODO
338- }
339- ` ` `
340-
341268# # Project demo
342269
343270- Project using reactify-core library can be
0 commit comments