Merge branch 'eugenp:master' into master
This commit is contained in:
commit
119d52f961
@ -10,8 +10,4 @@
|
|||||||
- [Check if Two Strings Are Rotations of Each Other](https://www.baeldung.com/java-string-check-strings-rotations)
|
- [Check if Two Strings Are Rotations of Each Other](https://www.baeldung.com/java-string-check-strings-rotations)
|
||||||
- [Find the Largest Prime Under the Given Number in Java](https://www.baeldung.com/java-largest-prime-lower-threshold)
|
- [Find the Largest Prime Under the Given Number in Java](https://www.baeldung.com/java-largest-prime-lower-threshold)
|
||||||
- [Count the Number of Unique Digits in an Integer using Java](https://www.baeldung.com/java-int-count-unique-digits)
|
- [Count the Number of Unique Digits in an Integer using Java](https://www.baeldung.com/java-int-count-unique-digits)
|
||||||
- [Generate Juggler Sequence in Java](https://www.baeldung.com/java-generate-juggler-sequence)
|
|
||||||
- [Finding the Parent of a Node in a Binary Search Tree with Java](https://www.baeldung.com/java-find-parent-node-binary-search-tree)
|
|
||||||
- [Check if a Number Is a Happy Number in Java](https://www.baeldung.com/java-happy-sad-number-test)
|
|
||||||
- [Find the Largest Number Possible After Removing k Digits of a Number](https://www.baeldung.com/java-find-largest-number-remove-k-digits)
|
|
||||||
- More articles: [[<-- prev]](/algorithms-miscellaneous-6)
|
- More articles: [[<-- prev]](/algorithms-miscellaneous-6)
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
## Relevant Articles
|
|
||||||
- [Implement Connect 4 Game with Java](https://www.baeldung.com/java-connect-4-game)
|
|
@ -1,3 +1,9 @@
|
|||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Vigenère Cipher in Java](https://www.baeldung.com/java-vigenere-cipher)
|
- [Vigenère Cipher in Java](https://www.baeldung.com/java-vigenere-cipher)
|
||||||
- [Merge Overlapping Intervals in a Java Collection](https://www.baeldung.com/java-collection-merge-overlapping-intervals)
|
- [Merge Overlapping Intervals in a Java Collection](https://www.baeldung.com/java-collection-merge-overlapping-intervals)
|
||||||
|
- [Generate Juggler Sequence in Java](https://www.baeldung.com/java-generate-juggler-sequence)
|
||||||
|
- [Finding the Parent of a Node in a Binary Search Tree with Java](https://www.baeldung.com/java-find-parent-node-binary-search-tree)
|
||||||
|
- [Check if a Number Is a Happy Number in Java](https://www.baeldung.com/java-happy-sad-number-test)
|
||||||
|
- [Find the Largest Number Possible After Removing k Digits of a Number](https://www.baeldung.com/java-find-largest-number-remove-k-digits)
|
||||||
|
- [Implement Connect 4 Game with Java](https://www.baeldung.com/java-connect-4-game)
|
||||||
|
- More articles: [[<-- prev]](/algorithms-miscellaneous-7)
|
@ -1,6 +1,6 @@
|
|||||||
package com.baeldung.algorithms.largestNumberRemovingK;
|
package com.baeldung.algorithms.largestNumberRemovingK;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Stack;
|
||||||
|
|
||||||
public class LargestNumberRemoveKDigits {
|
public class LargestNumberRemoveKDigits {
|
||||||
public static int findLargestNumberUsingArithmetic(int num, int k) {
|
public static int findLargestNumberUsingArithmetic(int num, int k) {
|
@ -5,7 +5,9 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
|
|
||||||
class BinaryTreeParentNodeFinderUnitTest {
|
class BinaryTreeParentNodeFinderUnitTest {
|
||||||
|
|
@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<artifactId>parent-boot-2</artifactId>
|
<artifactId>parent-boot-3</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2</relativePath>
|
<relativePath>../parent-boot-3</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>spring.datasource.password</name>
|
<name>spring.datasource.password</name>
|
||||||
<value></value>
|
<value>test</value>
|
||||||
<!--<value>replace-with-your-password</value> -->
|
<!--<value>replace-with-your-password</value> -->
|
||||||
</property>
|
</property>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
@ -113,6 +113,14 @@
|
|||||||
<!--</resource> -->
|
<!--</resource> -->
|
||||||
<!--</resources> -->
|
<!--</resources> -->
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.4.0-b180830.0359</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.baeldung.springboot.azure;
|
package com.baeldung.springboot.azure;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author aiet
|
* @author aiet
|
||||||
|
@ -9,9 +9,4 @@
|
|||||||
- [Round the Date in Java](https://www.baeldung.com/java-round-the-date)
|
- [Round the Date in Java](https://www.baeldung.com/java-round-the-date)
|
||||||
- [Representing Furthest Possible Date in Java](https://www.baeldung.com/java-date-represent-max)
|
- [Representing Furthest Possible Date in Java](https://www.baeldung.com/java-date-represent-max)
|
||||||
- [Retrieving Unix Time in Java](https://www.baeldung.com/java-retrieve-unix-time)
|
- [Retrieving Unix Time in Java](https://www.baeldung.com/java-retrieve-unix-time)
|
||||||
- [Calculate Months Between Two Dates in Java](https://www.baeldung.com/java-months-difference-two-dates)
|
- [[<-- Prev]](/core-java-modules/core-java-datetime-java8-1) [[Next -->]](/core-java-modules/core-java-8-datetime-3)
|
||||||
- [Format LocalDate to ISO 8601 With T and Z](https://www.baeldung.com/java-format-localdate-iso-8601-t-z)
|
|
||||||
- [Check if Two Date Ranges Overlap](https://www.baeldung.com/java-check-two-date-ranges-overlap)
|
|
||||||
- [Difference between ZoneOffset.UTC and ZoneId.of(“UTC”)](https://www.baeldung.com/java-zoneoffset-utc-zoneid-of)
|
|
||||||
- [Check if a Given Time Lies Between Two Times Regardless of Date](https://www.baeldung.com/java-check-between-two-times)
|
|
||||||
- [[<-- Prev]](/core-java-modules/core-java-datetime-java8-1)
|
|
||||||
|
8
core-java-modules/core-java-8-datetime-3/README.md
Normal file
8
core-java-modules/core-java-8-datetime-3/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
|
- [Calculate Months Between Two Dates in Java](https://www.baeldung.com/java-months-difference-two-dates)
|
||||||
|
- [Format LocalDate to ISO 8601 With T and Z](https://www.baeldung.com/java-format-localdate-iso-8601-t-z)
|
||||||
|
- [Check if Two Date Ranges Overlap](https://www.baeldung.com/java-check-two-date-ranges-overlap)
|
||||||
|
- [Difference between ZoneOffset.UTC and ZoneId.of(“UTC”)](https://www.baeldung.com/java-zoneoffset-utc-zoneid-of)
|
||||||
|
- [Check if a Given Time Lies Between Two Times Regardless of Date](https://www.baeldung.com/java-check-between-two-times)
|
||||||
|
- [[<-- Prev]](/core-java-modules/core-java-8-datetime-2)
|
55
core-java-modules/core-java-8-datetime-3/pom.xml
Normal file
55
core-java-modules/core-java-8-datetime-3/pom.xml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>core-java-8-datetime-3</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>core-java-8-datetime-3</name>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung.core-java-modules</groupId>
|
||||||
|
<artifactId>core-java-modules</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>${commons-lang3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>joda-time</groupId>
|
||||||
|
<artifactId>joda-time</artifactId>
|
||||||
|
<version>${joda-time.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${maven.compiler.source}</source>
|
||||||
|
<target>${maven.compiler.target}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
<joda-time.version>2.12.5</joda-time.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@ -1,11 +1,11 @@
|
|||||||
package com.baeldung.daterangeoverlap;
|
package com.baeldung.daterangeoverlap;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.Calendar;
|
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
public class DateRangeOverlapChecker {
|
public class DateRangeOverlapChecker {
|
||||||
|
|
||||||
public static boolean isOverlapUsingCalendarAndDuration(Calendar start1, Calendar end1, Calendar start2, Calendar end2) {
|
public static boolean isOverlapUsingCalendarAndDuration(Calendar start1, Calendar end1, Calendar start2, Calendar end2) {
|
@ -1,20 +1,16 @@
|
|||||||
package com.baeldung.localdatetoiso;
|
package com.baeldung.localdatetoiso;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.time.FastDateFormat;
|
||||||
|
import org.joda.time.DateTimeZone;
|
||||||
|
import org.joda.time.format.ISODateTimeFormat;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.TimeZone;
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
|
||||||
import org.joda.time.DateTimeZone;
|
|
||||||
import org.joda.time.format.DateTimeFormat;
|
|
||||||
import org.joda.time.format.ISODateTimeFormat;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.time.FastDateFormat;
|
|
||||||
|
|
||||||
public class LocalDateToISO {
|
public class LocalDateToISO {
|
||||||
public String formatUsingDateTimeFormatter(LocalDate localDate) {
|
public String formatUsingDateTimeFormatter(LocalDate localDate) {
|
@ -1,45 +1,45 @@
|
|||||||
package com.baeldung.checkiftimebetweentwotimes;
|
package com.baeldung.checkiftimebetweentwotimes;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class CheckIfTimeBetweenTwoTimesUnitTest {
|
public class CheckIfTimeBetweenTwoTimesUnitTest {
|
||||||
private LocalTime startTime = LocalTime.parse("09:00:00");
|
private LocalTime startTime = LocalTime.parse("09:00:00");
|
||||||
private LocalTime endTime = LocalTime.parse("17:00:00");
|
private LocalTime endTime = LocalTime.parse("17:00:00");
|
||||||
private LocalTime targetTime = LocalTime.parse("12:30:00");
|
private LocalTime targetTime = LocalTime.parse("12:30:00");
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenLocalTime_whenUsingIsAfterIsBefore_thenTimeIsBetween() {
|
public void givenLocalTime_whenUsingIsAfterIsBefore_thenTimeIsBetween() {
|
||||||
assertTrue(!targetTime.isBefore(startTime) && !targetTime.isAfter(endTime));
|
assertTrue(!targetTime.isBefore(startTime) && !targetTime.isAfter(endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenLocalTime_whenUsingCompareTo_thenTimeIsBetween() {
|
public void givenLocalTime_whenUsingCompareTo_thenTimeIsBetween() {
|
||||||
assertTrue(targetTime.compareTo(startTime) >= 0 && targetTime.compareTo(endTime) <= 0);
|
assertTrue(targetTime.compareTo(startTime) >= 0 && targetTime.compareTo(endTime) <= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenDate_whenUsingAfterBefore_thenTimeIsBetween() {
|
public void givenDate_whenUsingAfterBefore_thenTimeIsBetween() {
|
||||||
Calendar startCalendar = Calendar.getInstance();
|
Calendar startCalendar = Calendar.getInstance();
|
||||||
startCalendar.set(Calendar.HOUR_OF_DAY, 9);
|
startCalendar.set(Calendar.HOUR_OF_DAY, 9);
|
||||||
startCalendar.set(Calendar.MINUTE, 0);
|
startCalendar.set(Calendar.MINUTE, 0);
|
||||||
Date startTime = startCalendar.getTime();
|
Date startTime = startCalendar.getTime();
|
||||||
|
|
||||||
Calendar endCalendar = Calendar.getInstance();
|
Calendar endCalendar = Calendar.getInstance();
|
||||||
endCalendar.set(Calendar.HOUR_OF_DAY, 17);
|
endCalendar.set(Calendar.HOUR_OF_DAY, 17);
|
||||||
endCalendar.set(Calendar.MINUTE, 0);
|
endCalendar.set(Calendar.MINUTE, 0);
|
||||||
Date endTime = endCalendar.getTime();
|
Date endTime = endCalendar.getTime();
|
||||||
|
|
||||||
Calendar targetCalendar = Calendar.getInstance();
|
Calendar targetCalendar = Calendar.getInstance();
|
||||||
targetCalendar.set(Calendar.HOUR_OF_DAY, 12);
|
targetCalendar.set(Calendar.HOUR_OF_DAY, 12);
|
||||||
targetCalendar.set(Calendar.MINUTE, 30);
|
targetCalendar.set(Calendar.MINUTE, 30);
|
||||||
Date targetTime = targetCalendar.getTime();
|
Date targetTime = targetCalendar.getTime();
|
||||||
|
|
||||||
assertTrue(!targetTime.before(startTime) && !targetTime.after(endTime));
|
assertTrue(!targetTime.before(startTime) && !targetTime.after(endTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,13 @@
|
|||||||
package com.baeldung.daterangeoverlap;
|
package com.baeldung.daterangeoverlap;
|
||||||
|
|
||||||
import static org.junit.Assert.assertFalse;
|
import org.joda.time.DateTime;
|
||||||
import static org.junit.Assert.assertTrue;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
import static org.junit.Assert.assertFalse;
|
||||||
import org.junit.Test;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class DateRangeOverlapCheckerUnitTest {
|
public class DateRangeOverlapCheckerUnitTest {
|
||||||
|
|
@ -1,13 +1,14 @@
|
|||||||
package com.baeldung.localdatetoiso;
|
package com.baeldung.localdatetoiso;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
public class LocalDateToISOUnitTest {
|
public class LocalDateToISOUnitTest {
|
||||||
@Test
|
@Test
|
||||||
void givenLocalDate_whenUsingDateTimeFormatter_thenISOFormat(){
|
public void givenLocalDate_whenUsingDateTimeFormatter_thenISOFormat(){
|
||||||
LocalDateToISO localDateToISO = new LocalDateToISO();
|
LocalDateToISO localDateToISO = new LocalDateToISO();
|
||||||
LocalDate localDate = LocalDate.of(2023, 11, 6);
|
LocalDate localDate = LocalDate.of(2023, 11, 6);
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ public class LocalDateToISOUnitTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenLocalDate_whenUsingSimpleDateFormat_thenISOFormat(){
|
public void givenLocalDate_whenUsingSimpleDateFormat_thenISOFormat(){
|
||||||
LocalDateToISO localDateToISO = new LocalDateToISO();
|
LocalDateToISO localDateToISO = new LocalDateToISO();
|
||||||
LocalDate localDate = LocalDate.of(2023, 11, 6);
|
LocalDate localDate = LocalDate.of(2023, 11, 6);
|
||||||
|
|
||||||
@ -27,17 +28,18 @@ public class LocalDateToISOUnitTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenLocalDate_whenUsingJodaTime_thenISOFormat() {
|
public void givenLocalDate_whenUsingJodaTime_thenISOFormat() {
|
||||||
LocalDateToISO localDateToISO = new LocalDateToISO();
|
LocalDateToISO localDateToISO = new LocalDateToISO();
|
||||||
org.joda.time.LocalDate localDate = new org.joda.time.LocalDate(2023, 11, 6);
|
org.joda.time.LocalDate localDate = new org.joda.time.LocalDate(2023, 11, 6);
|
||||||
|
|
||||||
String expected = "2023-11-06T00:00:00.000Z";
|
String expected = "2023-11-06T00:00:00.000Z";
|
||||||
String actual = localDateToISO.formatUsingJodaTime(localDate);
|
String actual = localDateToISO.formatUsingJodaTime(localDate);
|
||||||
assertEquals(expected, actual);
|
assertEquals(expected, actual);
|
||||||
|
assertEquals(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenLocalDate_whenUsingApacheCommonsLang_thenISOFormat() {
|
public void givenLocalDate_whenUsingApacheCommonsLang_thenISOFormat() {
|
||||||
LocalDateToISO localDateToISO = new LocalDateToISO();
|
LocalDateToISO localDateToISO = new LocalDateToISO();
|
||||||
LocalDate localDate = LocalDate.of(2023, 11, 6);
|
LocalDate localDate = LocalDate.of(2023, 11, 6);
|
||||||
|
|
@ -1,25 +1,25 @@
|
|||||||
package com.baeldung.zoneoffsetandzoneidof;
|
package com.baeldung.zoneoffsetandzoneidof;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
public class ZoneOffSetAndZoneIdOfUnitTest {
|
public class ZoneOffSetAndZoneIdOfUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenOffsetDateTimeWithUTCZoneOffset_thenOffsetShouldBeUTC() {
|
public void givenOffsetDateTimeWithUTCZoneOffset_thenOffsetShouldBeUTC() {
|
||||||
OffsetDateTime dateTimeWithOffset = OffsetDateTime.now(ZoneOffset.UTC);
|
OffsetDateTime dateTimeWithOffset = OffsetDateTime.now(ZoneOffset.UTC);
|
||||||
assertEquals(dateTimeWithOffset.getOffset(), ZoneOffset.UTC);
|
assertEquals(dateTimeWithOffset.getOffset(), ZoneOffset.UTC);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenZonedDateTimeWithUTCZoneId_thenZoneShouldBeUTC() {
|
public void givenZonedDateTimeWithUTCZoneId_thenZoneShouldBeUTC() {
|
||||||
ZonedDateTime zonedDateTime = ZonedDateTime.now(ZoneId.of("UTC"));
|
ZonedDateTime zonedDateTime = ZonedDateTime.now(ZoneId.of("UTC"));
|
||||||
assertEquals(zonedDateTime.getZone(), ZoneId.of("UTC"));
|
assertEquals(zonedDateTime.getZone(), ZoneId.of("UTC"));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,3 +12,4 @@ This module contains articles about core Java input/output(IO) APIs.
|
|||||||
- [Read Input Character-by-Character in Java](https://www.baeldung.com/java-read-input-character)
|
- [Read Input Character-by-Character in Java](https://www.baeldung.com/java-read-input-character)
|
||||||
- [Difference Between flush() and close() in Java FileWriter](https://www.baeldung.com/java-filewriter-flush-vs-close)
|
- [Difference Between flush() and close() in Java FileWriter](https://www.baeldung.com/java-filewriter-flush-vs-close)
|
||||||
- [Get a Path to a Resource in a Java JAR File](https://www.baeldung.com/java-get-path-resource-jar)
|
- [Get a Path to a Resource in a Java JAR File](https://www.baeldung.com/java-get-path-resource-jar)
|
||||||
|
- [Java InputStream vs. InputStreamReader](https://www.baeldung.com/java-inputstream-vs-inputstreamreader)
|
||||||
|
@ -13,4 +13,3 @@ This module contains articles about core Java input/output(IO) APIs.
|
|||||||
- [Difference Between FileReader and BufferedReader in Java](https://www.baeldung.com/java-filereader-vs-bufferedreader)
|
- [Difference Between FileReader and BufferedReader in Java](https://www.baeldung.com/java-filereader-vs-bufferedreader)
|
||||||
- [Read Multiple Inputs on the Same Line in Java](https://www.baeldung.com/java-read-multiple-inputs-same-line)
|
- [Read Multiple Inputs on the Same Line in Java](https://www.baeldung.com/java-read-multiple-inputs-same-line)
|
||||||
- [Write Console Output to Text File in Java](https://www.baeldung.com/java-write-console-output-file)
|
- [Write Console Output to Text File in Java](https://www.baeldung.com/java-write-console-output-file)
|
||||||
- [Java InputStream vs. InputStreamReader](https://www.baeldung.com/java-inputstream-vs-inputstreamreader)
|
|
||||||
|
@ -12,6 +12,13 @@
|
|||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>maven</id>
|
||||||
|
<url>https://maven.openimaj.org/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.imagej</groupId>
|
<groupId>net.imagej</groupId>
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
package com.baeldung.gson.polymorphic;
|
||||||
|
|
||||||
|
public interface Shape {
|
||||||
|
double getArea();
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.baeldung.gson.polymorphic;
|
||||||
|
|
||||||
|
import com.google.gson.*;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
|
||||||
|
public class ShapeTypeAdapter implements JsonSerializer<Shape>, JsonDeserializer<Shape> {
|
||||||
|
@Override
|
||||||
|
public JsonElement serialize(Shape shape, Type type, JsonSerializationContext context) {
|
||||||
|
JsonElement elem = new Gson().toJsonTree(shape);
|
||||||
|
elem.getAsJsonObject().addProperty("type", shape.getClass().getName());
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Shape deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
|
||||||
|
JsonObject jsonObject = json.getAsJsonObject();
|
||||||
|
String typeName = jsonObject.get("type").getAsString();
|
||||||
|
|
||||||
|
try {
|
||||||
|
Class<? extends Shape> cls = (Class<? extends Shape>) Class.forName(typeName);
|
||||||
|
return new Gson().fromJson(json, cls);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new JsonParseException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,117 @@
|
|||||||
|
package com.baeldung.gson.polymorphic;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
public class TypeAdapterUnitTest {
|
||||||
|
@Test
|
||||||
|
void testSerialize() {
|
||||||
|
List<Shape> shapes = Arrays.asList(
|
||||||
|
new Circle(4d),
|
||||||
|
new Square(5d)
|
||||||
|
);
|
||||||
|
|
||||||
|
GsonBuilder builder = new GsonBuilder();
|
||||||
|
builder.registerTypeHierarchyAdapter(Shape.class, new ShapeTypeAdapter());
|
||||||
|
Gson gson = builder.create();
|
||||||
|
|
||||||
|
String json = gson.toJson(shapes);
|
||||||
|
|
||||||
|
assertEquals("[" +
|
||||||
|
"{" +
|
||||||
|
"\"radius\":4.0," +
|
||||||
|
"\"area\":50.26548245743669," +
|
||||||
|
"\"type\":\"com.baeldung.gson.polymorphic.TypeAdapterUnitTest$Circle\"" +
|
||||||
|
"},{" +
|
||||||
|
"\"side\":5.0," +
|
||||||
|
"\"area\":25.0," +
|
||||||
|
"\"type\":\"com.baeldung.gson.polymorphic.TypeAdapterUnitTest$Square\"" +
|
||||||
|
"}]", json);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testDeserializeWrapper() {
|
||||||
|
List<Shape> shapes = Arrays.asList(
|
||||||
|
new Circle(4d),
|
||||||
|
new Square(5d)
|
||||||
|
);
|
||||||
|
|
||||||
|
GsonBuilder builder = new GsonBuilder();
|
||||||
|
builder.registerTypeHierarchyAdapter(Shape.class, new ShapeTypeAdapter());
|
||||||
|
Gson gson = builder.create();
|
||||||
|
|
||||||
|
String json = gson.toJson(shapes);
|
||||||
|
|
||||||
|
Type collectionType = new TypeToken<List<Shape>>(){}.getType();
|
||||||
|
List<Shape> result = gson.fromJson(json, collectionType);
|
||||||
|
|
||||||
|
assertEquals(shapes, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Square implements Shape {
|
||||||
|
private final double side;
|
||||||
|
private final double area;
|
||||||
|
|
||||||
|
public Square(double side) {
|
||||||
|
this.side = side;
|
||||||
|
this.area = side * side;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
Square square = (Square) o;
|
||||||
|
return Double.compare(square.side, side) == 0 && Double.compare(square.area, area) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(side, area);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Circle implements Shape {
|
||||||
|
private final double radius;
|
||||||
|
|
||||||
|
private final double area;
|
||||||
|
|
||||||
|
public Circle(double radius) {
|
||||||
|
this.radius = radius;
|
||||||
|
this.area = Math.PI * radius * radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
Circle circle = (Circle) o;
|
||||||
|
return Double.compare(circle.radius, radius) == 0 && Double.compare(circle.area, area) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(radius, area);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package com.baeldung.gson.polymorphic;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
public class TypeFieldUnitTest {
|
||||||
|
@Test
|
||||||
|
void testSerialize() {
|
||||||
|
List<Shape> shapes = Arrays.asList(
|
||||||
|
new Circle(4d),
|
||||||
|
new Square(5d)
|
||||||
|
);
|
||||||
|
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(shapes);
|
||||||
|
|
||||||
|
assertEquals("[" +
|
||||||
|
"{" +
|
||||||
|
"\"type\":\"circle\"," +
|
||||||
|
"\"radius\":4.0," +
|
||||||
|
"\"area\":50.26548245743669" +
|
||||||
|
"},{" +
|
||||||
|
"\"type\":\"square\"," +
|
||||||
|
"\"side\":5.0," +
|
||||||
|
"\"area\":25.0" +
|
||||||
|
"}]", json);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Square implements Shape {
|
||||||
|
private final String type = "square";
|
||||||
|
private final double side;
|
||||||
|
private final double area;
|
||||||
|
|
||||||
|
public Square(double side) {
|
||||||
|
this.side = side;
|
||||||
|
this.area = side * side;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Circle implements Shape {
|
||||||
|
private final String type = "circle";
|
||||||
|
private final double radius;
|
||||||
|
|
||||||
|
private final double area;
|
||||||
|
|
||||||
|
public Circle(double radius) {
|
||||||
|
this.radius = radius;
|
||||||
|
this.area = Math.PI * radius * radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,148 @@
|
|||||||
|
package com.baeldung.gson.polymorphic;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
public class WrapperUnitTest {
|
||||||
|
@Test
|
||||||
|
void testSerializeWrapper() {
|
||||||
|
List<Wrapper> shapes = Arrays.asList(
|
||||||
|
new Wrapper(new Circle(4d)),
|
||||||
|
new Wrapper(new Square(5d))
|
||||||
|
);
|
||||||
|
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(shapes);
|
||||||
|
|
||||||
|
assertEquals("[" +
|
||||||
|
"{" +
|
||||||
|
"\"circle\":{" +
|
||||||
|
"\"radius\":4.0," +
|
||||||
|
"\"area\":50.26548245743669" +
|
||||||
|
"}" +
|
||||||
|
"},{" +
|
||||||
|
"\"square\":{" +
|
||||||
|
"\"side\":5.0," +
|
||||||
|
"\"area\":25.0" +
|
||||||
|
"}" +
|
||||||
|
"}]", json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testDeserializeWrapper() {
|
||||||
|
List<Wrapper> shapes = Arrays.asList(
|
||||||
|
new Wrapper(new Circle(4d)),
|
||||||
|
new Wrapper(new Square(5d))
|
||||||
|
);
|
||||||
|
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(shapes);
|
||||||
|
|
||||||
|
Type collectionType = new TypeToken<List<Wrapper>>(){}.getType();
|
||||||
|
List<Wrapper> result = gson.fromJson(json, collectionType);
|
||||||
|
|
||||||
|
assertEquals(shapes, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Square implements Shape {
|
||||||
|
private final double side;
|
||||||
|
private final double area;
|
||||||
|
|
||||||
|
public Square(double side) {
|
||||||
|
this.side = side;
|
||||||
|
this.area = side * side;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
Square square = (Square) o;
|
||||||
|
return Double.compare(square.side, side) == 0 && Double.compare(square.area, area) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(side, area);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Circle implements Shape {
|
||||||
|
private final double radius;
|
||||||
|
|
||||||
|
private final double area;
|
||||||
|
|
||||||
|
public Circle(double radius) {
|
||||||
|
this.radius = radius;
|
||||||
|
this.area = Math.PI * radius * radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
Circle circle = (Circle) o;
|
||||||
|
return Double.compare(circle.radius, radius) == 0 && Double.compare(circle.area, area) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(radius, area);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Wrapper {
|
||||||
|
private final Circle circle;
|
||||||
|
private final Square square;
|
||||||
|
|
||||||
|
public Wrapper(Circle circle) {
|
||||||
|
this.circle = circle;
|
||||||
|
this.square = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Wrapper(Square square) {
|
||||||
|
this.square = square;
|
||||||
|
this.circle = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Circle getCircle() {
|
||||||
|
return circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Square getSquare() {
|
||||||
|
return square;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
Wrapper wrapper = (Wrapper) o;
|
||||||
|
return Objects.equals(circle, wrapper.circle) && Objects.equals(square, wrapper.square);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(circle, square);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -36,7 +36,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sun.xml.ws</groupId>
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
<artifactId>jaxws-ri</artifactId>
|
<artifactId>jaxws-ri</artifactId>
|
||||||
<version>2.3.0</version>
|
<version>${jaxws.version}</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.sun.xml.ws</groupId>
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
<artifactId>jaxws-maven-plugin</artifactId>
|
<artifactId>jaxws-maven-plugin</artifactId>
|
||||||
<version>4.0.1</version>
|
<version>${jaxws.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
@ -73,4 +73,8 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<jaxws.version>4.0.2</jaxws.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -14,6 +14,13 @@
|
|||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>wso2-https</id>
|
||||||
|
<url>https://maven.wso2.org/nexus/content/groups/wso2-public/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -40,7 +47,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<microservice.mainClass>com.baeldung.msf4j.msf4jintro.Application</microservice.mainClass>
|
<microservice.mainClass>com.baeldung.msf4j.msf4jintro.Application</microservice.mainClass>
|
||||||
<msf4j.version>2.6.3</msf4j.version>
|
<msf4j.version>2.8.11</msf4j.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -9,10 +9,9 @@
|
|||||||
<description>Demo project for Spring Boot</description>
|
<description>Demo project for Spring Boot</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>parent-boot-3</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-3</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -9,10 +9,9 @@
|
|||||||
<description>Demo project for Spring Boot</description>
|
<description>Demo project for Spring Boot</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>parent-boot-3</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-3</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -11,10 +11,9 @@
|
|||||||
|
|
||||||
<!-- "sam build" needs all the dependencies including its parent project. Hence, we cannot use parent-boot in this case -->
|
<!-- "sam build" needs all the dependencies including its parent project. Hence, we cannot use parent-boot in this case -->
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<version>3.1.5</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath/>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -9,10 +9,9 @@
|
|||||||
<description>Module For Spring Boot Basic Customization 3</description>
|
<description>Module For Spring Boot Basic Customization 3</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>parent-boot-3</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-3</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
<description>spring-boot-data-3</description>
|
<description>spring-boot-data-3</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>parent-boot-3</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-3</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
<description>Spring Boot Todo Application with Groovy</description>
|
<description>Spring Boot Todo Application with Groovy</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>parent-boot-3</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-3</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -6,10 +6,9 @@
|
|||||||
<artifactId>spring-boot-libraries-3</artifactId>
|
<artifactId>spring-boot-libraries-3</artifactId>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>parent-boot-3</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-3</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
<description>Module For Spring Boot Swagger</description>
|
<description>Module For Spring Boot Swagger</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||||
<artifactId>parent-boot-3</artifactId>
|
<artifactId>spring-boot-modules</artifactId>
|
||||||
<relativePath>../../parent-boot-3</relativePath>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -16,6 +16,13 @@
|
|||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>jboss-https</id>
|
||||||
|
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user