diff --git a/core-java-modules/core-java-8-datetime-3/src/test/java/com/baeldung/stringtooffsetdatetime/StringToOffsetDateTimeUnitTest.java b/core-java-modules/core-java-8-datetime-3/src/test/java/com/baeldung/stringtooffsetdatetime/StringToOffsetDateTimeUnitTest.java
new file mode 100644
index 0000000000..421663fdd6
--- /dev/null
+++ b/core-java-modules/core-java-8-datetime-3/src/test/java/com/baeldung/stringtooffsetdatetime/StringToOffsetDateTimeUnitTest.java
@@ -0,0 +1,30 @@
+package com.baeldung.stringtooffsetdatetime;
+
+import org.junit.Test;
+
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+import static org.junit.Assert.assertEquals;
+
+public class StringToOffsetDateTimeUnitTest {
+ String dateTimeString = "2024-04-11T10:15:30+01:00";
+
+ @Test
+ public void givenDateTimeString_whenUsingOffsetDateTimeParse_thenConvertToOffsetDateTime() {
+ OffsetDateTime offsetDateTime = OffsetDateTime.parse(dateTimeString);
+
+ OffsetDateTime expected = OffsetDateTime.of(2024, 4, 11, 10, 15, 30, 0, OffsetDateTime.parse(dateTimeString).getOffset());
+ assertEquals(expected, offsetDateTime);
+ }
+
+ @Test
+ public void givenDateTimeStringAndFormatter_whenUsingDateTimeFormatter_thenConvertToOffsetDateTime() {
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX");
+
+ OffsetDateTime offsetDateTime = OffsetDateTime.parse(dateTimeString, formatter);
+
+ OffsetDateTime expected = OffsetDateTime.of(2024, 4, 11, 10, 15, 30, 0, OffsetDateTime.parse(dateTimeString).getOffset());
+ assertEquals(expected, offsetDateTime);
+ }
+}
diff --git a/core-java-modules/core-java-string-operations-8/src/test/java/com/baeldung/symmetricsubstringlength/SymmetricSubstringMaxLengthUnitTest.java b/core-java-modules/core-java-string-operations-8/src/test/java/com/baeldung/symmetricsubstringlength/SymmetricSubstringMaxLengthUnitTest.java
index ff94aeaea8..712cbb053e 100644
--- a/core-java-modules/core-java-string-operations-8/src/test/java/com/baeldung/symmetricsubstringlength/SymmetricSubstringMaxLengthUnitTest.java
+++ b/core-java-modules/core-java-string-operations-8/src/test/java/com/baeldung/symmetricsubstringlength/SymmetricSubstringMaxLengthUnitTest.java
@@ -30,7 +30,7 @@ public class SymmetricSubstringMaxLengthUnitTest {
@Test
public void givenString_whenUsingBruteForce_thenFindLongestSymmetricSubstring() {
- assertEquals(expected, findLongestSymmetricSubstringUsingBruteForce(input).length());
+ assertEquals(expected, findLongestSymmetricSubstringUsingBruteForce(input));
}
@Test
@@ -38,25 +38,23 @@ public class SymmetricSubstringMaxLengthUnitTest {
assertEquals(expected, findLongestSymmetricSubstringUsingSymmetricApproach(input));
}
- private String findLongestSymmetricSubstringUsingBruteForce(String str) {
+ private int findLongestSymmetricSubstringUsingBruteForce(String str) {
if (str == null || str.length() == 0) {
- return "";
+ return 0;
}
int maxLength = 0;
- String longestPalindrome = "";
for (int i = 0; i < str.length(); i++) {
for (int j = i + 1; j <= str.length(); j++) {
String substring = str.substring(i, j);
if (isPalindrome(substring) && substring.length() > maxLength) {
maxLength = substring.length();
- longestPalindrome = substring;
}
}
}
- return longestPalindrome;
+ return maxLength;
}
private boolean isPalindrome(String s) {
diff --git a/maven-modules/multimodulemavenproject/maven-daomodule/pom.xml b/maven-modules/multimodulemavenproject/maven-daomodule/pom.xml
index 474cc20adb..7b41adba24 100644
--- a/maven-modules/multimodulemavenproject/maven-daomodule/pom.xml
+++ b/maven-modules/multimodulemavenproject/maven-daomodule/pom.xml
@@ -19,17 +19,7 @@
org.apache.maven.plugins
maven-compiler-plugin
-
-
- ${maven.compiler.target}
-
-
-
- 9
- 9
-
-
\ No newline at end of file
diff --git a/maven-modules/multimodulemavenproject/maven-entitymodule/pom.xml b/maven-modules/multimodulemavenproject/maven-entitymodule/pom.xml
index a9b169a8b9..fa9328a837 100644
--- a/maven-modules/multimodulemavenproject/maven-entitymodule/pom.xml
+++ b/maven-modules/multimodulemavenproject/maven-entitymodule/pom.xml
@@ -19,17 +19,7 @@
org.apache.maven.plugins
maven-compiler-plugin
-
-
- ${maven.compiler.target}
-
-
-
- 9
- 9
-
-
\ No newline at end of file
diff --git a/maven-modules/multimodulemavenproject/maven-mainappmodule/pom.xml b/maven-modules/multimodulemavenproject/maven-mainappmodule/pom.xml
index 0dd11ef991..797a01f04f 100644
--- a/maven-modules/multimodulemavenproject/maven-mainappmodule/pom.xml
+++ b/maven-modules/multimodulemavenproject/maven-mainappmodule/pom.xml
@@ -37,17 +37,11 @@
org.apache.maven.plugins
maven-compiler-plugin
-
-
- ${maven.compiler.target}
-
- 9
- 9
1.0
1.0
1.0
diff --git a/maven-modules/multimodulemavenproject/maven-userdaomodule/pom.xml b/maven-modules/multimodulemavenproject/maven-userdaomodule/pom.xml
index d5fe513e09..293ee3e4e6 100644
--- a/maven-modules/multimodulemavenproject/maven-userdaomodule/pom.xml
+++ b/maven-modules/multimodulemavenproject/maven-userdaomodule/pom.xml
@@ -32,10 +32,6 @@
org.apache.maven.plugins
maven-compiler-plugin
-
-
- ${maven.compiler.target}
-
diff --git a/maven-modules/multimodulemavenproject/pom.xml b/maven-modules/multimodulemavenproject/pom.xml
index 16493e8547..5a6eea7cf4 100644
--- a/maven-modules/multimodulemavenproject/pom.xml
+++ b/maven-modules/multimodulemavenproject/pom.xml
@@ -9,12 +9,12 @@
multimodulemavenproject
pom
-
- com.baeldung
- parent-modules
- 1.0.0-SNAPSHOT
- ../../
-
+
maven-entitymodule
diff --git a/persistence-modules/spring-data-jpa-query-4/src/test/java/com/baeldung/spring/data/jpa/getnextseq/MyEntityRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-query-4/src/test/java/com/baeldung/spring/data/jpa/getnextseq/MyEntityRepositoryLiveTest.java
similarity index 96%
rename from persistence-modules/spring-data-jpa-query-4/src/test/java/com/baeldung/spring/data/jpa/getnextseq/MyEntityRepositoryIntegrationTest.java
rename to persistence-modules/spring-data-jpa-query-4/src/test/java/com/baeldung/spring/data/jpa/getnextseq/MyEntityRepositoryLiveTest.java
index 3444bbbd49..d2348c5108 100644
--- a/persistence-modules/spring-data-jpa-query-4/src/test/java/com/baeldung/spring/data/jpa/getnextseq/MyEntityRepositoryIntegrationTest.java
+++ b/persistence-modules/spring-data-jpa-query-4/src/test/java/com/baeldung/spring/data/jpa/getnextseq/MyEntityRepositoryLiveTest.java
@@ -12,7 +12,7 @@ import org.springframework.test.context.jdbc.Sql;
@SpringBootTest
@ActiveProfiles("test")
@Sql(scripts = "/testsequence.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
-public class MyEntityRepositoryIntegrationTest {
+public class MyEntityRepositoryLiveTest {
@Autowired
private MyEntityRepository myEntityRepository;
diff --git a/spring-cloud-modules/spring-cloud-dapr/spring-cloud-dapr-gateway/pom.xml b/spring-cloud-modules/spring-cloud-dapr/spring-cloud-dapr-gateway/pom.xml
index 7874edda4a..8e355f327e 100644
--- a/spring-cloud-modules/spring-cloud-dapr/spring-cloud-dapr-gateway/pom.xml
+++ b/spring-cloud-modules/spring-cloud-dapr/spring-cloud-dapr-gateway/pom.xml
@@ -42,7 +42,10 @@
- 2021.0.0
+ 2023.0.1
+ 3.2.4
+ 1.5.4
+ 2.0.12
\ No newline at end of file
diff --git a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/pom.xml b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/pom.xml
deleted file mode 100644
index 072d4a2de0..0000000000
--- a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
- 4.0.0
- data-flow-server
- 0.0.1-SNAPSHOT
- data-flow-server
- jar
- Demo project for Spring Boot
-
-
- com.baeldung
- spring-cloud-data-flow-stream-processing
- 0.0.1-SNAPSHOT
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-dataflow-dependencies
- ${spring-cloud-dataflow-dependencies.version}
- pom
- import
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-dataflow-server-local
- 1.7.4.RELEASE
-
-
- org.hibernate
- hibernate-core
- ${hibernate.compatible.version}
-
-
- org.hibernate
- hibernate-entitymanager
- ${hibernate.compatible.version}
-
-
- net.bytebuddy
- byte-buddy
- ${byte-buddy.version}
- test
-
-
- org.codehaus.groovy
- groovy
- ${groovy.version}
-
-
- org.springframework.session
- spring-session-data-redis
-
-
-
-
- 2.0.0.RELEASE
- 5.6.0.Final
- 2.1.4.RELEASE
- 3.0.8
-
-
-
\ No newline at end of file
diff --git a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/main/java/com/baeldung/spring/cloud/DataFlowServerApplication.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/main/java/com/baeldung/spring/cloud/DataFlowServerApplication.java
deleted file mode 100644
index 4d742b95c6..0000000000
--- a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/main/java/com/baeldung/spring/cloud/DataFlowServerApplication.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.baeldung.spring.cloud;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.dataflow.server.EnableDataFlowServer;
-
-@EnableDataFlowServer
-@SpringBootApplication
-public class DataFlowServerApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(DataFlowServerApplication.class, args);
- }
-}
diff --git a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/main/resources/application.properties
deleted file mode 100644
index 20ad5d5bcb..0000000000
--- a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/main/resources/application.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#spring.datasource.url=jdbc:h2:mem:dataflow
-spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
\ No newline at end of file
diff --git a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/test/java/com/baeldung/SpringContextTest.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/test/java/com/baeldung/SpringContextTest.java
deleted file mode 100644
index 7a5e4e695c..0000000000
--- a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/test/java/com/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.baeldung;
-
-import com.baeldung.spring.cloud.DataFlowServerApplication;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = DataFlowServerApplication.class)
-public class SpringContextTest {
-
- @Test
- public void contextLoads() {
- }
-}
diff --git a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/test/java/com/baeldung/spring/cloud/DataFlowServerApplicationIntegrationTest.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/test/java/com/baeldung/spring/cloud/DataFlowServerApplicationIntegrationTest.java
deleted file mode 100644
index 49eb255303..0000000000
--- a/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/src/test/java/com/baeldung/spring/cloud/DataFlowServerApplicationIntegrationTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.baeldung.spring.cloud;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mockito;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.RedisConnection;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.serializer.RedisSerializer;
-import org.springframework.session.data.redis.config.ConfigureRedisAction;
-import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class DataFlowServerApplicationIntegrationTest {
-
- @Test
- public void contextLoads() {
- }
-
- @EnableRedisHttpSession
- @Configuration
- static class Config {
-
- @Bean
- @SuppressWarnings("unchecked")
- public RedisSerializer