Skip to content

Commit 9f33d86

Browse files
authored
Merge branch 'master' into nestprojection
2 parents 26f33d1 + 346395d commit 9f33d86

File tree

7,429 files changed

+216373
-35998
lines changed

Some content is hidden

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

7,429 files changed

+216373
-35998
lines changed

.gitignore

+152-38
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,160 @@
1-
# Ignore all files
2-
*
3-
4-
# But not these directories and their contents
5-
!src/
6-
!src/main/
7-
!src/main/java/
8-
!src/test/
9-
!src/test/java/
10-
11-
# Do not ignore specific file types in the included directories
12-
!*.java
13-
!*.xml
14-
15-
# Do not ignore specific configuration files
16-
!.gitignore
17-
!pom.xml
18-
19-
# Ignore IDE-specific files
20-
# IntelliJ
21-
.idea/
22-
*.iml
1+
*/bin/*
2+
bin/
3+
4+
*.class
5+
6+
# Package Files #
7+
*.jar
8+
*.war
9+
*.ear
10+
2311

2412
# Eclipse
25-
.project
26-
.classpath
2713
.settings/
14+
*.project
15+
*.classpath
16+
.prefs
17+
*.prefs
18+
.metadata/
19+
20+
# Intellij
21+
.idea/
22+
*.iml
23+
*.iws
24+
out/
25+
26+
# VSCode
27+
.vscode/
2828

29-
# NetBeans
30-
nbproject/
31-
nbbuild/
32-
dist/
33-
nbdist/
34-
.nb-gradle/
29+
# Mac
30+
.DS_Store
3531

36-
# Ignore build output directories
32+
# Maven
33+
log/*
3734
target/
3835
build/
3936

40-
# Ignore temporary files and directories
41-
*.log
42-
*.tmp
43-
*.bak
44-
*.swp
45-
.DS_Store
46-
Thumbs.db
37+
# Gradle
38+
.gradle/
39+
40+
spring-openid/src/main/resources/application.properties
41+
.recommenders/
42+
/spring-hibernate4/nbproject/
43+
44+
spring-all/*.log
45+
46+
SpringDataInjectionDemo/.mvn/wrapper/maven-wrapper.properties
47+
48+
spring-call-getters-using-reflection/.mvn/wrapper/maven-wrapper.properties
49+
50+
spring-check-if-a-property-is-null/.mvn/wrapper/maven-wrapper.properties
51+
*.springBeans
52+
53+
20171220-JMeter.csv
54+
55+
.factorypath
56+
dependency-reduced-pom.xml
57+
*.so
58+
*.dylib
59+
*.dll
60+
61+
xml/src/test/resources/example_dom4j_new.xml
62+
xml/src/test/resources/example_dom4j_updated.xml
63+
xml/src/test/resources/example_jaxb_new.xml
64+
core-java-io/hard_link.txt
65+
core-java-io/target_link.txt
66+
core-java/src/main/java/com/baeldung/manifest/MANIFEST.MF
67+
ethereum/logs/
68+
testing-modules/jmeter/src/main/resources/*-JMeter.csv
69+
testing-modules/jmeter/src/main/resources/*-Basic*.csv
70+
testing-modules/jmeter/src/main/resources/*-JMeter*.csv
71+
testing-modules/jmeter/src/main/resources/*ReportsDashboard*.csv
72+
testing-modules/jmeter/src/main/resources/dashboard/*ReportsDashboard*.csv
73+
testing-modules/jmeter/src/main/resources/*FileExtractionExample.csv
74+
testing-modules/jmeter/src/main/resources/*_Summary-Report.csv
75+
76+
ninja/devDb.mv.db
77+
78+
**/node_modules/
79+
**/dist
80+
**/tmp
81+
**/out-tsc
82+
**/nbproject/
83+
**/nb-configuration.xml
84+
85+
86+
persistence-modules/hibernate5/transaction.log
87+
apache-avro/src/main/java/com/baeldung/avro/model/
88+
jta/transaction-logs/
89+
software-security/sql-injection-samples/derby.log
90+
spring-soap/src/main/java/com/baeldung/springsoap/gen/
91+
/report-*.json
92+
transaction.log
93+
*-shell.log
94+
customers.xml
95+
96+
apache-cxf/cxf-aegis/baeldung.xml
97+
testing-modules/report-*.json
98+
99+
libraries-2/*.db
100+
101+
apache-spark/data/output
102+
logs/
103+
libraries-data-io/*.docx
104+
persistence-modules/spring-hibernate-5/com.*
105+
spring-boot-modules/spring-boot-react/frontend/build
106+
spring-boot-modules/spring-boot-react/frontend/node
107+
spring-boot-modules/spring-boot-react/frontend/yarn.lock
108+
spring-boot-modules/spring-boot-properties-3/*.log
109+
spring-boot-modules/spring-boot-properties-3/*.gz
110+
111+
# SDKMan
112+
.sdkmanrc
113+
114+
# Localstack
115+
**/.localstack
116+
117+
#libraries-2
118+
libraries-2/employee*
119+
libraries-2/src/test/resources/crawler4j/**
120+
121+
#web-modules/ninja
122+
devDb*.db
123+
124+
#jaxb
125+
*.xjb
126+
127+
#neo4j
128+
persistence-modules/neo4j/data/**
129+
/deep-shallow-copy/.mvn/wrapper
130+
/deep-shallow-copy/mvnw
131+
/deep-shallow-copy/mvnw.cmd
132+
133+
#spring-5-webflux-2
134+
**/testdb.mv.db
135+
136+
/patterns-modules/design-patterns-creational-2/app.log
137+
/microservices-modules/micronaut-reactive/.micronaut/test-resources/test-resources.properties
138+
/libraries-security/src/main/resources/home/upload/test_file_SCP.txt
139+
/libraries-security/src/main/resources/home/upload/test_file_SFTP.txt
140+
/libraries-data-io/src/test/resources/protocols/gson_user.json
141+
/libraries-io/src/main/resources/application.csv
142+
/libraries-io/src/main/resources/application2.csv
143+
/libraries-io/src/main/resources/application3.csv
144+
/libraries-io/src/main/resources/application4.csv
145+
/persistence-modules/hibernate6/finalRecordingTestMvn.jfr
146+
/core-java-modules/core-java-io-conversions-3/src/test/resources/xlsxToCsv_output.csv
147+
/core-java-modules/core-java-io-5/output.txt
148+
/core-java-modules/core-java-io-apis-2/sample.txt
149+
/persistence-modules/core-java-persistence-3/test.mv.db
150+
/apache-libraries/src/main/java/com/baeldung/apache/avro/
151+
/apache-libraries-2/cars.avro
152+
153+
#spring-cloud
154+
/spring-cloud-modules/spring-cloud-bootstrap/gateway/src/main/resources/static/home/3rdpartylicenses.txt
155+
/spring-cloud-modules/spring-cloud-bootstrap/gateway/src/main/resources/static/home/prerendered-routes.json
156+
/spring-cloud-modules/spring-cloud-bootstrap/gateway/src/main/resources/static/home/browser/*
157+
/spring-cloud-modules/spring-cloud-bootstrap/gateway/src/main/resources/static/home/server/*
158+
159+
/web-modules/linkrest/src/main/java/com/baeldung/cayenne/auto/_Department.java
160+
/web-modules/linkrest/src/main/java/com/baeldung/cayenne/auto/_Employee.java

README.md

+19-15
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
If you are getting an error while cloning the repository, try running:
44
git config --global http.postBuffer 5000000
55

6-
This will increase the size of the buffer from the default 1MiB to 5MiB.
6+
This will increase the buffer size from the default 1MiB to 5MiB.
77

88
To revert this value to the default, use:
99
git config --global http.postBuffer 1000000
@@ -27,32 +27,36 @@ The Courses
2727
Java and Spring Tutorials
2828
================
2929

30-
This project is **a collection of small and focused tutorials** - each covering a single and well defined area of development in the Java ecosystem.
31-
A strong focus of these is, of course, the Spring Framework - Spring, Spring Boot and Spring Security.
32-
In addition to Spring, the modules here cover a number of aspects of Java.
30+
This project is **a collection of small and focused tutorials** - each covering a single and well-defined area of development in the Java ecosystem.
31+
A strong focus of these is the Spring Framework - Spring, Spring Boot and Spring Security.
32+
In addition to Spring, the modules here cover several aspects of Java.
3333

34-
Profile based segregation
34+
Profile-based segregation
3535
====================
3636

37-
We are using maven build profiles to segregate the huge list of individual projects we have in our repository.
37+
We use Maven build profiles to segregate the huge list of individual projects in our repository.
3838

39-
The projects are broadly divided into 3 lists: default, default-jdk8 and default-heavy.
39+
The projects are broadly divided into 4 lists: default, default-jdk17, default-jdk8 and default-heavy.
4040

41-
Next, they are segregated further on the basis of the tests that we want to execute.
42-
43-
Additionally, there are 2 profiles dedicated for JDK17 and above builds - **which require JDK 17**.
41+
Next, they are segregated further based on the tests that we want to execute.
4442

4543
We also have a parents profile to build only parent modules.
4644

47-
Therefore, we have a total of 7 profiles:
45+
Therefore, we have a total of 9 profiles:
4846

4947
| Profile | Includes | Type of test enabled |
50-
|-------------------|-----------------------------| -------------------- |
51-
| default | JDK17 and above projects | *UnitTest |
52-
| integration | JDK17 and above projects | *IntegrationTest |
48+
|-------------------|-----------------------------|----------------------|
49+
| default | JDK21 projects | *UnitTest |
50+
| integration | JDK21 projects | *IntegrationTest |
51+
| default-jdk17 | JDK17 projects | *UnitTest |
52+
| integration-jdk17 | JDK17 projects | *IntegrationTest |
53+
| default-jdk22 | JDK22 projects | *UnitTest |
54+
| integration-jdk22 | JDK22 projects | *IntegrationTest |
55+
| default-jdk23 | JDK23 projects | *UnitTest |
56+
| integration-jdk23 | JDK23 projects | *IntegrationTest |
5357
| default-heavy | Heavy/long running projects | *UnitTest |
5458
| integration-heavy | Heavy/long running projects | *IntegrationTest |
55-
| default-jd8 | JDK8 projects | *UnitTest |
59+
| default-jdk8 | JDK8 projects | *UnitTest |
5660
| integration-jdk8 | JDK8 projects | *IntegrationTest |
5761
| parents | Set of parent modules | None |
5862

akka-modules/spring-akka/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
</dependencyManagement>
4444

4545
<properties>
46-
<spring.version>5.3.25</spring.version>
47-
<akka.version>2.4.14</akka.version>
46+
<spring.version>6.1.5</spring.version>
47+
<akka.version>2.4.17</akka.version>
4848
</properties>
4949

5050
</project>

algorithms-modules/algorithms-miscellaneous-1/README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ This module contains articles about algorithms. Some classes of algorithms, e.g.
55

66
### Relevant articles:
77

8-
- [Validating Input with Finite Automata in Java](https://www.baeldung.com/java-finite-automata)
9-
- [Example of Hill Climbing Algorithm in Java](https://www.baeldung.com/java-hill-climbing-algorithm)
10-
- [Introduction to Minimax Algorithm with a Java Implementation](https://www.baeldung.com/java-minimax-algorithm)
11-
- [How to Calculate Levenshtein Distance in Java?](https://www.baeldung.com/java-levenshtein-distance)
12-
- [How to Find the Kth Largest Element in Java](https://www.baeldung.com/java-kth-largest-element)
8+
- [Dijkstra Shortest Path Algorithm in Java](https://www.baeldung.com/java-dijkstra)
9+
- [Implementing Simple State Machines with Java Enums](https://www.baeldung.com/java-enum-simple-state-machine)
10+
- [Permutations of an Array in Java](https://www.baeldung.com/java-array-permutations)
11+
- [Maximum Subarray Problem in Java](https://www.baeldung.com/java-maximum-subarray)
12+
- [Converting Between Byte Arrays and Hexadecimal Strings in Java](https://www.baeldung.com/java-byte-arrays-hex-strings)
13+
- [Calculate Distance Between Two Coordinates in Java](https://www.baeldung.com/java-find-distance-between-points)
1314
- More articles: [[next -->]](/algorithms-miscellaneous-2)

algorithms-modules/algorithms-miscellaneous-1/pom.xml

+11
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
<artifactId>combinatoricslib3</artifactId>
3636
<version>${combinatoricslib3.version}</version>
3737
</dependency>
38+
<dependency>
39+
<groupId>jakarta.xml.bind</groupId>
40+
<artifactId>jakarta.xml.bind-api</artifactId>
41+
<version>${xml-bind-api.version}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>com.google.guava</groupId>
45+
<artifactId>guava</artifactId>
46+
<version>${guava.version}</version>
47+
</dependency>
3848
</dependencies>
3949

4050
<reporting>
@@ -59,6 +69,7 @@
5969

6070
<properties>
6171
<combinatoricslib3.version>3.3.0</combinatoricslib3.version>
72+
<xml-bind-api.version>4.0.0</xml-bind-api.version>
6273
</properties>
6374

6475
</project>
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package com.baeldung.algorithms.conversion;
22

3-
import com.google.common.io.BaseEncoding;
4-
import jakarta.xml.bind.DatatypeConverter;
3+
import java.math.BigInteger;
4+
import java.util.HexFormat;
5+
56
import org.apache.commons.codec.DecoderException;
67
import org.apache.commons.codec.binary.Hex;
78

8-
import java.math.BigInteger;
9-
import java.util.HexFormat;
9+
import com.google.common.io.BaseEncoding;
10+
11+
import jakarta.xml.bind.DatatypeConverter;
1012

1113
public class HexStringConverter {
1214

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.algorithms.ga.dijkstra;
1+
package com.baeldung.algorithms.dijkstra;
22

33
import java.util.HashSet;
44
import java.util.LinkedList;
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.algorithms.ga.dijkstra;
1+
package com.baeldung.algorithms.dijkstra;
22

33
import java.util.HashSet;
44
import java.util.Set;
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.algorithms.ga.dijkstra;
1+
package com.baeldung.algorithms.dijkstra;
22

33
import java.util.HashMap;
44
import java.util.LinkedList;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.baeldung.algorithms.enumstatemachine;
2+
3+
public enum LeaveRequestState {
4+
5+
Submitted {
6+
@Override
7+
public LeaveRequestState nextState() {
8+
System.out.println("Starting the Leave Request and sending to Team Leader for approval.");
9+
return Escalated;
10+
}
11+
12+
@Override
13+
public String responsiblePerson() {
14+
return "Employee";
15+
}
16+
},
17+
Escalated {
18+
@Override
19+
public LeaveRequestState nextState() {
20+
System.out.println("Reviewing the Leave Request and escalating to Department Manager.");
21+
return Approved;
22+
}
23+
24+
@Override
25+
public String responsiblePerson() {
26+
return "Team Leader";
27+
}
28+
},
29+
Approved {
30+
@Override
31+
public LeaveRequestState nextState() {
32+
System.out.println("Approving the Leave Request.");
33+
return this;
34+
}
35+
36+
@Override
37+
public String responsiblePerson() {
38+
return "Department Manager";
39+
}
40+
};
41+
42+
public abstract String responsiblePerson();
43+
44+
public abstract LeaveRequestState nextState();
45+
46+
}

0 commit comments

Comments
 (0)