Skip to content

Commit cf25f60

Browse files
committed
java docs
1 parent 596b512 commit cf25f60

File tree

100 files changed

+6847
-5516
lines changed

Some content is hidden

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

100 files changed

+6847
-5516
lines changed

pom.xml

Lines changed: 108 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,43 @@
88
<version>3.3.2</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
11-
<groupId>io.hoangtien2k3</groupId>
11+
12+
<groupId>io.github.hoangtien2k3</groupId>
1213
<artifactId>fw-commons</artifactId>
1314
<version>${version.lib}</version>
15+
<packaging>jar</packaging>
1416
<name>fw-commons</name>
1517
<description>a commons java tool lib with spring boot framework</description>
16-
<url/>
18+
<url>https://github.com/hoangtien2k3/fw-commons</url>
19+
1720
<licenses>
1821
<license>
19-
<name>Apache License, Version 2.0</name>
20-
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
21-
<distribution>repo</distribution>
22+
<name>MIT License</name>
23+
<url>https://www.opensource.org/licenses/mit-license.php</url>
2224
</license>
2325
</licenses>
2426
<developers>
2527
<developer>
26-
<id>io.hoangtien2k3</id>
27-
<name>hoangtien2k3</name>
28+
<name>Hoàng Anh Tiến</name>
2829
<email>[email protected]</email>
29-
<url>https://hoangtien2k3.github.io</url>
30+
<organization>io.hoangtien2k3</organization>
31+
<organizationUrl>https://github.com/hoangtien2k3</organizationUrl>
3032
</developer>
3133
</developers>
3234
<scm>
3335
<connection>scm:git:git://github.com/hoangtien2k3/fw-commons.git</connection>
3436
<developerConnection>scm:git:ssh://[email protected]:hoangtien2k3/fw-commons.git</developerConnection>
3537
<url>https://github.com/hoangtien2k3/fw-commons</url>
36-
<tag>HEAD</tag>
3738
</scm>
3839
<distributionManagement>
40+
<snapshotRepository>
41+
<id>ossrh</id>
42+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
43+
</snapshotRepository>
3944
<repository>
40-
<id>sonatype-nexus-staging</id>
45+
<id>ossrh</id>
4146
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
4247
</repository>
43-
<snapshotRepository>
44-
<id>sonatype-nexus-snapshots</id>
45-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
46-
</snapshotRepository>
4748
</distributionManagement>
4849

4950
<properties>
@@ -64,6 +65,14 @@
6465
<jackson.databind.version>2.17.1</jackson.databind.version>
6566
<spotless.version>2.43.0</spotless.version>
6667
<file.encoding>UTF-8</file.encoding>
68+
<!-- Plugins version -->
69+
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
70+
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
71+
<central-publishing-maven-plugin.version>0.3.0</central-publishing-maven-plugin.version>
72+
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
73+
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
74+
<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
75+
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
6776
</properties>
6877

6978
<dependencyManagement>
@@ -374,18 +383,6 @@
374383
<artifactId>spring-boot-starter-data-r2dbc</artifactId>
375384
</dependency>
376385

377-
<!-- &lt;!&ndash; config file .env &ndash;&gt;-->
378-
<!-- <dependency>-->
379-
<!-- <groupId>io.github.cdimascio</groupId>-->
380-
<!-- <artifactId>java-dotenv</artifactId>-->
381-
<!-- <version>5.2.2</version>-->
382-
<!-- </dependency>-->
383-
<!-- <dependency>-->
384-
<!-- <groupId>org.springframework.boot</groupId>-->
385-
<!-- <artifactId>spring-boot-configuration-processor</artifactId>-->
386-
<!-- <version>3.3.2</version>-->
387-
<!-- </dependency>-->
388-
389386
<dependency>
390387
<groupId>org.springframework.boot</groupId>
391388
<artifactId>spring-boot-starter-test</artifactId>
@@ -399,101 +396,46 @@
399396
</dependencies>
400397

