Merge pull request #30 from eugenp/master

update
This commit is contained in:
Maiklins 2020-02-01 16:36:07 +01:00 committed by GitHub
commit 20302f8baf
212 changed files with 847 additions and 877 deletions

View File

@ -13,4 +13,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g.
- [Create a Sudoku Solver in Java](https://www.baeldung.com/java-sudoku)
- [Displaying Money Amounts in Words](https://www.baeldung.com/java-money-into-words)
- [A Collaborative Filtering Recommendation System in Java](https://www.baeldung.com/java-collaborative-filtering-recommendations)
- [Implementing A* Pathfinding in Java](https://www.baeldung.com/java-a-star-pathfinding)
- More articles: [[<-- prev]](/../algorithms-miscellaneous-1) [[next -->]](/../algorithms-miscellaneous-3)

View File

@ -12,4 +12,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g.
- [How to Determine if a Binary Tree is Balanced](https://www.baeldung.com/java-balanced-binary-tree)
- [The Caesar Cipher in Java](https://www.baeldung.com/java-caesar-cipher)
- [Overview of Combinatorial Problems in Java](https://www.baeldung.com/java-combinatorial-algorithms)
- [Prims Algorithm](https://www.baeldung.com/java-prim-algorithm)
- More articles: [[<-- prev]](/../algorithms-miscellaneous-4)

View File

@ -7,4 +7,4 @@ This module contains articles about Apache Spark
- [Introduction to Apache Spark](https://www.baeldung.com/apache-spark)
- [Building a Data Pipeline with Kafka, Spark Streaming and Cassandra](https://www.baeldung.com/kafka-spark-data-pipeline)
- [Machine Learning with Spark MLlib](https://www.baeldung.com/spark-mlib-machine-learning)
- [Introduction to Spark Graph Processing with GraphFrames](https://www.baeldung.com/spark-graph-graphframes)

View File

@ -0,0 +1,3 @@
### Relevant Articles
- [Intro to Apache Tapestry](https://www.baeldung.com/apache-tapestry)

View File

@ -77,7 +77,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>3.3.0-01</version>
<version>${groovy.compiler.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>

View File

@ -28,17 +28,16 @@ class CategoryUnitTest extends GroovyTestCase {
}
}
// http://team.baeldung.com/browse/BAEL-20687
// void test_whenUsingTimeCategory_thenOperationOnNumber() {
// SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy")
// use (TimeCategory) {
// assert sdf.format(5.days.from.now) == sdf.format(new Date() + 5.days)
//
// sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss")
// assert sdf.format(10.minutes.from.now) == sdf.format(new Date() + 10.minutes)
// assert sdf.format(2.hours.ago) == sdf.format(new Date() - 2.hours)
// }
// }
void test_whenUsingTimeCategory_thenOperationOnNumber() {
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy")
use (TimeCategory) {
assert sdf.format(5.days.from.now) == sdf.format(new Date() + 5.days)
sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss")
assert sdf.format(10.minutes.from.now) == sdf.format(new Date() + 10.minutes)
assert sdf.format(2.hours.ago) == sdf.format(new Date() - 2.hours)
}
}
void test_whenUsingDOMCategory_thenOperationOnXML() {

View File

@ -75,7 +75,6 @@ class WebserviceManualTest extends GroovyTestCase {
assert stories.size() == 5
}
/* see BAEL-3753
void test_whenConsumingSoap_thenReceiveResponse() {
def url = "http://www.dataaccess.com/webservicesserver/numberconversion.wso"
def soapClient = new SOAPClient(url)
@ -90,7 +89,6 @@ class WebserviceManualTest extends GroovyTestCase {
def words = response.NumberToWordsResponse
assert words == "one thousand two hundred and thirty four "
}
*/
void test_whenConsumingRestGet_thenReceiveResponse() {
def path = "/get"

View File

@ -33,7 +33,6 @@ class ReadFileUnitTest extends Specification {
assert lines.size(), 3
}
@Ignore
def 'Should return file content in string using ReadFile.readFileString given filePath' () {
given:
def filePath = "src/main/resources/fileContent.txt"

View File

@ -65,7 +65,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>${shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
@ -109,6 +109,7 @@
<uberjar.name>benchmarks</uberjar.name>
<jmh.version>1.22</jmh.version>
<eclipse.collections.version>10.0.0</eclipse.collections.version>
<shade.plugin.version>10.0.0</shade.plugin.version>
</properties>
</project>

View File

@ -0,0 +1,3 @@
### Relevant articles:
- [Java Switch Statement](https://www.baeldung.com/java-switch)

View File

@ -9,6 +9,7 @@ This module contains articles about Java 9 core features
- [Iterate Through a Range of Dates in Java](https://www.baeldung.com/java-iterate-date-range)
- [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap)
- [Immutable Set in Java](https://www.baeldung.com/java-immutable-set)
- [Immutable ArrayList in Java](https://www.baeldung.com/java-immutable-list)
Note: also contains part of the code for the article
[How to Filter a Collection in Java](https://www.baeldung.com/java-collection-filtering).

View File

@ -37,6 +37,11 @@
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${commons-collections4.version}</version>
</dependency>
</dependencies>
<build>
@ -69,6 +74,7 @@
<maven.compiler.source>1.9</maven.compiler.source>
<maven.compiler.target>1.9</maven.compiler.target>
<guava.version>25.1-jre</guava.version>
<commons-collections4.version>4.1</commons-collections4.version>
</properties>
</project>

View File

@ -0,0 +1,48 @@
package com.baeldung.java9.list.immutable;
import com.google.common.collect.ImmutableList;
import org.apache.commons.collections4.ListUtils;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class ImmutableArrayListUnitTest {
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingTheJdk_whenUnmodifiableListIsCreated_thenNotModifiable() {
final List<String> list = new ArrayList<>(Arrays.asList("one", "two", "three"));
final List<String> unmodifiableList = Collections.unmodifiableList(list);
unmodifiableList.add("four");
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingTheJava9_whenUnmodifiableListIsCreated_thenNotModifiable() {
final List<String> list = new ArrayList<>(Arrays.asList("one", "two", "three"));
final List<String> unmodifiableList = List.of(list.toArray(new String[]{}));
unmodifiableList.add("four");
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingGuava_whenUnmodifiableListIsCreated_thenNotModifiable() {
final List<String> list = new ArrayList<>(Arrays.asList("one", "two", "three"));
final List<String> unmodifiableList = ImmutableList.copyOf(list);
unmodifiableList.add("four");
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingGuavaBuilder_whenUnmodifiableListIsCreated_thenNoLongerModifiable() {
final List<String> list = new ArrayList<>(Arrays.asList("one", "two", "three"));
final ImmutableList<String> unmodifiableList = ImmutableList.<String>builder().addAll(list).build();
unmodifiableList.add("four");
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingCommonsCollections_whenUnmodifiableListIsCreated_thenNotModifiable() {
final List<String> list = new ArrayList<>(Arrays.asList("one", "two", "three"));
final List<String> unmodifiableList = ListUtils.unmodifiableList(list);
unmodifiableList.add("four");
}
}

View File

@ -3,9 +3,8 @@
This module contains articles about the Java ArrayList collection
### Relevant Articles:
- [Immutable ArrayList in Java](http://www.baeldung.com/java-immutable-list)
- [Guide to the Java ArrayList](http://www.baeldung.com/java-arraylist)
- [Add Multiple Items to an Java ArrayList](http://www.baeldung.com/java-add-items-array-list)
- [Guide to the Java ArrayList](https://www.baeldung.com/java-arraylist)
- [Add Multiple Items to an Java ArrayList](https://www.baeldung.com/java-add-items-array-list)
- [ClassCastException: Arrays$ArrayList cannot be cast to ArrayList](https://www.baeldung.com/java-classcastexception-arrays-arraylist)
- [Multi Dimensional ArrayList in Java](https://www.baeldung.com/java-multi-dimensional-arraylist)
- [Removing an Element From an ArrayList](https://www.baeldung.com/java-arraylist-remove-element)

View File

@ -15,42 +15,11 @@ public class CoreJavaCollectionsUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(CoreJavaCollectionsUnitTest.class);
// tests -
@Test
public final void givenUsingTheJdk_whenArrayListIsSynchronized_thenCorrect() {
final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three"));
final List<String> list = new ArrayList<>(Arrays.asList("one", "two", "three"));
final List<String> synchronizedList = Collections.synchronizedList(list);
LOG.debug("Synchronized List is: " + synchronizedList);
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingTheJdk_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() {
final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three"));
final List<String> unmodifiableList = Collections.unmodifiableList(list);
unmodifiableList.add("four");
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingGuava_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() {
final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three"));
final List<String> unmodifiableList = ImmutableList.copyOf(list);
unmodifiableList.add("four");
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingGuavaBuilder_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() {
final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three"));
final ImmutableList<String> unmodifiableList = ImmutableList.<String>builder().addAll(list).build();
unmodifiableList.add("four");
}
@Test(expected = UnsupportedOperationException.class)
public final void givenUsingCommonsCollections_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() {
final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three"));
final List<String> unmodifiableList = ListUtils.unmodifiableList(list);
unmodifiableList.add("four");
}
}

View File

@ -1,22 +1,27 @@
package com.baeldung.threadlocalrandom;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.ChainedOptionsBuilder;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import com.google.common.collect.ImmutableList;
public class ThreadLocalRandomBenchMarkRunner {
public static void main(String[] args) throws Exception {
Options options = new OptionsBuilder().include(ThreadLocalRandomBenchMarker.class.getSimpleName())
.threads(1)
ChainedOptionsBuilder options = new OptionsBuilder().include(ThreadLocalRandomBenchMarker.class.getSimpleName())
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.jvmArgs("-server")
.build();
new Runner(options).run();
.jvmArgs("-server");
for (Integer i : ImmutableList.of(1, 2, 8, 32)) {
new Runner(
options
.threads(i)
.build())
.run();
}
}
}

View File

@ -1,64 +1,34 @@
package com.baeldung.threadlocalrandom;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
@BenchmarkMode(Mode.AverageTime)
@BenchmarkMode(Mode.Throughput)
@Warmup(iterations = 1)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@State(Scope.Benchmark)
public class ThreadLocalRandomBenchMarker {
private final Random random = new Random();
List<Callable<Integer>> randomCallables = new ArrayList<>();
List<Callable<Integer>> threadLocalRandomCallables = new ArrayList<>();
@Setup(Level.Iteration)
public void init() {
Random random = new Random();
randomCallables = new ArrayList<>();
threadLocalRandomCallables = new ArrayList<>();
for (int i = 0; i < 1000; i++) {
randomCallables.add(() -> {
return random.nextInt();
});
}
for (int i = 0; i < 1000; i++) {
threadLocalRandomCallables.add(() -> {
return ThreadLocalRandom.current()
.nextInt();
});
}
@Benchmark
public int randomValuesUsingRandom() {
return random.nextInt();
}
@Benchmark
public void randomValuesUsingRandom() throws InterruptedException {
ExecutorService executor = Executors.newWorkStealingPool();
executor.invokeAll(randomCallables);
executor.shutdown();
}
@Benchmark
public void randomValuesUsingThreadLocalRandom() throws InterruptedException {
ExecutorService executor = Executors.newWorkStealingPool();
executor.invokeAll(threadLocalRandomCallables);
executor.shutdown();
public int randomValuesUsingThreadLocalRandom() {
return ThreadLocalRandom
.current()
.nextInt();
}
}

View File

@ -2,4 +2,6 @@
This module contains articles about core java exceptions
###
### Relevant Articles:
- [Is It a Bad Practice to Catch Throwable?](https://www.baeldung.com/java-catch-throwable-bad-practice)

View File

@ -13,4 +13,5 @@ This module contains articles about core Java input and output (IO)
- [Getting a Files Mime Type in Java](https://www.baeldung.com/java-file-mime-type)
- [How to Write to a CSV File in Java](https://www.baeldung.com/java-csv)
- [How to Avoid the Java FileNotFoundException When Loading Resources](https://www.baeldung.com/java-classpath-resource-cannot-be-opened)
- [Create a Directory in Java](https://www.baeldung.com/java-create-directory)
- [[More -->]](/core-java-modules/core-java-io-2)

View File

@ -10,3 +10,5 @@ This module contains articles about working with the Java Virtual Machine (JVM).
- [Class Loaders in Java](https://www.baeldung.com/java-classloaders)
- [A Guide to System.exit()](https://www.baeldung.com/java-system-exit)
- [Guide to System.gc()](https://www.baeldung.com/java-system-gc)
- [Runtime.getRuntime().halt() vs System.exit() in Java](https://www.baeldung.com/java-runtime-halt-vs-system-exit)
- [Adding Shutdown Hooks for JVM Applications](https://www.baeldung.com/jvm-shutdown-hooks)

View File

@ -8,9 +8,9 @@ This module contains articles about Object-oriented programming (OOP) in Java
- [Guide to the super Java Keyword](https://www.baeldung.com/java-super)
- [Guide to the this Java Keyword](https://www.baeldung.com/java-this)
- [Java public Access Modifier](https://www.baeldung.com/java-public-keyword)
- [Composition, Aggregation and Association in Java](https://www.baeldung.com/java-composition-aggregation-association)
- [Composition, Aggregation, and Association in Java](https://www.baeldung.com/java-composition-aggregation-association)
- [Nested Classes in Java](https://www.baeldung.com/java-nested-classes)
- [A Guide to Inner Interfaces in Java](https://www.baeldung.com/java-inner-interfaces)
- [Java Classes and Objects](https://www.baeldung.com/java-classes-objects)
- [Java Interfaces](https://www.baeldung.com/java-interfaces)
- [[<-- Prev]](/core-java-modules/core-java-lang-oop-2)[[More -->]](/core-java-modules/core-java-lang-oop-4)
- [[<-- Prev]](/core-java-modules/core-java-lang-oop-2)[[More -->]](/core-java-modules/core-java-lang-oop-4)

View File

@ -9,3 +9,4 @@ This module contains articles about performance of Java applications
- [OutOfMemoryError: GC Overhead Limit Exceeded](http://www.baeldung.com/java-gc-overhead-limit-exceeded)
- [Basic Introduction to JMX](http://www.baeldung.com/java-management-extensions)
- [Monitoring Java Applications with Flight Recorder](https://www.baeldung.com/java-flight-recorder-monitoring)
- [Branch Prediction in Java](https://www.baeldung.com/java-branch-prediction)

View File

@ -3,3 +3,5 @@
This module contains articles about string-related algorithms.
### Relevant Articles:
- [Check if Two Strings are Anagrams in Java](https://www.baeldung.com/java-strings-anagrams)

View File

@ -6,3 +6,4 @@ This module contains articles about data structures in Java
- [The Trie Data Structure in Java](https://www.baeldung.com/trie-java)
- [Implementing a Binary Tree in Java](https://www.baeldung.com/java-binary-tree)
- [Circular Linked List Java Implementation](https://www.baeldung.com/java-circular-linked-list)

View File

@ -23,7 +23,7 @@
<dependency>
<groupId>com.leansoft</groupId>
<artifactId>bigqueue</artifactId>
<version>0.7.0</version>
<version>${bigqueue.version}</version>
</dependency>
</dependencies>
@ -39,4 +39,8 @@
</pluginManagement>
</build>
<properties>
<bigqueue.version>0.7.0</bigqueue.version>
</properties>
</project>

View File

@ -177,8 +177,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${source.version}</source>
<target>${target.version}</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
@ -189,7 +189,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<version>${maven-war-plugin.version}</version>
<configuration>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
@ -216,7 +216,5 @@
<slf4j.version>1.7.25</slf4j.version>
<spring-boot-maven-plugin.version>2.0.4.RELEASE</spring-boot-maven-plugin.version>
<compiler.plugin.version>3.1</compiler.plugin.version>
<source.version>1.8</source.version>
<target.version>1.8</target.version>
</properties>
</project>

View File

@ -1,85 +0,0 @@
:toc:
:spring_version: current
:icons: font
:source-highlighter: prettify
:project_id: gs-scheduling-tasks
This guide walks you through the steps for scheduling tasks with Spring.
== What you'll build
You'll build an application that prints out the current time every five seconds using Spring's `@Scheduled` annotation.
== What you'll need
:java_version: 1.8
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/prereq_editor_jdk_buildtools.adoc[]
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/how_to_complete_this_guide.adoc[]
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-gradle.adoc[]
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-maven.adoc[]
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-sts.adoc[]
[[initial]]
== Create a scheduled task
Now that you've set up your project, you can create a scheduled task.
`src/main/java/hello/ScheduledTasks.java`
[source,java]
----
include::complete/src/main/java/hello/ScheduledTasks.java[]
----
The `Scheduled` annotation defines when a particular method runs.
NOTE: This example uses `fixedRate`, which specifies the interval between method invocations measured from the start time of each invocation. There are https://docs.spring.io/spring/docs/{spring_version}/spring-framework-reference/html/scheduling.html#scheduling-annotation-support-scheduled[other options], like `fixedDelay`, which specifies the interval between invocations measured from the completion of the task. You can also https://docs.spring.io/spring/docs/{spring_version}/javadoc-api/org/springframework/scheduling/support/CronSequenceGenerator.html[use `@Scheduled(cron=". . .")` expressions for more sophisticated task scheduling].
== Enable Scheduling
Although scheduled tasks can be embedded in web apps and WAR files, the simpler approach demonstrated below creates a standalone application. You package everything in a single, executable JAR file, driven by a good old Java `main()` method.
`src/main/java/hello/Application.java`
[source,java]
----
include::complete/src/main/java/hello/Application.java[]
----
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/spring-boot-application.adoc[]
https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#scheduling-enable-annotation-support[`@EnableScheduling`] ensures that a background task executor is created. Without it, nothing gets scheduled.
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/build_an_executable_jar_subhead.adoc[]
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/build_an_executable_jar_with_both.adoc[]
Logging output is displayed and you can see from the logs that it is on a background thread. You should see your scheduled task fire every 5 seconds:
....
[...]
2016-08-25 13:10:00.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:00
2016-08-25 13:10:05.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:05
2016-08-25 13:10:10.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:10
2016-08-25 13:10:15.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:15
....
== Summary
Congratulations! You created an application with a scheduled task. Heck, the actual code was shorter than the build file! This technique works in any type of application.
== See Also
The following guides may also be helpful:
* https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot]
* https://spring.io/guides/gs/batch-processing/[Creating a Batch Service]
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/footer.adoc[]

View File

@ -0,0 +1,3 @@
### Relevant Articles:
- [Remote Debugging with IntelliJ IDEA](https://www.baeldung.com/intellij-remote-debugging)

View File

@ -4,4 +4,4 @@ This module contains articles about the Security API in Java EE 8.
### Relevant articles
- [Java EE 8 Security API](https://www.baeldung.com/java-ee-8-security)
- [Jakarta EE 8 Security API](https://www.baeldung.com/java-ee-8-security)

View File

@ -15,4 +15,5 @@ This module contains articles about numbers in Java.
- [Binary Numbers in Java](https://www.baeldung.com/java-binary-numbers)
- [Generating Random Numbers in a Range in Java](https://www.baeldung.com/java-generating-random-numbers)
- [Listing Numbers Within a Range in Java](https://www.baeldung.com/java-listing-numbers-within-a-range)
- [Fibonacci Series in Java](https://www.baeldung.com/java-fibonacci)
- More articles: [[<-- prev]](/../java-numbers)

View File

@ -17,7 +17,7 @@
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>dsiutils</artifactId>
<version>2.6.0</version>
<version>${dsiutils.version}</version>
</dependency>
</dependencies>
@ -31,4 +31,8 @@
</resources>
</build>
<properties>
<dsiutils.version>2.6.0</dsiutils.version>
</properties>
</project>

View File

@ -9,6 +9,6 @@ This module contains articles about Servlets.
- [Uploading Files with Servlets and JSP](https://www.baeldung.com/upload-file-servlet)
- [Example of Downloading File in a Servlet](https://www.baeldung.com/servlet-download-file)
- [Returning a JSON Response from a Servlet](https://www.baeldung.com/servlet-json-response)
- [Java EE Servlet Exception Handling](https://www.baeldung.com/servlet-exceptions)
- [Jakarta EE Servlet Exception Handling](https://www.baeldung.com/servlet-exceptions)
- [Context and Servlet Initialization Parameters](https://www.baeldung.com/context-servlet-initialization-param)
- [The Difference between getRequestURI and getPathInfo in HttpServletRequest](https://www.baeldung.com/http-servlet-request-requesturi-pathinfo)

View File

@ -3,4 +3,4 @@
This module contains articles about security in JEE 7.
### Relevant Articles:
- [Securing Java EE with Spring Security](https://www.baeldung.com/java-ee-spring-security)
- [Securing Jakarta EE with Spring Security](https://www.baeldung.com/java-ee-spring-security)

View File

@ -3,7 +3,7 @@
This module contains articles about JEE 7.
### Relevant Articles:
- [Scheduling in Java EE](https://www.baeldung.com/scheduling-in-java-enterprise-edition)
- [Scheduling in Jakarta EE](https://www.baeldung.com/scheduling-in-java-enterprise-edition)
- [JSON Processing in Java EE 7](https://www.baeldung.com/jee7-json)
- [Converters, Listeners and Validators in Java EE 7](https://www.baeldung.com/java-ee7-converter-listener-validator)
- [Introduction to JAX-WS](https://www.baeldung.com/jax-ws)

View File

@ -3,4 +3,4 @@
This module contains articles about Java EE with Kotlin.
### Relevant Articles:
- [Java EE Application with Kotlin](https://www.baeldung.com/java-ee-kotlin-app)
- [Jakarta EE Application with Kotlin](https://www.baeldung.com/java-ee-kotlin-app)

View File

@ -232,7 +232,7 @@
<dependency>
<groupId>org.zalando</groupId>
<artifactId>problem-spring-web</artifactId>
<version>0.24.0-RC.0</version>
<version>${zalando.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
@ -910,5 +910,6 @@
<sonar.tests>${project.basedir}/src/test/</sonar.tests>
<!-- jhipster-needle-maven-property -->
<zalando.version>0.24.0-RC.0</zalando.version>
</properties>
</project>

View File

@ -3,4 +3,4 @@
This module contains articles about the Java Transaction API (JTA).
### Relevant Articles:
- [Guide to Java EE JTA](https://www.baeldung.com/jee-jta)
- [Guide to Jakarta EE JTA](https://www.baeldung.com/jee-jta)

View File

@ -21,7 +21,7 @@
<dependency>
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxkotlin</artifactId>
<version>2.3.0</version>
<version>${rxkotlin.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@ -86,6 +86,7 @@
<guava.version>27.1-jre</guava.version>
<mockk.version>1.9.3</mockk.version>
<kotlinx-collections-immutable.version>0.1</kotlinx-collections-immutable.version>
<rxkotlin.version>2.3.0</rxkotlin.version>
</properties>
</project>

View File

@ -48,7 +48,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>${junit.version}</version>
</dependency>
<!-- logging -->
<dependency>
@ -148,6 +148,7 @@
<dependency.plugin.version>3.1.1</dependency.plugin.version>
<surefire.plugin.version>2.22.1</surefire.plugin.version>
<exec.plugin.version>1.3.2</exec.plugin.version>
<junit.version>4.12</junit.version>
</properties>
</project>

View File

@ -12,3 +12,4 @@ This module contains articles about HTTP libraries.
- [Introduction to Retrofit](https://www.baeldung.com/retrofit)
- [A Guide to Unirest](https://www.baeldung.com/unirest)
- [Creating REST Microservices with Javalin](https://www.baeldung.com/javalin-rest-microservices)
- [A Quick Guide to Timeouts in OkHttp](https://www.baeldung.com/okhttp-timeouts)

View File

@ -9,4 +9,4 @@ This module contains articles about security libraries.
- [Guide to Google Tink](https://www.baeldung.com/google-tink)
- [Introduction to BouncyCastle with Java](https://www.baeldung.com/java-bouncy-castle)
- [Intro to Jasypt](https://www.baeldung.com/jasypt)
- [Digital Signature in Java](https://www.baeldung.com/java-digital-signature)
- [Digital Signatures in Java](https://www.baeldung.com/java-digital-signature)

View File

@ -0,0 +1,3 @@
### Relevant Articles:
- [How to Create a Maven Plugin](https://www.baeldung.com/maven-plugin)

View File

@ -73,7 +73,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>3.2.0</version>
<version>${help.plugin.version}</version>
<executions>
<execution>
<id>show-profiles</id>
@ -87,4 +87,8 @@
</plugins>
</build>
<properties>
<help.plugin.version>3.2.0</help.plugin.version>
</properties>
</project>

View File

@ -46,7 +46,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<version>${versions.plugin.version}</version>
<configuration>
<excludes>
<exclude>org.apache.commons:commons-collections4</exclude>
@ -76,6 +76,7 @@
<commons-collections4.version>4.0</commons-collections4.version>
<commons-lang3.version>3.0</commons-lang3.version>
<commons-beanutils.version>1.9.1</commons-beanutils.version>
<versions.plugin.version>2.7</versions.plugin.version>
</properties>
</project>

View File

@ -16,6 +16,12 @@
<bootstrap.version>3.3.4</bootstrap.version>
<jquery.version>2.1.3</jquery.version>
<h2.version>1.4.186</h2.version>
<compiler.plugin.version>3.2</compiler.plugin.version>
<source.version>1.8</source.version>
<target.version>1.8</target.version>
<enforcer.plugin.version>1.3.1</enforcer.plugin.version>
<deploy.plugin.version>2.8.2</deploy.plugin.version>
<shade.plugin.version>2.2</shade.plugin.version>
</properties>
<build>
@ -23,16 +29,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<version>${compiler.plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${source.version}</source>
<target>${target.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<version>${enforcer.plugin.version}</version>
<executions>
<execution>
<id>enforce-banned-dependencies</id>
@ -95,7 +101,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${deploy.plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
@ -103,7 +109,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<version>${shade.plugin.version}</version>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<filters>

View File

@ -4,4 +4,4 @@ This module contains articles about the implementation of OAuth2 with Java EE.
### Relevant Articles
- [Implementing The OAuth 2.0 Authorization Framework Using Java EE](https://www.baeldung.com/java-ee-oauth2-implementation)
- [Implementing The OAuth 2.0 Authorization Framework Using Jakarta EE](https://www.baeldung.com/java-ee-oauth2-implementation)

View File

@ -45,7 +45,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.2.0.M4</version>
<version>${boot.dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -215,6 +215,7 @@
<ktor.io.version>0.9.5</ktor.io.version>
<assertj.version>3.12.0</assertj.version>
<junit.platform.version>1.3.2</junit.platform.version>
<boot.dependencies.version>2.2.0.M4</boot.dependencies.version>
</properties>
</project>

View File

@ -38,7 +38,7 @@
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.2.0.Final</version>
<version>${mapstruct-jdk8.version}</version>
<scope>provided</scope>
</dependency>
@ -93,6 +93,15 @@
Name of the benchmark Uber-JAR to generate.
-->
<uberjar.name>benchmarks</uberjar.name>
<compiler.plugin.version>3.1</compiler.plugin.version>
<shade.plugin.version>2.2</shade.plugin.version>
<install.version>2.5.1</install.version>
<jar.plugin.version>2.4</jar.plugin.version>
<javadoc.plugin.version>2.9.1</javadoc.plugin.version>
<resources.plugin.version>2.6</resources.plugin.version>
<site.plugin.version>3.3</site.plugin.version>
<source.plugin.version>2.2.1</source.plugin.version>
<surefire.plugin.version>2.17</surefire.plugin.version>
</properties>
<build>
@ -100,7 +109,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>${compiler.plugin.version}</version>
<configuration>
<compilerVersion>${javac.target}</compilerVersion>
<source>${javac.target}</source>
@ -117,7 +126,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<version>${shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
@ -162,31 +171,31 @@
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.1</version>
<version>${install.version}</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<version>${jar.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>${javadoc.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>${resources.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<version>${site.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>${source.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<version>${surefire.plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>

View File

@ -6,4 +6,5 @@ This module contains articles about Hibernate 5.
- [Hibernate Error “Not all named parameters have been set”](https://www.baeldung.com/hibernate-error-named-parameters-not-set)
- [FetchMode in Spring Data JPA](https://www.baeldung.com/spring-data-jpa-fetchmode)
- [JPA/Hibernate Persistence Context](https://www.baeldung.com/jpa-hibernate-persistence-context)
- [FetchMode in Hibernate](https://www.baeldung.com/hibernate-fetchmode)
- [[<-- Prev]](/hibernate5)

View File

@ -54,9 +54,9 @@
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons.lang3.version}</version>
</dependency>
</dependencies>
@ -66,6 +66,9 @@
<commons-lang3.version>3.8.1</commons-lang3.version>
<maven.deploy.skip>true</maven.deploy.skip>
<spring-boot.version>2.1.7.RELEASE</spring-boot.version>
<hibernate.core.version>5.4.7.Final</hibernate.core.version>
<h2.version>1.4.200</h2.version>
<commons.lang3.version>3.8.1</commons.lang3.version>
</properties>
</project>

View File

@ -55,7 +55,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<version>${exec-maven-plugin.version}</version>
<executions>
<execution>
<id>document</id>

View File

@ -1,4 +1,3 @@
## Relevant articles:
- [Introduction to Sirix](https://www.baeldung.com/introduction-to-sirix)
- [A Guide to SirixDB](https://www.baeldung.com/sirix)

View File

@ -30,7 +30,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>${compiler.plugin.version}</version>
<configuration>
<release>${maven.release.version}</release>
<encoding>${project.build.sourceEncoding}</encoding>
@ -39,7 +39,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.1</version> <!-- Use newer version of ASM -->
<version>${asm.version}</version> <!-- Use newer version of ASM -->
</dependency>
</dependencies>
</plugin>
@ -50,6 +50,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.release.version>11</maven.release.version>
<sirix-core.version>0.9.3</sirix-core.version>
<compiler.plugin.version>3.8.0</compiler.plugin.version>
<asm.version>6.1</asm.version>
</properties>
</project>

View File

@ -20,7 +20,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.8.RELEASE</version>
<version>${spring.boot.dependencies}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -95,6 +95,7 @@
<properties>
<jdbi.version>3.9.1</jdbi.version>
<spring.boot.dependencies>2.1.8.RELEASE</spring.boot.dependencies>
</properties>
</project>

View File

@ -17,7 +17,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot-version}</version>
<version>${spring.boot.starter.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
@ -88,6 +88,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>com.baeldung.springdatageode.app.ClientCacheApp</start-class>
<spring-geode-starter-version>1.1.1.RELEASE</spring-geode-starter-version>
<spring.boot.starter.version>2.1.9.RELEASE</spring.boot.starter.version>
</properties>
</project>

16
pom.xml
View File

@ -641,27 +641,21 @@
<module>spring-boot</module>
<module>spring-boot-modules</module>
<module>spring-boot-angular</module>
<module>spring-boot-autoconfiguration</module>
<module>spring-boot-bootstrap</module>
<module>spring-boot-camel</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
<module>spring-boot-client</module>
<module>spring-boot-config-jpa-error</module>
<module>spring-boot-crud</module>
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-custom-starter</module>
<module>spring-boot-deployment</module>
<module>spring-boot-di</module>
<module>spring-boot-environment</module>
<module>spring-boot-flowable</module>
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
<module>spring-boot-jasypt</module>
<module>spring-boot-kotlin</module>
<module>spring-boot-libraries</module>
<module>spring-boot-logging-log4j2</module>
<module>spring-boot-mvc-2</module>
<module>spring-boot-nashorn</module>
<module>spring-boot-parent</module>
<module>spring-boot-performance</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-rest</module>
@ -1171,28 +1165,22 @@
<module>spring-boot</module>
<module>spring-boot-modules</module>
<module>spring-boot-angular</module>
<module>spring-boot-autoconfiguration</module>
<module>spring-boot-bootstrap</module>
<module>spring-boot-camel</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
<module>spring-boot-client</module>
<module>spring-boot-config-jpa-error</module>
<module>spring-boot-crud</module>
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-custom-starter</module>
<module>spring-boot-deployment</module>
<module>spring-boot-di</module>
<module>spring-boot-environment</module>
<module>spring-boot-flowable</module>
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
<module>spring-boot-jasypt</module>
<module>spring-boot-kotlin</module>
<module>spring-boot-libraries</module>
<module>spring-boot-logging-log4j2</module>
<module>spring-boot-mvc</module>
<module>spring-boot-mvc-2</module>
<module>spring-boot-nashorn</module>
<module>spring-boot-parent</module>
<module>spring-boot-performance</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-rest</module>

View File

@ -0,0 +1,3 @@
### Relevant Articles:
- [How to Implement a Quarkus Extension](https://www.baeldung.com/quarkus-extension-java)

View File

@ -40,7 +40,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${compiler.plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
@ -54,4 +54,8 @@
</plugins>
</build>
<properties>
<compiler.plugin.version>3.8.1</compiler.plugin.version>
</properties>
</project>

View File

@ -50,7 +50,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${compiler.plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
@ -66,6 +66,8 @@
<properties>
<liquibase-core.version>3.8.1</liquibase-core.version>
<compiler.plugin.version>3.8.1</compiler.plugin.version>
<liquibase.version>3.8.1</liquibase.version>
</properties>
</project>

View File

@ -13,4 +13,5 @@ This module contains articles about RxJava.
- [RxJava Maybe](https://www.baeldung.com/rxjava-maybe)
- [Combining RxJava Completables](https://www.baeldung.com/rxjava-completable)
- [RxJava Hooks](https://www.baeldung.com/rxjava-hooks)
- [Introduction to rxjava-jdbc](https://www.baeldung.com/rxjava-jdbc)
- More articles: [[next -->]](/rxjava-2)

View File

@ -39,16 +39,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>${compiler.plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<version>${dependency.plugin.version}</version>
<executions>
<execution>
<id>copy-dependencies</id>
@ -84,6 +84,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spf4j.version>8.6.10</spf4j.version>
<org.slf4j.version>1.7.21</org.slf4j.version>
<compiler.plugin.version>3.8.0</compiler.plugin.version>
<dependency.plugin.version>3.1.1</dependency.plugin.version>
</properties>
</project>

View File

@ -39,16 +39,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>${compiler.plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<version>${dependency.plugin.version}</version>
<executions>
<execution>
<id>copy-dependencies</id>
@ -84,6 +84,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spf4j.version>8.6.10</spf4j.version>
<org.slf4j.version>1.7.21</org.slf4j.version>
<compiler.plugin.version>3.8.0</compiler.plugin.version>
<dependency.plugin.version>3.1.1</dependency.plugin.version>
</properties>
</project>

View File

@ -5,4 +5,5 @@ This module contains articles about Spring with the AMQP messaging system
## Relevant articles:
- [Messaging With Spring AMQP](https://www.baeldung.com/spring-amqp)
- [RabbitMQ Message Dispatching with Spring AMQP](https://www.baeldung.com/rabbitmq-spring-amqp)
- [RabbitMQ Message Dispatching with Spring AMQP](https://www.baeldung.com/rabbitmq-spring-amqp)
- [Error Handling with Spring AMQP](https://www.baeldung.com/spring-amqp-error-handling)

View File

@ -3,4 +3,4 @@
This module contains articles about Kotlin in Spring Boot projects.
### Relevant Articles:
- [Non-blocking Spring Boot with Kotlin Coroutines](https://www.baeldung.com/non-blocking-spring-boot-with-kotlin-coroutines)
- [Non-blocking Spring Boot with Kotlin Coroutines](https://www.baeldung.com/spring-boot-kotlin-coroutines)

View File

@ -16,10 +16,16 @@
<modules>
<module>spring-boot-admin</module>
<module>spring-boot-artifacts</module>
<module>spring-boot-autoconfiguration</module>
<module>spring-boot-camel</module>
<module>spring-boot-custom-starter</module>
<module>spring-boot-crud</module>
<module>spring-boot-data</module>
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
<module>spring-boot-keycloak</module>
<module>spring-boot-logging-log4j2</module>
<module>spring-boot-mvc-birt</module>
<module>spring-boot-performance</module>
<module>spring-boot-nashorn</module>
<module>spring-boot-properties</module>
<module>spring-boot-springdoc</module>
<module>spring-boot-testing</module>

View File

@ -12,7 +12,7 @@
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
<relativePath>../../parent-boot-2</relativePath>
</parent>
<dependencies>

View File

@ -8,8 +8,8 @@
<name>spring-boot-camel</name>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-modules</artifactId>
<groupId>com.baeldung.spring-boot-modules</groupId>
<artifactId>spring-boot-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

Some files were not shown because too many files have changed in this diff Show More