Skip to content

Commit cfafce2

Browse files
committed
reactify-core
1 parent 115d09f commit cfafce2

File tree

26 files changed

+362
-125
lines changed

26 files changed

+362
-125
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
<module>reactify-cache</module>
9292
<module>reactify-client</module>
9393
<module>reactify-core</module>
94+
<module>reactify-exception</module>
9495
<module>reactify-keycloak</module>
9596
<module>reactify-logging</module>
9697
<module>reactify-minio</module>

reactify-cache/pom.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<!-- =========================================== -->
7474
<properties>
7575
<java.version>21</java.version>
76+
<spotless.version>2.43.0</spotless.version>
7677
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
7778
<central-publishing-maven-plugin.version>0.6.0</central-publishing-maven-plugin.version>
7879
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
@@ -235,6 +236,58 @@
235236
</archive>
236237
</configuration>
237238
</plugin>
239+
<plugin>
240+
<groupId>com.diffplug.spotless</groupId>
241+
<artifactId>spotless-maven-plugin</artifactId>
242+
<version>${spotless.version}</version>
243+
<configuration>
244+
<java>
245+
<eclipse>
246+
</eclipse>
247+
<indent>
248+
<tabs>true</tabs>
249+
<spacesPerTab>2</spacesPerTab>
250+
</indent>
251+
<indent>
252+
<spaces>true</spaces>
253+
<spacesPerTab>2</spacesPerTab>
254+
</indent>
255+
<removeUnusedImports/>
256+
<palantirJavaFormat/>
257+
</java>
258+
</configuration>
259+
<executions>
260+
<execution>
261+
<id>java-formatter</id>
262+
<goals>
263+
<goal>check</goal>
264+
</goals>
265+
<phase>validate</phase>
266+
</execution>
267+
</executions>
268+
</plugin>
269+
<plugin>
270+
<groupId>com.mycila</groupId>
271+
<artifactId>license-maven-plugin</artifactId>
272+
<version>4.0.rc2</version>
273+
<configuration>
274+
<licenseSets>
275+
<licenseSet>
276+
<header>${project.basedir}/src/main/resources/HEADER.txt</header>
277+
<includes>
278+
<include>**/*.java</include>
279+
</includes>
280+
</licenseSet>
281+
</licenseSets>
282+
</configuration>
283+
<executions>
284+
<execution>
285+
<goals>
286+
<goal>format</goal>
287+
</goals>
288+
</execution>
289+
</executions>
290+
</plugin>
238291
</plugins>
239292
</build>
240293
</project>

reactify-cache/src/main/java/com/reactify/CacheAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
/**
77
* Autoconfiguration for the reactify-cache library.
88
* <p>
9-
* Automatically scans and registers components in the <code>com.reactify</code> package,
10-
* enabling seamless integration with Spring Boot.
9+
* Automatically scans and registers components in the <code>com.reactify</code>
10+
* package, enabling seamless integration with Spring Boot.
1111
* </p>
1212
*
1313
* <h3>Usage:</h3>
14+
*
1415
* <pre>
1516
* Add the reactify-cache dependency, and Spring Boot will configure its components automatically.
1617
* </pre>
@@ -20,5 +21,4 @@
2021
*/
2122
@Configuration
2223
@ComponentScan(basePackages = "com.reactify")
23-
public class CacheAutoConfiguration {
24-
}
24+
public class CacheAutoConfiguration {}

reactify-client/pom.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<!-- =========================================== -->
7474
<properties>
7575
<java.version>21</java.version>
76+
<spotless.version>2.43.0</spotless.version>
7677
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
7778
<central-publishing-maven-plugin.version>0.6.0</central-publishing-maven-plugin.version>
7879
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
@@ -210,6 +211,58 @@
210211
</archive>
211212
</configuration>
212213
</plugin>
214+
<plugin>
215+
<groupId>com.diffplug.spotless</groupId>
216+
<artifactId>spotless-maven-plugin</artifactId>
217+
<version>${spotless.version}</version>
218+
<configuration>
219+
<java>
220+
<eclipse>
221+
</eclipse>
222+
<indent>
223+
<tabs>true</tabs>
224+
<spacesPerTab>2</spacesPerTab>
225+
</indent>
226+
<indent>
227+
<spaces>true</spaces>
228+
<spacesPerTab>2</spacesPerTab>
229+
</indent>
230+
<removeUnusedImports/>
231+
<palantirJavaFormat/>
232+
</java>
233+
</configuration>
234+
<executions>
235+
<execution>
236+
<id>java-formatter</id>
237+
<goals>
238+
<goal>check</goal>
239+
</goals>
240+
<phase>validate</phase>
241+
</execution>
242+
</executions>
243+
</plugin>
244+
<plugin>
245+
<groupId>com.mycila</groupId>
246+
<artifactId>license-maven-plugin</artifactId>
247+
<version>4.0.rc2</version>
248+
<configuration>
249+
<licenseSets>
250+
<licenseSet>
251+
<header>${project.basedir}/src/main/resources/HEADER.txt</header>
252+
<includes>
253+
<include>**/*.java</include>
254+
</includes>
255+
</licenseSet>
256+
</licenseSets>
257+
</configuration>
258+
<executions>
259+
<execution>
260+
<goals>
261+
<goal>format</goal>
262+
</goals>
263+
</execution>
264+
</executions>
265+
</plugin>
213266
</plugins>
214267
</build>
215268
</project>

reactify-client/src/main/java/com/reactify/ClientAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
/**
77
* Autoconfiguration for the reactify-client library.
88
* <p>
9-
* Automatically scans and registers components in the <code>com.reactify</code> package,
10-
* enabling seamless integration with Spring Boot.
9+
* Automatically scans and registers components in the <code>com.reactify</code>
10+
* package, enabling seamless integration with Spring Boot.
1111
* </p>
1212
*
1313
* <h3>Usage:</h3>
14+
*
1415
* <pre>
1516
* Add the reactify-client dependency, and Spring Boot will configure its components automatically.
1617
* </pre>
@@ -20,5 +21,4 @@
2021
*/
2122
@Configuration
2223
@ComponentScan(basePackages = "com.reactify")
23-
public class ClientAutoConfiguration {
24-
}
24+
public class ClientAutoConfiguration {}