401398
<build>
402-
<defaultGoal>install</defaultGoal>
403399
<plugins>
404400
<plugin>
405401
<groupId>org.apache.maven.plugins</groupId>
406402
<artifactId>maven-compiler-plugin</artifactId>
403+
<version>${maven-compiler-plugin.version}</version>
407404
<configuration>
408-
<source>21</source>
409-
<target>21</target>
405+
<source>${java.version}</source>
406+
<target>${java.version}</target>
410407
</configuration>
411408
</plugin>
412-
413409
<plugin>
414-
<groupId>org.springframework.boot</groupId>
415-
<artifactId>spring-boot-maven-plugin</artifactId>
416-
</plugin>
417-
418-
<plugin>
419-
<groupId>com.diffplug.spotless</groupId>
420-
<artifactId>spotless-maven-plugin</artifactId>
421-
<version>${spotless.version}</version>
410+
<groupId>org.sonatype.central</groupId>
411+
<artifactId>central-publishing-maven-plugin</artifactId>
412+
<version>${central-publishing-maven-plugin.version}</version>
413+
<extensions>true</extensions>
422414
<configuration>
423-
<!--<ratchetFrom>origin/main</ratchetFrom>-->
424-
<formats>
425-
<format>
426-
<includes>
427-
<include>.gitignore</include>
428-
</includes>
429-
<toggleOffOn/>
430-
<trimTrailingWhitespace/>
431-
<endWithNewline/>
432-
<indent>
433-
<tabs>true</tabs>
434-
<spacesPerTab>4</spacesPerTab>
435-
</indent>
436-
</format>
437-
</formats>
438-
<java>
439-
<includes>
440-
<include>src/main/java/**/*.java</include>
441-
<include>src/test/java/**/*.java</include>
442-
</includes>
443-
<formatAnnotations/>
444-
<removeUnusedImports/>
445-
<palantirJavaFormat/>
446-
<importOrder>
447-
<order>java,jakarta,javax,org,com,com.diffplug,com.ezbuy,</order>
448-
</importOrder>
449-
<!-- <licenseHeader>-->
450-
<!-- <content><![CDATA[-->
451-
<!--/*-->
452-
<!-- * Copyright $YEAR author - Hoàng Anh Tiến-->
453-
<!-- *-->
454-
<!-- * Licensed under the Apache License, Version 2.0 (the "License");-->
455-
<!-- * you may not use this file except in compliance with the License.-->
456-
<!-- * You may obtain a copy of the License at-->
457-
<!-- *-->
458-
<!-- * https://www.apache.org/licenses/LICENSE-2.0-->
459-
<!-- *-->
460-
<!-- * Unless required by applicable law or agreed to in writing, software-->
461-
<!-- * distributed under the License is distributed on an "AS IS" BASIS,-->
462-
<!-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-->
463-
<!-- * See the License for the specific language governing permissions and-->
464-
<!-- * limitations under the License.-->
465-
<!-- */-->
466-
<!-- ]]></content>-->
467-
<!-- </licenseHeader>-->
468-
</java>
415+
<publishingServerId>central</publishingServerId>
416+
<tokenAuth>true</tokenAuth>
469417
</configuration>
470-
<executions>
471-
<execution>
472-
<phase>compile</phase>
473-
<goals>
474-
<goal>apply</goal>
475-
</goals>
476-
</execution>
477-
</executions>
478418
</plugin>
479-
480419
<plugin>
481420
<groupId>org.apache.maven.plugins</groupId>
482421
<artifactId>maven-source-plugin</artifactId>
483-
<version>3.2.1</version>
422+
<version>${maven-source-plugin.version}</version>
484423
<executions>
485424
<execution>
486425
<id>attach-sources</id>
487426
<goals>
488-
<goal>jar</goal>
427+
<goal>jar-no-fork</goal>
489428
</goals>
490429
</execution>
491430
</executions>
492431
</plugin>
493432
<plugin>
494433
<groupId>org.apache.maven.plugins</groupId>
495434
<artifactId>maven-javadoc-plugin</artifactId>
496-
<version>3.3.1</version>
435+
<version>${maven-javadoc-plugin.version}</version>
436+
<configuration>
437+
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
438+
</configuration>
497439
<executions>
498440
<execution>
499441
<id>attach-javadocs</id>
@@ -506,29 +448,95 @@
506448
<plugin>
507449
<groupId>org.apache.maven.plugins</groupId>
508450
<artifactId>maven-gpg-plugin</artifactId>
509-
<version>3.0.1</version>
451+
<version>${maven-gpg-plugin.version}</version>
510452
<executions>
511453
<execution>
512454
<id>sign-artifacts</id>
513455
<phase>verify</phase>
514456
<goals>
515457
<goal>sign</goal>
516458
</goals>
459+
<configuration>
460+
<keyname>0x2365862B</keyname>
461+
<gpgArguments>
462+
<arg>--pinentry-mode</arg>
463+
<arg>loopback</arg>
464+
</gpgArguments>
465+
</configuration>
517466
</execution>
518467
</executions>
519468
</plugin>
520469
<plugin>
521470
<groupId>org.sonatype.plugins</groupId>
522471
<artifactId>nexus-staging-maven-plugin</artifactId>
523-
<version>1.6.8</version>
472+
<version>${nexus-staging-maven-plugin.version}</version>
524473
<extensions>true</extensions>
525474
<configuration>
526475
<serverId>ossrh</serverId>
527-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
476+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
528477
<autoReleaseAfterClose>true</autoReleaseAfterClose>
529478
</configuration>
530479
</plugin>
531-
480+
<plugin>
481+
<groupId>org.springframework.boot</groupId>
482+
<artifactId>spring-boot-maven-plugin</artifactId>
483+
<configuration>
484+
<excludes>
485+
<exclude>
486+
<groupId>org.projectlombok</groupId>
487+
<artifactId>lombok</artifactId>
488+
</exclude>
489+
</excludes>
490+
<skip>true</skip>
491+
</configuration>
492+
</plugin>
493+
<plugin>
494+
<groupId>com.diffplug.spotless</groupId>
495+
<artifactId>spotless-maven-plugin</artifactId>
496+
<version>${spotless.version}</version>
497+
<configuration>
498+
<java>
499+
<eclipse>
500+
</eclipse>
501+
<indent>
502+
<tabs>true</tabs>
503+
<spacesPerTab>2</spacesPerTab>
504+
</indent>
505+
<indent>
506+
<spaces>true</spaces>
507+
<spacesPerTab>2</spacesPerTab>
508+
</indent>
509+
<removeUnusedImports/>
510+
<licenseHeader>
511+
<content><![CDATA[
512+
/*
513+
* Copyright $YEAR author - Hoàng Anh Tiến
514+
*
515+
* Permission is hereby granted, free of charge, to any person obtaining a copy
516+
* of this software and associated documentation files (the "Software"), to deal
517+
* in the Software without restriction, including without limitation the rights
518+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
519+
* copies of the Software, and to permit persons to whom the Software is
520+
* furnished to do so, subject to the following conditions:
521+
*
522+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
523+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
524+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
525+
*/
526+
]]></content>
527+
</licenseHeader>
528+
</java>
529+
</configuration>
530+
<executions>
531+
<execution>
532+
<id>java-formatter</id>
533+
<goals>
534+
<goal>check</goal>
535+
</goals>
536+
<phase>validate</phase>
537+
</execution>
538+
</executions>
539+
</plugin>
532540
</plugins>
533541
</build>
534542

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/*
2+
* Copyright 2024 author - Hoàng Anh Tiến
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14+
*/
115
package io.hoangtien2k3.commons.annotations;
216

