linkedHashMap = new LinkedCaseInsensitiveMap<>();
+ linkedHashMap.put("abc", 3);
+ linkedHashMap.remove("aBC");
+
+ assertEquals(0, linkedHashMap.size());
+ }
+}
diff --git a/java-numbers-3/README.md b/java-numbers-3/README.md
index 598acfb927..f818bdb675 100644
--- a/java-numbers-3/README.md
+++ b/java-numbers-3/README.md
@@ -10,4 +10,5 @@ This module contains articles about numbers in Java.
- [Generating Random Numbers in a Range in Java](https://www.baeldung.com/java-generating-random-numbers-in-range)
- [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)
+- [Guide to the Number Class in Java](https://www.baeldung.com/java-number-class)
- More articles: [[<-- prev]](/java-numbers-2)
diff --git a/java-numbers/README.md b/java-numbers/README.md
index 8f53006b38..f4b76c3c98 100644
--- a/java-numbers/README.md
+++ b/java-numbers/README.md
@@ -12,4 +12,5 @@ This module contains articles about numbers in Java.
- [Calculating the nth Root in Java](https://www.baeldung.com/java-nth-root)
- [Convert Double to String, Removing Decimal Places](https://www.baeldung.com/java-double-to-string)
- [Changing the Order in a Sum Operation Can Produce Different Results?](https://www.baeldung.com/java-floating-point-sum-order)
+- [Using Math.sin with Degrees](https://www.baeldung.com/java-math-sin-degrees)
- More articles: [[next -->]](/../java-numbers-2)
diff --git a/jee-7/pom.xml b/jee-7/pom.xml
index a2593e46a5..7352c6550a 100644
--- a/jee-7/pom.xml
+++ b/jee-7/pom.xml
@@ -242,6 +242,29 @@
+
+
+ org.codehaus.mojo
+ jaxws-maven-plugin
+ 2.6
+
+
+ wsimport-from-jdk
+
+ wsimport
+
+
+
+
+ src/main/resources
+
+ country.wsdl
+
+ true
+ com.baeldung.soap.ws.client.generated
+ src/main/java
+
+
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/Country.java b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/Country.java
new file mode 100644
index 0000000000..6a810b9afa
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/Country.java
@@ -0,0 +1,129 @@
+
+package com.baeldung.soap.ws.client.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Java class for country complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="country">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="capital" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="currency" type="{http://server.ws.soap.baeldung.com/}currency" minOccurs="0"/>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="population" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "country", propOrder = { "capital", "currency", "name", "population" })
+public class Country {
+
+ protected String capital;
+ @XmlSchemaType(name = "string")
+ protected Currency currency;
+ protected String name;
+ protected int population;
+
+ /**
+ * Gets the value of the capital property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCapital() {
+ return capital;
+ }
+
+ /**
+ * Sets the value of the capital property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCapital(String value) {
+ this.capital = value;
+ }
+
+ /**
+ * Gets the value of the currency property.
+ *
+ * @return
+ * possible object is
+ * {@link Currency }
+ *
+ */
+ public Currency getCurrency() {
+ return currency;
+ }
+
+ /**
+ * Sets the value of the currency property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Currency }
+ *
+ */
+ public void setCurrency(Currency value) {
+ this.currency = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the population property.
+ *
+ */
+ public int getPopulation() {
+ return population;
+ }
+
+ /**
+ * Sets the value of the population property.
+ *
+ */
+ public void setPopulation(int value) {
+ this.population = value;
+ }
+
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/CountryService.java b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/CountryService.java
new file mode 100644
index 0000000000..bda4a305a5
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/CountryService.java
@@ -0,0 +1,34 @@
+
+package com.baeldung.soap.ws.client.generated;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.3.2
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "CountryService", targetNamespace = "http://server.ws.soap.baeldung.com/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@XmlSeeAlso({ ObjectFactory.class })
+public interface CountryService {
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns com.baeldung.soap.ws.client.generated.Country
+ */
+ @WebMethod
+ @WebResult(partName = "return")
+ @Action(input = "http://server.ws.soap.baeldung.com/CountryService/findByNameRequest", output = "http://server.ws.soap.baeldung.com/CountryService/findByNameResponse")
+ public Country findByName(@WebParam(name = "arg0", partName = "arg0") String arg0);
+
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/CountryServiceImplService.java b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/CountryServiceImplService.java
new file mode 100644
index 0000000000..09f4c29202
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/CountryServiceImplService.java
@@ -0,0 +1,91 @@
+
+package com.baeldung.soap.ws.client.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.3.2
+ * Generated source version: 2.2
+ *
+ */
+@WebServiceClient(name = "CountryServiceImplService", targetNamespace = "http://server.ws.soap.baeldung.com/", wsdlLocation = "file:src/main/resources/country.wsdl")
+public class CountryServiceImplService extends Service {
+
+ private final static URL COUNTRYSERVICEIMPLSERVICE_WSDL_LOCATION;
+ private final static WebServiceException COUNTRYSERVICEIMPLSERVICE_EXCEPTION;
+ private final static QName COUNTRYSERVICEIMPLSERVICE_QNAME = new QName("http://server.ws.soap.baeldung.com/", "CountryServiceImplService");
+
+ static {
+ URL url = null;
+ WebServiceException e = null;
+ try {
+ url = new URL("file:src/main/resources/country.wsdl");
+ } catch (MalformedURLException ex) {
+ e = new WebServiceException(ex);
+ }
+ COUNTRYSERVICEIMPLSERVICE_WSDL_LOCATION = url;
+ COUNTRYSERVICEIMPLSERVICE_EXCEPTION = e;
+ }
+
+ public CountryServiceImplService() {
+ super(__getWsdlLocation(), COUNTRYSERVICEIMPLSERVICE_QNAME);
+ }
+
+ public CountryServiceImplService(WebServiceFeature... features) {
+ super(__getWsdlLocation(), COUNTRYSERVICEIMPLSERVICE_QNAME, features);
+ }
+
+ public CountryServiceImplService(URL wsdlLocation) {
+ super(wsdlLocation, COUNTRYSERVICEIMPLSERVICE_QNAME);
+ }
+
+ public CountryServiceImplService(URL wsdlLocation, WebServiceFeature... features) {
+ super(wsdlLocation, COUNTRYSERVICEIMPLSERVICE_QNAME, features);
+ }
+
+ public CountryServiceImplService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public CountryServiceImplService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns CountryService
+ */
+ @WebEndpoint(name = "CountryServiceImplPort")
+ public CountryService getCountryServiceImplPort() {
+ return super.getPort(new QName("http://server.ws.soap.baeldung.com/", "CountryServiceImplPort"), CountryService.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values.
+ * @return
+ * returns CountryService
+ */
+ @WebEndpoint(name = "CountryServiceImplPort")
+ public CountryService getCountryServiceImplPort(WebServiceFeature... features) {
+ return super.getPort(new QName("http://server.ws.soap.baeldung.com/", "CountryServiceImplPort"), CountryService.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (COUNTRYSERVICEIMPLSERVICE_EXCEPTION != null) {
+ throw COUNTRYSERVICEIMPLSERVICE_EXCEPTION;
+ }
+ return COUNTRYSERVICEIMPLSERVICE_WSDL_LOCATION;
+ }
+
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/Currency.java b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/Currency.java
new file mode 100644
index 0000000000..8b9355edc5
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/Currency.java
@@ -0,0 +1,37 @@
+
+package com.baeldung.soap.ws.client.generated;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Java class for currency.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="currency">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="EUR"/>
+ * <enumeration value="INR"/>
+ * <enumeration value="USD"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "currency")
+@XmlEnum
+public enum Currency {
+
+ EUR, INR, USD;
+
+ public String value() {
+ return name();
+ }
+
+ public static Currency fromValue(String v) {
+ return valueOf(v);
+ }
+
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/ObjectFactory.java b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/ObjectFactory.java
new file mode 100644
index 0000000000..241debe758
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/ObjectFactory.java
@@ -0,0 +1,38 @@
+
+package com.baeldung.soap.ws.client.generated;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.baeldung.soap.ws.client.generated package.
+ * An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.baeldung.soap.ws.client.generated
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link Country }
+ *
+ */
+ public Country createCountry() {
+ return new Country();
+ }
+
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/package-info.java b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/package-info.java
new file mode 100644
index 0000000000..6df70b70f1
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/client/generated/package-info.java
@@ -0,0 +1,2 @@
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://server.ws.soap.baeldung.com/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package com.baeldung.soap.ws.client.generated;
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/server/Country.java b/jee-7/src/main/java/com/baeldung/soap/ws/server/Country.java
new file mode 100644
index 0000000000..62ea4a22ed
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/server/Country.java
@@ -0,0 +1,41 @@
+package com.baeldung.soap.ws.server;
+
+public class Country {
+ protected String name;
+ protected int population;
+ protected String capital;
+ protected Currency currency;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getPopulation() {
+ return population;
+ }
+
+ public void setPopulation(int population) {
+ this.population = population;
+ }
+
+ public String getCapital() {
+ return capital;
+ }
+
+ public void setCapital(String capital) {
+ this.capital = capital;
+ }
+
+ public Currency getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(Currency currency) {
+ this.currency = currency;
+ }
+
+}
\ No newline at end of file
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryRepository.java b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryRepository.java
new file mode 100644
index 0000000000..558f7c1293
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryRepository.java
@@ -0,0 +1,43 @@
+package com.baeldung.soap.ws.server;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class CountryRepository {
+
+ private static final Map countries = new HashMap<>();
+
+ {
+ initData();
+ }
+
+ private final static void initData() {
+ Country usa = new Country();
+ usa.setName("USA");
+ usa.setCapital("Washington D.C.");
+ usa.setCurrency(Currency.USD);
+ usa.setPopulation(323947000);
+
+ countries.put(usa.getName(), usa);
+
+ Country india = new Country();
+ india.setName("India");
+ india.setCapital("New Delhi");
+ india.setCurrency(Currency.INR);
+ india.setPopulation(1295210000);
+
+ countries.put(india.getName(), india);
+
+ Country france = new Country();
+ france.setName("France");
+ france.setCapital("Paris");
+ france.setCurrency(Currency.EUR);
+ france.setPopulation(66710000);
+
+ countries.put(france.getName(), france);
+ }
+
+ public Country findCountry(String name) {
+ return countries.get(name);
+ }
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryService.java b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryService.java
new file mode 100644
index 0000000000..e3f68a4e59
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryService.java
@@ -0,0 +1,15 @@
+package com.baeldung.soap.ws.server;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+@WebService
+@SOAPBinding(style=Style.RPC)
+public interface CountryService {
+
+ @WebMethod
+ Country findByName(String name);
+
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryServiceImpl.java b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryServiceImpl.java
new file mode 100644
index 0000000000..a8c6250354
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryServiceImpl.java
@@ -0,0 +1,15 @@
+package com.baeldung.soap.ws.server;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface = "com.baeldung.soap.ws.server.CountryService")
+public class CountryServiceImpl implements CountryService {
+
+ private CountryRepository countryRepository = new CountryRepository();
+
+ @Override
+ public Country findByName(String name) {
+ return countryRepository.findCountry(name);
+ }
+
+}
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryServicePublisher.java b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryServicePublisher.java
new file mode 100644
index 0000000000..e7c1c480f4
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/server/CountryServicePublisher.java
@@ -0,0 +1,19 @@
+package com.baeldung.soap.ws.server;
+
+import javax.xml.ws.Endpoint;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class CountryServicePublisher {
+
+ private static final Logger logger = LoggerFactory.getLogger(CountryServicePublisher.class);
+
+ public static void main(String[] args) {
+ Endpoint endpoint = Endpoint.create(new CountryServiceImpl());
+ endpoint.publish("http://localhost:8888/ws/country");
+
+ logger.info("Country web service ready to consume requests!");
+ }
+}
\ No newline at end of file
diff --git a/jee-7/src/main/java/com/baeldung/soap/ws/server/Currency.java b/jee-7/src/main/java/com/baeldung/soap/ws/server/Currency.java
new file mode 100644
index 0000000000..d1b25a26c6
--- /dev/null
+++ b/jee-7/src/main/java/com/baeldung/soap/ws/server/Currency.java
@@ -0,0 +1,15 @@
+package com.baeldung.soap.ws.server;
+
+public enum Currency {
+
+ EUR, INR, USD;
+
+ public String value() {
+ return name();
+ }
+
+ public static Currency fromValue(String v) {
+ return valueOf(v);
+ }
+
+}
diff --git a/jee-7/src/main/resources/country.wsdl b/jee-7/src/main/resources/country.wsdl
new file mode 100644
index 0000000000..4d41fce322
--- /dev/null
+++ b/jee-7/src/main/resources/country.wsdl
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jee-7/src/main/resources/country.xsd b/jee-7/src/main/resources/country.xsd
new file mode 100644
index 0000000000..c94b6047f9
--- /dev/null
+++ b/jee-7/src/main/resources/country.xsd
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jee-7/src/test/java/com/baeldung/soap/ws/client/CountryClientLiveTest.java b/jee-7/src/test/java/com/baeldung/soap/ws/client/CountryClientLiveTest.java
new file mode 100644
index 0000000000..ae423f9bdd
--- /dev/null
+++ b/jee-7/src/test/java/com/baeldung/soap/ws/client/CountryClientLiveTest.java
@@ -0,0 +1,39 @@
+package com.baeldung.soap.ws.client;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.baeldung.soap.ws.client.generated.CountryService;
+import com.baeldung.soap.ws.client.generated.CountryServiceImplService;
+import com.baeldung.soap.ws.client.generated.Currency;
+
+//Ensure that com.baeldung.soap.ws.server.CountryServicePublisher is running before executing this test
+public class CountryClientLiveTest {
+
+ private static CountryService countryService;
+
+ @BeforeClass
+ public static void setup() {
+ CountryServiceImplService service = new CountryServiceImplService();
+ countryService = service.getCountryServiceImplPort();
+ }
+
+ @Test
+ public void givenCountryService_whenCountryIndia_thenCapitalIsNewDelhi() {
+ assertEquals("New Delhi", countryService.findByName("India").getCapital());
+ }
+
+ @Test
+ public void givenCountryService_whenCountryFrance_thenPopulationCorrect() {
+ assertEquals(66710000, countryService.findByName("France").getPopulation());
+ }
+
+ @Test
+ public void givenCountryService_whenCountryUSA_thenCurrencyUSD() {
+ assertEquals(Currency.USD, countryService.findByName("USA").getCurrency());
+ }
+
+
+}
diff --git a/jgit/pom.xml b/jgit/pom.xml
index eef3c9b8e8..d960843868 100644
--- a/jgit/pom.xml
+++ b/jgit/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- JGit
+ jgit
1.0-SNAPSHOT
- JGit
+ jgit
jar
http://maven.apache.org
diff --git a/jhipster-5/bookstore-monolith/pom.xml b/jhipster-5/bookstore-monolith/pom.xml
index 5eaf761921..233765e0f3 100644
--- a/jhipster-5/bookstore-monolith/pom.xml
+++ b/jhipster-5/bookstore-monolith/pom.xml
@@ -7,7 +7,7 @@
0.0.1-SNAPSHOT
war
Bookstore
-
+
jhipster-5
com.baeldung.jhipster
@@ -982,7 +982,7 @@
com.github.eirslett
- frontend-maven-plugin
+ frontend-maven-plugin
${frontend-maven-plugin.version}
install-node-and-npm
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperUnitTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperUnitTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperIntegrationTest.java
index cd6a326c06..cd49135d63 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperUnitTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperIntegrationTest.java
@@ -26,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class UserMapperUnitTest {
+public class UserMapperIntegrationTest {
private static final String DEFAULT_LOGIN = "johndoe";
diff --git a/jhipster-5/pom.xml b/jhipster-5/pom.xml
index cebbe25d8b..2a5132e50e 100644
--- a/jhipster-5/pom.xml
+++ b/jhipster-5/pom.xml
@@ -9,10 +9,10 @@
pom
- parent-boot-1
+ parent-boot-2
com.baeldung
0.0.1-SNAPSHOT
- ../parent-boot-1
+ ../parent-boot-2
diff --git a/jjwt/pom.xml b/jjwt/pom.xml
index 073f12a922..aa238fafb5 100644
--- a/jjwt/pom.xml
+++ b/jjwt/pom.xml
@@ -10,9 +10,9 @@
com.baeldung
- parent-boot-1
+ parent-boot-2
0.0.1-SNAPSHOT
- ../parent-boot-1
+ ../parent-boot-2
@@ -30,6 +30,11 @@
org.springframework.boot
spring-boot-starter-security
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
io.jsonwebtoken
diff --git a/jmeter/pom.xml b/jmeter/pom.xml
index 64642695ff..945210edd7 100644
--- a/jmeter/pom.xml
+++ b/jmeter/pom.xml
@@ -9,9 +9,9 @@
com.baeldung
- parent-boot-1
+ parent-boot-2
0.0.1-SNAPSHOT
- ../parent-boot-1
+ ../parent-boot-2
diff --git a/jws/pom.xml b/jws/pom.xml
index e6ab7e05ec..be42798fd1 100644
--- a/jws/pom.xml
+++ b/jws/pom.xml
@@ -14,26 +14,6 @@
1.0.0-SNAPSHOT
-
-
- OpenNMS Repository
- http://repo.opennms.org/maven2/
-
-
-
-
-
- javax.samples.jnlp
- jnlp-servlet
- ${jnlp-servlet.version}
-
-
- javax.samples.jnlp
- jnlp-jardiff
- ${jnlp-jardiff.version}
-
-
-
${project.artifactId}
@@ -84,8 +64,6 @@
3.0.2
- 1.6.0
- 1.6.0
diff --git a/libraries-2/README.md b/libraries-2/README.md
index eb45a3e426..edf513c6ee 100644
--- a/libraries-2/README.md
+++ b/libraries-2/README.md
@@ -14,11 +14,9 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [Guide to Java Parallel Collectors Library](https://www.baeldung.com/java-parallel-collectors)
- [Templating with Handlebars](https://www.baeldung.com/handlebars)
- [A Guide to Crawler4j](https://www.baeldung.com/crawler4j)
-- [Decode an OkHttp JSON Response](https://www.baeldung.com/okhttp-json-response)
- [Key Value Store with Chronicle Map](https://www.baeldung.com/java-chronicle-map)
- [Guide to MapDB](https://www.baeldung.com/mapdb)
- [A Guide to Apache Mesos](https://www.baeldung.com/apache-mesos)
- [JasperReports with Spring](https://www.baeldung.com/spring-jasper)
-- [Jetty ReactiveStreams HTTP Client](https://www.baeldung.com/jetty-reactivestreams-http-client)
- More articles [[<-- prev]](/libraries)
diff --git a/libraries-2/pom.xml b/libraries-2/pom.xml
index 474ff563c2..3aa36c3f90 100644
--- a/libraries-2/pom.xml
+++ b/libraries-2/pom.xml
@@ -75,28 +75,7 @@
-
-
- com.squareup.okhttp3
- okhttp
- ${okhttp.version}
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson.version}
-
-
- com.google.code.gson
- gson
- ${gson.version}
-
-
- com.squareup.okhttp3
- mockwebserver
- ${mockwebserver.version}
- test
-
+
edu.uci.ics
crawler4j
@@ -151,9 +130,6 @@
2.1.4.RELEASE
0.28.3
1.1.0
- 3.14.2
- 2.8.5
- 3.14.2
4.1.2
6.6.0
5.1.9.RELEASE
diff --git a/libraries-3/README.md b/libraries-3/README.md
index f3c3375098..ec433960ef 100644
--- a/libraries-3/README.md
+++ b/libraries-3/README.md
@@ -15,4 +15,5 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [Introduction to the jcabi-aspects AOP Annotations Library](https://www.baeldung.com/java-jcabi-aspects)
- [Introduction to Takes](https://www.baeldung.com/java-takes)
- [Using NullAway to Avoid NullPointerExceptions](https://www.baeldung.com/java-nullaway)
-
+- [Introduction to Alibaba Arthas](https://www.baeldung.com/java-alibaba-arthas-intro)
+- [Quick Guide to Spring Cloud Circuit Breaker](https://www.baeldung.com/spring-cloud-circuit-breaker)
diff --git a/libraries-concurrency/README.md b/libraries-concurrency/README.md
new file mode 100644
index 0000000000..d1ffe81fa8
--- /dev/null
+++ b/libraries-concurrency/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Intro to Coroutines with Quasar](https://www.baeldung.com/java-quasar-coroutines)
diff --git a/libraries-data-2/README.md b/libraries-data-2/README.md
index 24618b5e37..f992186bd9 100644
--- a/libraries-data-2/README.md
+++ b/libraries-data-2/README.md
@@ -11,4 +11,7 @@ This module contains articles about libraries for data processing in Java.
- [Guide to JMapper](https://www.baeldung.com/jmapper)
- [An Introduction to SuanShu](https://www.baeldung.com/suanshu)
- [Intro to Derive4J](https://www.baeldung.com/derive4j)
-More articles: [[<-- prev]](/../libraries-data)
\ No newline at end of file
+More articles: [[<-- prev]](/../libraries-data)
+
+##### Building the project
+You can build the project from the command line using: *mvn clean install*, or in an IDE. If you have issues with the derive4j imports in your IDE, you have to add the folder: *target/generated-sources/annotations* to the project build path in your IDE.
diff --git a/libraries-http-2/README.md b/libraries-http-2/README.md
new file mode 100644
index 0000000000..5ba45eb4a9
--- /dev/null
+++ b/libraries-http-2/README.md
@@ -0,0 +1,10 @@
+## HTTP
+
+This module contains articles about HTTP libraries.
+
+### Relevant Articles:
+
+- [Jetty ReactiveStreams HTTP Client](https://www.baeldung.com/jetty-reactivestreams-http-client)
+- [Decode an OkHttp JSON Response](https://www.baeldung.com/okhttp-json-response)
+- More articles [[<-- prev]](/libraries-http)
+
diff --git a/libraries-http-2/pom.xml b/libraries-http-2/pom.xml
new file mode 100644
index 0000000000..c0a4f6455d
--- /dev/null
+++ b/libraries-http-2/pom.xml
@@ -0,0 +1,47 @@
+
+
+ 4.0.0
+ libraries-http-2
+ libraries-http-2
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
+
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ ${okhttp.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
+ com.google.code.gson
+ gson
+ ${gson.version}
+
+
+ com.squareup.okhttp3
+ mockwebserver
+ ${mockwebserver.version}
+ test
+
+
+
+
+ 3.14.2
+ 2.8.5
+ 3.14.2
+ 2.9.8
+
+
+
diff --git a/libraries-2/src/test/java/com/baeldung/okhttp/ResponseDecoderUnitTest.java b/libraries-http-2/src/test/java/com/baeldung/okhttp/ResponseDecoderUnitTest.java
similarity index 100%
rename from libraries-2/src/test/java/com/baeldung/okhttp/ResponseDecoderUnitTest.java
rename to libraries-http-2/src/test/java/com/baeldung/okhttp/ResponseDecoderUnitTest.java
diff --git a/libraries-2/src/test/java/com/baeldung/okhttp/SimpleEntity.java b/libraries-http-2/src/test/java/com/baeldung/okhttp/SimpleEntity.java
similarity index 100%
rename from libraries-2/src/test/java/com/baeldung/okhttp/SimpleEntity.java
rename to libraries-http-2/src/test/java/com/baeldung/okhttp/SimpleEntity.java
diff --git a/libraries-http/README.md b/libraries-http/README.md
index 1f065a9d4a..61b2904cee 100644
--- a/libraries-http/README.md
+++ b/libraries-http/README.md
@@ -14,3 +14,4 @@ This module contains articles about HTTP libraries.
- [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)
- [A Quick Guide to Post Requests with OkHttp](https://www.baeldung.com/okhttp-post)
+- More articles [[next -->]](/libraries-http-2)
diff --git a/libraries-security/pom.xml b/libraries-security/pom.xml
index e287de4527..e02f766141 100644
--- a/libraries-security/pom.xml
+++ b/libraries-security/pom.xml
@@ -8,9 +8,9 @@
com.baeldung
- parent-boot-1
+ parent-boot-2
0.0.1-SNAPSHOT
- ../parent-boot-1
+ ../parent-boot-2
@@ -23,7 +23,9 @@
org.springframework.security.oauth
spring-security-oauth2
+ ${spring-boot.version}
+
org.springframework
spring-web
diff --git a/libraries-security/src/main/resources/Baeldung.p12 b/libraries-security/src/main/resources/Baeldung.p12
new file mode 100644
index 0000000000..65ec8bc8fe
Binary files /dev/null and b/libraries-security/src/main/resources/Baeldung.p12 differ
diff --git a/libraries-server/README.md b/libraries-server/README.md
index d9e6b8b206..7e41f33a0c 100644
--- a/libraries-server/README.md
+++ b/libraries-server/README.md
@@ -13,3 +13,4 @@ This module contains articles about server libraries.
- [MQTT Client in Java](https://www.baeldung.com/java-mqtt-client)
- [Guide to XMPP Smack Client](https://www.baeldung.com/xmpp-smack-chat-client)
- [A Guide to NanoHTTPD](https://www.baeldung.com/nanohttpd)
+- [HTTP/2 in Jetty](https://www.baeldung.com/jetty-http-2)
diff --git a/libraries-server/pom.xml b/libraries-server/pom.xml
index a849708cd8..eb9cb61e56 100644
--- a/libraries-server/pom.xml
+++ b/libraries-server/pom.xml
@@ -5,6 +5,7 @@
libraries-server
0.0.1-SNAPSHOT
libraries-server
+ war
com.baeldung
@@ -105,12 +106,51 @@
+
+
+
+
+ org.eclipse.jetty
+ jetty-maven-plugin
+ ${jetty.version}
+
+ 8888
+ quit
+
+ -Xbootclasspath/p:${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar
+
+ ${basedir}/src/main/config/jetty.xml
+
+ /
+
+
+
+
+ org.eclipse.jetty.http2
+ http2-server
+ ${jetty.version}
+
+
+ org.eclipse.jetty
+ jetty-alpn-openjdk8-server
+ ${jetty.version}
+
+
+ org.eclipse.jetty
+ jetty-servlets
+ ${jetty.version}
+
+
+
+
+
3.6.2
4.5.3
- 9.4.8.v20171121
+ 9.4.27.v20200227
4.1.20.Final
+ 8.1.11.v20170118
8.5.24
4.3.1
1.2.0
diff --git a/libraries-server/src/main/config/jetty.xml b/libraries-server/src/main/config/jetty.xml
new file mode 100644
index 0000000000..fd4a50382b
--- /dev/null
+++ b/libraries-server/src/main/config/jetty.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+ src/main/resources/keystore.jks
+ storepwd
+ src/main/resources/truststore.jks
+ storepwd
+ TLSv1.2
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ http/1.1
+
+
+ -
+
+
+
+
+
+
+
+
+ 8443
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ alpn
+
+
+ -
+
+ h2,h2-17
+
+
+ -
+
+
+
+
+
+
+
+
+ 8444
+
+
+
+
\ No newline at end of file
diff --git a/libraries-server/src/main/java/com/baeldung/jetty/http2/Http2JettyServlet.java b/libraries-server/src/main/java/com/baeldung/jetty/http2/Http2JettyServlet.java
new file mode 100644
index 0000000000..56b75c45d3
--- /dev/null
+++ b/libraries-server/src/main/java/com/baeldung/jetty/http2/Http2JettyServlet.java
@@ -0,0 +1,29 @@
+package com.baeldung.jetty.http2;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class Http2JettyServlet extends HttpServlet {
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ response.addHeader("Cache-control", "no-store, no-cache, must-revalidate");
+ response.addDateHeader("Last-Modified", 0);
+ response.addDateHeader("Expires", 0);
+
+ String requestPath = request.getRequestURI();
+ InputStream input = getServletContext().getResourceAsStream(requestPath);
+ OutputStream output = response.getOutputStream();
+ byte[] buffer = new byte[1024];
+ int read;
+ while ((read = input.read(buffer)) >= 0) {
+ output.write(buffer, 0, read);
+ }
+ }
+
+}
diff --git a/libraries-server/src/main/resources/keystore.jks b/libraries-server/src/main/resources/keystore.jks
new file mode 100644
index 0000000000..428ba54776
Binary files /dev/null and b/libraries-server/src/main/resources/keystore.jks differ
diff --git a/libraries-server/src/main/resources/truststore.jks b/libraries-server/src/main/resources/truststore.jks
new file mode 100644
index 0000000000..839cb8c351
Binary files /dev/null and b/libraries-server/src/main/resources/truststore.jks differ
diff --git a/libraries-server/src/main/webapp/WEB-INF/web.xml b/libraries-server/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..75d7e11c64
--- /dev/null
+++ b/libraries-server/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ http2Jetty
+ com.baeldung.jetty.http2.Http2JettyServlet
+
+
+ http2Jetty
+ /images/*
+
+
+
+ push
+ org.eclipse.jetty.servlets.PushCacheFilter
+
+ ports
+ 8444
+
+
+ maxAssociations
+ 32
+
+
+
+ push
+ /*
+
+
+
\ No newline at end of file
diff --git a/libraries-server/src/main/webapp/http2.html b/libraries-server/src/main/webapp/http2.html
new file mode 100644
index 0000000000..4563945a5e
--- /dev/null
+++ b/libraries-server/src/main/webapp/http2.html
@@ -0,0 +1,14 @@
+
+
+
+ Baeldung HTTP/2 Client in Jetty
+
+
+ HTTP/2 Demo
+
+
+
\ No newline at end of file
diff --git a/libraries-server/src/main/webapp/images/homepage-latest_articles.jpg b/libraries-server/src/main/webapp/images/homepage-latest_articles.jpg
new file mode 100644
index 0000000000..59e78e4560
Binary files /dev/null and b/libraries-server/src/main/webapp/images/homepage-latest_articles.jpg differ
diff --git a/libraries-server/src/main/webapp/images/homepage-rest_with_spring.jpg b/libraries-server/src/main/webapp/images/homepage-rest_with_spring.jpg
new file mode 100644
index 0000000000..43d9221e85
Binary files /dev/null and b/libraries-server/src/main/webapp/images/homepage-rest_with_spring.jpg differ
diff --git a/libraries-server/src/main/webapp/images/homepage-weekly_reviews.jpg b/libraries-server/src/main/webapp/images/homepage-weekly_reviews.jpg
new file mode 100644
index 0000000000..0d6d111911
Binary files /dev/null and b/libraries-server/src/main/webapp/images/homepage-weekly_reviews.jpg differ
diff --git a/libraries-server/src/main/webapp/index.html b/libraries-server/src/main/webapp/index.html
new file mode 100644
index 0000000000..2497893d82
--- /dev/null
+++ b/libraries-server/src/main/webapp/index.html
@@ -0,0 +1,12 @@
+
+
+
+ Baeldung: HTTP2 Client in Jetty
+
+
+ HTTP/1.1
+
+ HTTP/2 Push
+
+
+
\ No newline at end of file
diff --git a/libraries-testing/README.md b/libraries-testing/README.md
index 332debfe18..7098c10d28 100644
--- a/libraries-testing/README.md
+++ b/libraries-testing/README.md
@@ -11,3 +11,4 @@ This module contains articles about test libraries.
- [Introduction to Awaitlity](https://www.baeldung.com/awaitlity-testing)
- [Introduction to Hoverfly in Java](https://www.baeldung.com/hoverfly)
- [Testing with Hamcrest](https://www.baeldung.com/java-junit-hamcrest-guide)
+- [Introduction To DBUnit](https://www.baeldung.com/dbunit)
diff --git a/libraries-testing/pom.xml b/libraries-testing/pom.xml
index 3ffbb291a0..ad6c81a3d6 100644
--- a/libraries-testing/pom.xml
+++ b/libraries-testing/pom.xml
@@ -130,6 +130,27 @@
${asciidoctor.version}
+
+ org.dbunit
+ dbunit
+ ${dbunit.version}
+ test
+
+
+
+ com.h2database
+ h2
+ ${h2.version}
+ test
+
+
+
+ org.assertj
+ assertj-core
+ ${assertj-core.version}
+ test
+
+