reactify-client/src/main/java/com/reactify/filter/properties/WebClientProperties.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package com.reactify.filter.properties;
1717

1818
import java.util.List;
19-
import java.util.Objects;
2019
import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
2120

2221
/**

reactify-exception/pom.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
<!-- =========================================== -->
7373
<properties>
7474
<java.version>21</java.version>
75+
<spotless.version>2.43.0</spotless.version>
7576
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
7677
<central-publishing-maven-plugin.version>0.6.0</central-publishing-maven-plugin.version>
7778
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
@@ -209,6 +210,58 @@
209210
</archive>
210211
</configuration>
211212
</plugin>
213+
<plugin>
214+
<groupId>com.diffplug.spotless</groupId>
215+
<artifactId>spotless-maven-plugin</artifactId>
216+
<version>${spotless.version}</version>
217+
<configuration>
218+
<java>
219+
<eclipse>
220+
</eclipse>
221+
<indent>
222+
<tabs>true</tabs>
223+
<spacesPerTab>2</spacesPerTab>
224+
</indent>
225+
<indent>
226+
<spaces>true</spaces>
227+
<spacesPerTab>2</spacesPerTab>
228+
</indent>
229+
<removeUnusedImports/>
230+
<palantirJavaFormat/>
231+
</java>
232+
</configuration>
233+
<executions>
234+
<execution>
235+
<id>java-formatter</id>
236+
<goals>
237+
<goal>check</goal>
238+
</goals>
239+
<phase>validate</phase>
240+
</execution>
241+
</executions>
242+
</plugin>
243+
<plugin>
244+
<groupId>com.mycila</groupId>
245+
<artifactId>license-maven-plugin</artifactId>
246+
<version>4.0.rc2</version>
247+
<configuration>
248+
<licenseSets>
249+
<licenseSet>
250+
<header>${project.basedir}/src/main/resources/HEADER.txt</header>
251+
<includes>
252+
<include>**/*.java</include>
253+
</includes>
254+
</licenseSet>
255+
</licenseSets>
256+
</configuration>
257+
<executions>
258+
<execution>
259+
<goals>
260+
<goal>format</goal>
261+
</goals>
262+
</execution>
263+
</executions>
264+
</plugin>
212265
</plugins>
213266
</build>
214267
</project>

reactify-exception/src/main/java/com/reactify/ExceptionAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
/**
77
* Autoconfiguration for the reactify-exception library.
88
* <p>
9-
* Automatically scans and registers components in the <code>com.reactify</code> package,
10-
* enabling seamless integration with Spring Boot.
9+
* Automatically scans and registers components in the <code>com.reactify</code>
10+
* package, enabling seamless integration with Spring Boot.
1111
* </p>
1212
*
1313
* <h3>Usage:</h3>
14+
*
1415
* <pre>
1516
* Add the reactify-exception dependency, and Spring Boot will configure its components automatically.
1617
* </pre>
@@ -20,5 +21,4 @@
2021
*/
2122
@Configuration
2223
@ComponentScan(basePackages = "com.reactify")
23-
public class ExceptionAutoConfiguration {
24-
}
24+
public class ExceptionAutoConfiguration {}

reactify-logging/src/main/java/com/reactify/LoggerAspect.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@
3737
* </p>
3838
*
3939
* <p>
40-
* The class is annotated with {@link Aspect} to
41-
* define it as an aspect, and
42-
* {@link Configuration} to indicate that
43-
* it provides Spring configuration.
40+
* The class is annotated with {@link Aspect} to define it as an aspect, and
41+
* {@link Configuration} to indicate that it provides Spring configuration.
4442
* </p>
4543
*
4644
* <p>
@@ -73,8 +71,7 @@ public void performancePointCut() {}
7371

7472
/**
7573
* <p>
76-
* Pointcut for methods annotated with
77-
* {@link LogPerformance}.
74+
* Pointcut for methods annotated with {@link LogPerformance}.
7875
* </p>
7976
*/
8077
@Pointcut("@annotation(com.reactify.LogPerformance)")

reactify-logging/src/main/java/com/reactify/LoggerAspectUtils.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,16 @@ public Mono<Object> logAround(ProceedingJoinPoint joinPoint) throws Throwable {
135135
}
136136
if (result instanceof Flux<?> fluxResult) {
137137
return logFluxResult(
138-
joinPoint,
139-
start,
140-
fluxResult.cast(Object.class),
141-
newSpan,
142-
name,
143-
logType,
144-
actionType,
145-
logOutput,
146-
logInput,
147-
title)
138+
joinPoint,
139+
start,
140+
fluxResult.cast(Object.class),
141+
newSpan,
142+
name,
143+
logType,
144+
actionType,
145+
logOutput,
146+
logInput,
147+
title)
148148
.collectList()
149149
.map(list -> list);
150150
} else {

0 commit comments

Comments
 (0)