317
import java.lang.annotation.ElementType;
@@ -8,9 +22,9 @@
822
@Target(ElementType.METHOD)
923
@Retention(RetentionPolicy.RUNTIME)
1024
public @interface LocalCache {
11-
int durationInMinute() default 120;
25+
int durationInMinute() default 120;
1226

13-
int maxRecord() default 1000;
27+
int maxRecord() default 1000;
1428

15-
boolean autoCache() default false;
29+
boolean autoCache() default false;
1630
}
Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/*
2+
* Copyright 2024 author - Hoàng Anh Tiến
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14+
*/
115
package io.hoangtien2k3.commons.annotations;
216

317
import java.lang.annotation.ElementType;
@@ -8,13 +22,13 @@
822
@Target({ElementType.METHOD, ElementType.TYPE})
923
@Retention(RetentionPolicy.RUNTIME)
1024
public @interface LogPerformance {
11-
String logType() default "";
25+
String logType() default "";
1226

13-
String actionType() default "";
27+
String actionType() default "";
1428

15-
boolean logOutput() default true;
29+
boolean logOutput() default true;
1630

17-
boolean logInput() default true;
31+
boolean logInput() default true;
1832

19-
String title() default "";
33+
String title() default "";
2034
}

0 commit comments

Comments
 (0)