commit
b95f60395a
|
@ -38,8 +38,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<akka.http.version>10.0.11</akka.http.version>
|
||||
<akka.stream.version>2.5.11</akka.stream.version>
|
||||
</properties>
|
||||
|
|
|
@ -91,8 +91,6 @@
|
|||
<commons-collections4.version>4.3</commons-collections4.version>
|
||||
<guava.version>28.0-jre</guava.version>
|
||||
<retrofit.version>2.6.0</retrofit.version>
|
||||
<jmh-core.version>1.19</jmh-core.version>
|
||||
<jmh-generator.version>1.19</jmh-generator.version>
|
||||
<commons.lang3.version>3.8.1</commons.lang3.version>
|
||||
<JUnitParams.version>1.1.0</JUnitParams.version>
|
||||
</properties>
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Objects;
|
|||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class AvroSerealizerDeSerealizerUnitTest {
|
||||
public class AvroSerealizerDeSerealizerIntegrationTest {
|
||||
|
||||
AvroSerealizer serealizer;
|
||||
AvroDeSerealizer deSerealizer;
|
|
@ -17,7 +17,7 @@ import okhttp3.Request;
|
|||
import okhttp3.Response;
|
||||
|
||||
@RunWith(MonoMeecrowave.Runner.class)
|
||||
public class ArticleEndpointsUnitTest {
|
||||
public class ArticleEndpointsIntegrationTest {
|
||||
|
||||
@ConfigurationInject
|
||||
private Meecrowave.Builder config;
|
|
@ -100,7 +100,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring.version>2.2.1.RELEASE</spring.version>
|
||||
<awssdk.version>2.10.27</awssdk.version>
|
||||
</properties>
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -105,7 +105,6 @@
|
|||
<guava.version>27.1-jre</guava.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
<uberjar.name>benchmarks</uberjar.name>
|
||||
<jmh.version>1.22</jmh.version>
|
||||
<eclipse.collections.version>10.0.0</eclipse.collections.version>
|
||||
<shade.plugin.version>3.2.4</shade.plugin.version>
|
||||
</properties>
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
|
@ -31,8 +31,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -24,12 +24,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -68,7 +68,6 @@
|
|||
|
||||
<properties>
|
||||
<shade.plugin.version>3.2.0</shade.plugin.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
<assertj-core.version>3.10.0</assertj-core.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -31,12 +31,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Testing -->
|
||||
|
@ -77,7 +77,6 @@
|
|||
<properties>
|
||||
<shade.plugin.version>3.2.0</shade.plugin.version>
|
||||
<guava.version>28.2-jre</guava.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
<assertj-core.version>3.10.0</assertj-core.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -25,17 +25,16 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<openjdk.jmh.version>1.19</openjdk.jmh.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
|
@ -40,7 +40,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<openjdk.jmh.version>1.19</openjdk.jmh.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
<jol-core.version>0.10</jol-core.version>
|
||||
</properties>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh-core.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -25,17 +25,16 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<openjdk.jmh.version>1.19</openjdk.jmh.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh-generator-annprocess.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -51,8 +51,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<jmh-core.version>1.19</jmh-core.version>
|
||||
<jmh-generator-annprocess.version>1.19</jmh-generator-annprocess.version>
|
||||
<assertj.version>3.6.1</assertj.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
|
@ -39,7 +39,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<jmh.version>1.21</jmh.version>
|
||||
<guava.version>28.2-jre</guava.version>
|
||||
<!-- testing -->
|
||||
<assertj.version>3.6.1</assertj.version>
|
||||
|
|
|
@ -65,8 +65,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<jmh-core.version>1.19</jmh-core.version>
|
||||
<jmh-generator.version>1.19</jmh-generator.version>
|
||||
<assertj.version>3.12.2</assertj.version>
|
||||
<commons.beanutils.version>1.9.4</commons.beanutils.version>
|
||||
<guava.version>29.0-jre</guava.version>
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -39,9 +39,5 @@
|
|||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<jmh.version>1.28</jmh.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -58,7 +58,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -83,7 +83,6 @@
|
|||
<nd4j.version>1.0.0-beta4</nd4j.version>
|
||||
<colt.version>1.2.0</colt.version>
|
||||
<la4j.version>0.6.0</la4j.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -67,8 +67,6 @@
|
|||
|
||||
<properties>
|
||||
<hibernate.core.version>5.4.0.Final</hibernate.core.version>
|
||||
<jmh-core.version>1.19</jmh-core.version>
|
||||
<jmh-generator.version>1.19</jmh-generator.version>
|
||||
<guava.version>27.1-jre</guava.version>
|
||||
<assertj.version>3.10.0</assertj.version>
|
||||
<rest-assured.version>3.1.1</rest-assured.version>
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.9</maven.compiler.source>
|
||||
<maven.compiler.target>1.9</maven.compiler.target>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
package com.baeldung.streams.streamvscollection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class StreamVsCollectionExample {
|
||||
|
||||
static ArrayList<String> userNameSource = new ArrayList<>();
|
||||
|
||||
static {
|
||||
userNameSource.add("john");
|
||||
userNameSource.add("smith");
|
||||
userNameSource.add("tom");
|
||||
userNameSource.add("rob");
|
||||
userNameSource.add("charlie");
|
||||
userNameSource.add("alfred");
|
||||
}
|
||||
|
||||
public static Stream<String> userNames() {
|
||||
return userNameSource.stream();
|
||||
}
|
||||
|
||||
public static List<String> userNameList() {
|
||||
return userNames().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static Set<String> userNameSet() {
|
||||
return userNames().collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public static Map<String, String> userNameMap() {
|
||||
return userNames().collect(Collectors.toMap(u1 -> u1.toString(), u1 -> u1.toString()));
|
||||
}
|
||||
|
||||
public static Stream<String> filterUserNames() {
|
||||
return userNames().filter(i -> i.length() >= 4);
|
||||
}
|
||||
|
||||
public static Stream<String> sortUserNames() {
|
||||
return userNames().sorted();
|
||||
}
|
||||
|
||||
public static Stream<String> limitUserNames() {
|
||||
return userNames().limit(3);
|
||||
}
|
||||
|
||||
public static Stream<String> sortFilterLimitUserNames() {
|
||||
return filterUserNames().sorted().limit(3);
|
||||
}
|
||||
|
||||
public static void printStream(Stream<String> stream) {
|
||||
stream.forEach(System.out::println);
|
||||
}
|
||||
|
||||
public static void modifyList() {
|
||||
userNameSource.remove(2);
|
||||
}
|
||||
|
||||
public static Map<String, String> modifyMap() {
|
||||
Map<String, String> userNameMap = userNameMap();
|
||||
userNameMap.put("bob", "bob");
|
||||
userNameMap.remove("alfred");
|
||||
|
||||
return userNameMap;
|
||||
}
|
||||
|
||||
public static void tryStreamTraversal() {
|
||||
Stream<String> userNameStream = userNames();
|
||||
userNameStream.forEach(System.out::println);
|
||||
|
||||
try {
|
||||
userNameStream.forEach(System.out::println);
|
||||
} catch(IllegalStateException e) {
|
||||
System.out.println("stream has already been operated upon or closed");
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(userNameMap());
|
||||
System.out.println(modifyMap());
|
||||
tryStreamTraversal();
|
||||
|
||||
Set<String> set = userNames().collect(Collectors.toCollection(TreeSet::new));
|
||||
set.forEach(val -> System.out.println(val));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -34,7 +34,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh-core.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh-core.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vdurmont</groupId>
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
<compiler.plugin.version>3.8.0</compiler.plugin.version>
|
||||
<source.version>1.9</source.version>
|
||||
<target.version>1.9</target.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<assertj-core.version>3.12.2</assertj-core.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
||||
<pmdVersion>6.0.1</pmdVersion>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
|
|
@ -75,8 +75,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<source.version>9</source.version>
|
||||
<target.version>9</target.version>
|
||||
|
||||
|
|
|
@ -113,9 +113,6 @@
|
|||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
||||
<!-- Don't let your Mac use a crazy non-standard encoding -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<gwt.version>2.8.2</gwt.version>
|
||||
<gwt.plugin.version>1.0-rc-8</gwt.plugin.version>
|
||||
<surefire.plugin.version>2.17</surefire.plugin.version>
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
package com.baeldung.rmi;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.rmi.NotBoundException;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.registry.LocateRegistry;
|
||||
import java.rmi.registry.Registry;
|
||||
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
public class JavaRMIIntegrationTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void whenRunServer_thenServerStarts() {
|
||||
|
||||
try {
|
||||
MessengerServiceImpl server = new MessengerServiceImpl();
|
||||
server.createStubAndBind();
|
||||
} catch (RemoteException e) {
|
||||
fail("Exception Occurred: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenClientSendsMessageToServer_thenServerSendsResponseMessage() {
|
||||
|
||||
try {
|
||||
Registry registry = LocateRegistry.getRegistry();
|
||||
MessengerService server = (MessengerService) registry.lookup("MessengerService");
|
||||
String responseMessage = server.sendMessage("Client Message");
|
||||
|
||||
String expectedMessage = "Server Message";
|
||||
assertEquals(responseMessage, expectedMessage);
|
||||
} catch (RemoteException | NotBoundException e) {
|
||||
fail("Exception Occurred: " + e);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private MessengerServiceImpl messengerService;
|
||||
|
||||
@Before
|
||||
public void init() {
|
||||
try {
|
||||
messengerService = new MessengerServiceImpl();
|
||||
messengerService.createStubAndBind();
|
||||
} catch (RemoteException e) {
|
||||
fail("Exception Occurred: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenClientSendsMessageToServer_thenServerSendsResponseMessage() {
|
||||
try {
|
||||
Registry registry = LocateRegistry.getRegistry();
|
||||
MessengerService server = (MessengerService) registry.lookup("MessengerService");
|
||||
String responseMessage = server.sendMessage("Client Message");
|
||||
|
||||
String expectedMessage = "Server Message";
|
||||
assertEquals(responseMessage, expectedMessage);
|
||||
} catch (RemoteException | NotBoundException e) {
|
||||
fail("Exception Occurred: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -12,7 +12,7 @@ import javax.batch.runtime.StepExecution;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class CustomCheckPointUnitTest {
|
||||
class CustomCheckPointIntegrationTest {
|
||||
@Test
|
||||
public void givenChunk_whenCustomCheckPoint_thenCommitCountIsThree() throws Exception {
|
||||
JobOperator jobOperator = BatchRuntime.getJobOperator();
|
|
@ -16,7 +16,7 @@ import javax.batch.runtime.StepExecution;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class JobSequenceUnitTest {
|
||||
class JobSequenceIntegrationTest {
|
||||
@Test
|
||||
public void givenTwoSteps_thenBatch_CompleteWithSuccess() throws Exception {
|
||||
JobOperator jobOperator = BatchRuntime.getJobOperator();
|
|
@ -11,7 +11,7 @@ import javax.batch.runtime.JobExecution;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SimpleBatchLetUnitTest {
|
||||
class SimpleBatchLetIntegrationTest {
|
||||
@Test
|
||||
public void givenBatchLet_thenBatch_CompleteWithSuccess() throws Exception {
|
||||
JobOperator jobOperator = BatchRuntime.getJobOperator();
|
|
@ -16,7 +16,7 @@ import javax.batch.runtime.StepExecution;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SimpleChunkUnitTest {
|
||||
class SimpleChunkIntegrationTest {
|
||||
@Test
|
||||
public void givenChunk_thenBatch_CompletesWithSucess() throws Exception {
|
||||
JobOperator jobOperator = BatchRuntime.getJobOperator();
|
|
@ -13,7 +13,7 @@ import javax.batch.runtime.StepExecution;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SimpleErrorChunkUnitTest {
|
||||
class SimpleErrorChunkIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void givenChunkError_thenBatch_CompletesWithFailed() throws Exception {
|
|
@ -1099,8 +1099,6 @@
|
|||
<scala.version>2.12.6</scala.version>
|
||||
<node.version>v10.15.0</node.version>
|
||||
<npm.version>6.4.1</npm.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
|
||||
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
|
|
|
@ -1020,8 +1020,6 @@
|
|||
<scala.version>2.12.6</scala.version>
|
||||
<node.version>v8.12.0</node.version>
|
||||
<npm.version>6.4.1</npm.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
|
||||
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
|
|
|
@ -840,8 +840,6 @@
|
|||
<scala.version>2.12.6</scala.version>
|
||||
<node.version>v8.12.0</node.version>
|
||||
<npm.version>6.4.1</npm.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
|
||||
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
|
|
|
@ -842,8 +842,6 @@
|
|||
<scala.version>2.12.6</scala.version>
|
||||
<node.version>v8.12.0</node.version>
|
||||
<npm.version>6.4.1</npm.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
|
||||
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jol</groupId>
|
||||
|
@ -76,7 +76,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<openjdk.jmh.version>1.19</openjdk.jmh.version>
|
||||
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
|
||||
<jol-core.version>0.10</jol-core.version>
|
||||
<maven-assembly-plugin.version>3.2.0</maven-assembly-plugin.version>
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -134,7 +134,6 @@
|
|||
<fugue.version>4.5.1</fugue.version>
|
||||
<jnats.version>1.0</jnats.version>
|
||||
<jctools.version>2.1.2</jctools.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -26,13 +26,13 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- Eclipse Collections -->
|
||||
|
@ -46,10 +46,11 @@
|
|||
<properties>
|
||||
<fastutil.version>8.2.2</fastutil.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
<eclipse-collections.version>10.0.0</eclipse-collections.version>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<jmh-core.version>1.28</jmh-core.version>
|
||||
<jmh-generator.version>1.28</jmh-generator.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -202,7 +202,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
@ -395,7 +395,6 @@
|
|||
<spring-mock-mvc.version>3.0.3</spring-mock-mvc.version>
|
||||
<quartz.version>2.3.0</quartz.version>
|
||||
<jool.version>0.9.12</jool.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
|
||||
<commons-net.version>3.6</commons-net.version>
|
||||
<commonsio.version>2.6</commonsio.version>
|
||||
|
|
|
@ -32,18 +32,17 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<guava.version>29.0-jre</guava.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
<modelmapper.version>2.3.7</modelmapper.version>
|
||||
<hamcrest.version>2.2</hamcrest.version>
|
||||
</properties>
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
<relativePath>../../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
<relativePath>../../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -42,12 +42,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<path>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
|
@ -156,10 +156,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<!--
|
||||
JMH version to use with this project.
|
||||
-->
|
||||
<jmh.version>1.23</jmh.version>
|
||||
<orika.version>1.5.4</orika.version>
|
||||
<dozer.version>6.5.0</dozer.version>
|
||||
<mapstruct.version>1.3.1.Final</mapstruct.version>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>testcontainers</artifactId>
|
||||
<version>1.14.3</version>
|
||||
<version>${testcontainers.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
|||
|
||||
<properties>
|
||||
<org.apache.bookkeeper.version>4.10.0</org.apache.bookkeeper.version>
|
||||
<testcontainers.version>1.14.3</testcontainers.version>
|
||||
</properties>
|
||||
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${openjdk-jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
|
@ -94,7 +94,6 @@
|
|||
<postgresql.version>42.2.11</postgresql.version>
|
||||
<mariaDB4j.version>2.2.3</mariaDB4j.version>
|
||||
<assertj-core.version>3.8.0</assertj-core.version>
|
||||
<openjdk-jmh.version>1.21</openjdk-jmh.version>
|
||||
<spring-boot.version>2.1.7.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${openjdk-jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -61,7 +61,6 @@
|
|||
<mysql.version>6.0.6</mysql.version>
|
||||
<mariaDB4j.version>2.2.3</mariaDB4j.version>
|
||||
<assertj-core.version>3.8.0</assertj-core.version>
|
||||
<openjdk-jmh.version>1.21</openjdk-jmh.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${openjdk-jmh.version}</version>
|
||||
<version>${jmh-generator.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -68,7 +68,6 @@
|
|||
<mysql.version>6.0.6</mysql.version>
|
||||
<mariaDB4j.version>2.2.3</mariaDB4j.version>
|
||||
<assertj-core.version>3.8.0</assertj-core.version>
|
||||
<openjdk-jmh.version>1.21</openjdk-jmh.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -30,17 +30,17 @@
|
|||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.21</version>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.11.3</version>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-hibernate5</artifactId>
|
||||
<version>2.9.8</version>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<!--Compile time JPA API -->
|
||||
<dependency>
|
||||
|
@ -87,6 +87,7 @@
|
|||
<hibernate.version>5.4.14.Final</hibernate.version>
|
||||
<eclipselink.version>2.7.4</eclipselink.version>
|
||||
<postgres.version>42.2.5</postgres.version>
|
||||
<mysql.version>8.0.21</mysql.version>
|
||||
<javax.persistence-api.version>2.2</javax.persistence-api.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
|
||||
|
|
|
@ -19,28 +19,34 @@
|
|||
<dependency>
|
||||
<groupId>org.jooq</groupId>
|
||||
<artifactId>jooq</artifactId>
|
||||
<version>3.13.4</version>
|
||||
<version>${jooq.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jooq</groupId>
|
||||
<artifactId>jooq-meta</artifactId>
|
||||
<version>3.13.4</version>
|
||||
<version>${jooq.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jooq</groupId>
|
||||
<artifactId>jooq-codegen</artifactId>
|
||||
<version>3.13.4</version>
|
||||
<version>${jooq.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.16</version>
|
||||
<version>${postgresql.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.200</version>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<jooq.version>3.13.4</jooq.version>
|
||||
<postgresql.version>42.2.16</postgresql.version>
|
||||
<h2.version>1.4.200</h2.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<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>
|
||||
|
|
|
@ -24,7 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = {SpringBootJdbiApplication.class, JdbiConfiguration.class})
|
||||
@Slf4j
|
||||
public class SpringBootJdbiApplicationUnitTest {
|
||||
public class SpringBootJdbiApplicationIntegrationTest {
|
||||
|
||||
|
||||
@Autowired
|
|
@ -20,7 +20,7 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
|||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@AutoConfigureMockMvc
|
||||
public class CustomerControllerUnitTest {
|
||||
public class CustomerControllerIntegrationTest {
|
||||
|
||||
private static MediaType MEDIA_TYPE_JSON;
|
||||
|
|
@ -14,9 +14,7 @@
|
|||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<cosmodb.version>2.3.0</cosmodb.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<plugin>
|
||||
<groupId>com.mysema.maven</groupId>
|
||||
<artifactId>maven-apt-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>${maven-apt-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
|
@ -88,6 +88,7 @@
|
|||
<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>
|
||||
<maven-apt-plugin.version>1.0</maven-apt-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -78,7 +78,7 @@
|
|||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>1.3.1.Final</version>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
@ -98,7 +98,6 @@
|
|||
<mapstruct.version>1.3.1.Final</mapstruct.version>
|
||||
<guava.version>21.0</guava.version>
|
||||
<testcontainers.version>1.12.2</testcontainers.version>
|
||||
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
package com.baeldung.jooq.introduction;
|
||||
|
||||
import static com.baeldung.jooq.introduction.db.public_.tables.Author.AUTHOR;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.Record2;
|
||||
import org.jooq.Result;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ContextConfiguration(classes = PersistenceContextIntegrationTest.class)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
public class CountQueryIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private DSLContext dsl;
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenSimpleSelect_thenSucceed() {
|
||||
int count = dsl.select().from(AUTHOR).execute();
|
||||
Assert.assertEquals(3, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenSelectCount_thenSucceed() {
|
||||
int count = dsl.selectCount().from(AUTHOR)
|
||||
.where(AUTHOR.FIRST_NAME.equalIgnoreCase("Bryan"))
|
||||
.fetchOne(0, int.class);
|
||||
Assert.assertEquals(1, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenCount_thenSucceed() {
|
||||
int count = dsl.select(DSL.count())
|
||||
.from(AUTHOR).fetchOne(0, int.class);
|
||||
Assert.assertEquals(3, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenFetchCount_thenSucceed() {
|
||||
int count = dsl.fetchCount(DSL.selectFrom(AUTHOR)
|
||||
.where(AUTHOR.FIRST_NAME.equalIgnoreCase("Bryan")));
|
||||
Assert.assertEquals(1, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenFetchCountWithoutCondition_thenSucceed() {
|
||||
int count = dsl.fetchCount(DSL.selectFrom(AUTHOR));
|
||||
Assert.assertEquals(3, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenFetchCountWithSingleCondition_thenSucceed() {
|
||||
int count = dsl.fetchCount(AUTHOR, AUTHOR.FIRST_NAME.equalIgnoreCase("Bryan"));
|
||||
Assert.assertEquals(1, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenFetchCountWithMultipleConditions_thenSucceed() {
|
||||
Condition firstCond = AUTHOR.FIRST_NAME.equalIgnoreCase("Bryan");
|
||||
Condition secondCond = AUTHOR.ID.notEqual(1);
|
||||
List<Condition> conditions = new ArrayList<>();
|
||||
conditions.add(firstCond);
|
||||
conditions.add(secondCond);
|
||||
int count = dsl.fetchCount(AUTHOR, conditions);
|
||||
Assert.assertEquals(1, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenFetchCountWithConditionsInVarargs_thenSucceed() {
|
||||
Condition firstCond = AUTHOR.FIRST_NAME.equalIgnoreCase("Bryan");
|
||||
Condition secondCond = AUTHOR.ID.notEqual(1);
|
||||
int count = dsl.fetchCount(AUTHOR, firstCond, secondCond);
|
||||
Assert.assertEquals(1, count);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenValidData_whenCountwithGroupBy_thenSucceed() {
|
||||
final Result<Record2<String, Integer>> result = dsl.select(AUTHOR.FIRST_NAME, DSL.count())
|
||||
.from(AUTHOR).groupBy(AUTHOR.FIRST_NAME).fetch();
|
||||
Assert.assertEquals(3, result.size());
|
||||
Assert.assertEquals(result.get(0).get(0), "Bert");
|
||||
Assert.assertEquals(result.get(0).get(1), 1);
|
||||
}
|
||||
}
|
6
pom.xml
6
pom.xml
|
@ -1351,7 +1351,7 @@
|
|||
<gib.buildUpstream>false</gib.buildUpstream>
|
||||
<gib.failOnMissingGitDir>false</gib.failOnMissingGitDir>
|
||||
<gib.failOnError>false</gib.failOnError>
|
||||
<gib.disable>true</gib.disable>
|
||||
<gib.disable>true</gib.disable>
|
||||
|
||||
<junit.version>4.12</junit.version>
|
||||
<hamcrest.version>2.2</hamcrest.version>
|
||||
|
@ -1371,8 +1371,8 @@
|
|||
<java.version>1.8</java.version>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<esapi.version>2.2.2.0</esapi.version>
|
||||
<jmh-core.version>1.19</jmh-core.version>
|
||||
<jmh-generator.version>1.19</jmh-generator.version>
|
||||
<jmh-core.version>1.28</jmh-core.version>
|
||||
<jmh-generator.version>1.28</jmh-generator.version>
|
||||
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
|
||||
<maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
|
||||
<commons-io.version>2.8.0</commons-io.version>
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
<relativePath>../../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
<relativePath>../../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
<relativePath>../../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
|
@ -44,6 +48,11 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -53,6 +62,7 @@
|
|||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>com.baeldung.probes.ProbesApplication</mainClass>
|
||||
<mainClass>com.baeldung.endpoints.enabling.EndpointEnablingApplication</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.baeldung.endpoints.enabling;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
|
||||
|
||||
@SpringBootApplication(exclude = { SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class }, scanBasePackages = "com.baeldung.endpoints.enabling")
|
||||
public class EndpointEnablingApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(EndpointEnablingApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.baeldung.endpoints.enabling;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
PasswordEncoder encoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
|
||||
auth.inMemoryAuthentication()
|
||||
.withUser("user")
|
||||
.password(encoder.encode("password"))
|
||||
.roles("USER")
|
||||
.and()
|
||||
.withUser("admin")
|
||||
.password(encoder.encode("admin"))
|
||||
.roles("USER", "ADMIN");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.requestMatcher(EndpointRequest.toAnyEndpoint())
|
||||
.authorizeRequests((requests) -> requests.anyRequest()
|
||||
.hasRole("ADMIN"));
|
||||
http.httpBasic();
|
||||
}
|
||||
}
|
|
@ -11,3 +11,6 @@ info.app.name=Spring Sample Application
|
|||
info.app.description=This is my first spring boot application G1
|
||||
info.app.version=1.0.0
|
||||
info.java-vendor = ${java.specification.vendor}
|
||||
|
||||
management.endpoints.web.exposure.include=*
|
||||
management.endpoint.shutdown.enabled=true
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
package com.baeldung.endpoints.enabling;
|
||||
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.security.test.context.support.WithMockUser;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
@SpringBootTest
|
||||
@AutoConfigureMockMvc
|
||||
public class EndpointEnablingIntegrationTest {
|
||||
@Autowired
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Test
|
||||
@WithMockUser(username = "user", password = "password", roles = "USER")
|
||||
public void givenWrongAuthentication_whenCallingActuator_thenReturns401() throws Exception {
|
||||
mockMvc.perform(get("/actuator"))
|
||||
.andExpect(status().isForbidden());
|
||||
}
|
||||
|
||||
@Test
|
||||
@WithMockUser(username = "admin", password = "admin", roles = "ADMIN")
|
||||
public void givenProperAuthentication_whenCallingActuator_thenReturnsExpectedEndpoints() throws Exception {
|
||||
mockMvc.perform(get("/actuator"))
|
||||
.andExpect(jsonPath("$._links").exists())
|
||||
.andExpect(jsonPath("$._links.beans").exists())
|
||||
.andExpect(jsonPath("$._links.env").exists())
|
||||
.andExpect(jsonPath("$._links.shutdown").exists());
|
||||
}
|
||||
}
|
|
@ -48,7 +48,6 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<version>2.1.6.RELEASE</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>Greenwich.RELEASE</version>
|
||||
<version>${spring-cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -177,12 +177,12 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-gcp-starter</artifactId>
|
||||
<version>1.0.0.RELEASE</version>
|
||||
<version>${spring-cloud-gcp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
|
||||
<version>1.0.0.RELEASE</version>
|
||||
<version>${spring-cloud-gcp.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
@ -215,7 +215,7 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>Greenwich.RELEASE</version>
|
||||
<version>${spring-cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -332,6 +332,8 @@
|
|||
|
||||
<properties>
|
||||
<servlet.version>4.0.0</servlet.version>
|
||||
<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
|
||||
<spring-cloud-gcp.version>1.0.0.RELEASE</spring-cloud-gcp.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -62,7 +62,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
|
||||
<greeter.version>0.0.1-SNAPSHOT</greeter.version>
|
||||
</properties>
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<greeter.version>0.0.1-SNAPSHOT</greeter.version>
|
||||
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
|
|
@ -16,6 +16,14 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-jpa</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JobRunr -->
|
||||
<dependency>
|
||||
|
@ -23,6 +31,23 @@
|
|||
<artifactId>jobrunr-spring-boot-starter</artifactId>
|
||||
<version>${jobrunr.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- openapi -->
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator</artifactId>
|
||||
<version>${openapi-generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>jackson-databind-nullable</artifactId>
|
||||
<version>${jackson-databind.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>${springfox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -37,10 +62,45 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>${openapi-generator.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>
|
||||
${project.basedir}/src/main/resources/petstore.yml
|
||||
</inputSpec>
|
||||
<generatorName>spring</generatorName>
|
||||
<apiPackage>com.baeldung.openapi.api</apiPackage>
|
||||
<modelPackage>com.baeldung.openapi.model</modelPackage>
|
||||
<supportingFilesToGenerate>
|
||||
ApiUtil.java
|
||||
</supportingFilesToGenerate>
|
||||
<configOptions>
|
||||
<delegatePattern>true</delegatePattern>
|
||||
</configOptions>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<jobrunr.version>1.1.0</jobrunr.version>
|
||||
<awaitility.version>4.0.3</awaitility.version>
|
||||
<openapi-generator.version>5.1.0</openapi-generator.version>
|
||||
<spring.data.version>2.4.5</spring.data.version>
|
||||
<jackson-databind.version>0.2.1</jackson-databind.version>
|
||||
<springfox.version>2.9.2</springfox.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.jobrunr;
|
||||
package com.baeldung;
|
||||
|
||||
import com.baeldung.jobrunr.service.SampleJobService;
|
||||
import org.jobrunr.jobs.mappers.JobMapper;
|
|
@ -0,0 +1,111 @@
|
|||
openapi: "3.0.0"
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
license:
|
||||
name: MIT
|
||||
servers:
|
||||
- url: http://localhost:8080/
|
||||
paths:
|
||||
/pets:
|
||||
get:
|
||||
summary: List all pets
|
||||
operationId: listPets
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: limit
|
||||
in: query
|
||||
description: How many items to return at one time (max 100)
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: A paged array of pets
|
||||
headers:
|
||||
x-next:
|
||||
description: A link to the next page of responses
|
||||
schema:
|
||||
type: string
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
post:
|
||||
summary: Create a pet
|
||||
operationId: createPets
|
||||
tags:
|
||||
- pets
|
||||
responses:
|
||||
'201':
|
||||
description: Null response
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/pets/{petId}:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
operationId: showPetById
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
required: true
|
||||
description: The id of the pet to retrieve
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Expected response to a valid request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
Error:
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
|
@ -10,6 +10,8 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.JobRunrSpringBootApp;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package com.baeldung.openapi;
|
||||
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@AutoConfigureMockMvc
|
||||
public class OpenApiPetsIntegrationTest {
|
||||
|
||||
private static final String PETS_PATH = "/pets/";
|
||||
|
||||
@Autowired
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Test
|
||||
public void whenReadAll_thenStatusIsNotImplemented() throws Exception {
|
||||
this.mockMvc.perform(get(PETS_PATH)).andExpect(status().isNotImplemented());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenReadOne_thenStatusIsNotImplemented() throws Exception {
|
||||
this.mockMvc.perform(get(PETS_PATH + 1)).andExpect(status().isNotImplemented());
|
||||
}
|
||||
}
|
|
@ -23,8 +23,4 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-boot-starter-data-jpa.version>2.2.5.RELEASE</spring-boot-starter-data-jpa.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
<name>spring-boot-properties-3</name>
|
||||
<description>Spring Boot Properties Module</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -134,7 +134,6 @@
|
|||
</repositories>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud.version>2020.0.0-M5</spring-cloud.version>
|
||||
<commons-configuration.version>1.10</commons-configuration.version>
|
||||
<guava.version>20.0</guava.version>
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
<!-- <version>2.1.1.RELEASE</version>-->
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -169,7 +169,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<hibernate.version>5.2.10.Final</hibernate.version>
|
||||
<springdoc.version>1.5.2</springdoc.version>
|
||||
<asciidoctor-plugin.version>1.5.6</asciidoctor-plugin.version>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-boot-starter</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>${springfox.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -38,4 +38,8 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<springfox.version>3.0.0</springfox.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-boot-starter</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>${springfox.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -38,4 +38,8 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<springfox.version>3.0.0</springfox.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -112,7 +112,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<commons-lang.version>2.6</commons-lang.version>
|
||||
<structure-maven.version>0.0.2</structure-maven.version>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
|
|
@ -41,9 +41,4 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -41,9 +41,4 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -101,7 +101,6 @@
|
|||
</repositories>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud.version>Greenwich.SR1</spring-cloud.version>
|
||||
<kafka-avro-serializer.version>4.0.0</kafka-avro-serializer.version>
|
||||
<avro.version>1.8.2</avro.version>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
||||
<spring-boot-maven-plugin.version>1.4.2.RELEASE</spring-boot-maven-plugin.version>
|
||||
<commons-config.version>1.10</commons-config.version>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
</modules>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-dependencies.version>Finchley.SR2</spring-cloud-dependencies.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
</properties>
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.io.IOException;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
class PersonControllerUnitTest {
|
||||
class PersonControllerIntegrationTest {
|
||||
|
||||
@LocalServerPort
|
||||
int randomServerPort;
|
|
@ -62,9 +62,4 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -5,6 +5,3 @@ spring.mvc.pathmatch.use-suffix-pattern=true
|
|||
#spring.mvc.contentnegotiation.favor-path-extension=true
|
||||
#spring.mvc.contentnegotiation.favor-parameter=true
|
||||
#spring.mvc.contentnegotiation.parameter-name=mediaType
|
||||
|
||||
# https://github.com/spring-projects/spring-boot/issues/24207
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
|
|
|
@ -111,7 +111,6 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<javax.servlet.jsp-api.version>2.3.3</javax.servlet.jsp-api.version>
|
||||
<javax.servlet-api.version>4.0.1</javax.servlet-api.version>
|
||||
<spring.version>5.2.1.RELEASE</spring.version>
|
||||
|
|
|
@ -44,12 +44,13 @@
|
|||
<dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-timelimiter</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<version>${resilience4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<swagger2.version>2.9.2</swagger2.version>
|
||||
<resilience4j.version>1.6.1</resilience4j.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<parallel>all</parallel>
|
||||
<threadCount>10</threadCount>
|
||||
|
@ -45,4 +45,8 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<parallel>all</parallel>
|
||||
<useUnlimitedThreads>true</useUnlimitedThreads>
|
||||
|
@ -37,4 +37,8 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -16,36 +16,36 @@
|
|||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.2.3</version>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>5.6.2</version>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.6.2</version>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>3.16.1</version>
|
||||
<version>${assertj-core.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-all</artifactId>
|
||||
<version>1.3</version>
|
||||
<version>${hamcrest-all.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>4.4</version>
|
||||
<version>${commons-collections4.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -59,4 +59,10 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<assertj-core.version>3.16.1</assertj-core.version>
|
||||
<commons-collections4.version>4.4</commons-collections4.version>
|
||||
<junit-jupiter.version>5.6.2</junit-jupiter.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>3.16.1</version>
|
||||
<version>${assertj-core.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -86,5 +86,6 @@
|
|||
<system-lambda.version>1.0.0</system-lambda.version>
|
||||
<system-stubs.version>1.1.0</system-stubs.version>
|
||||
<junit.jupiter.version>5.6.2</junit.jupiter.version>
|
||||
<assertj-core.version>3.16.1</assertj-core.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
@ -36,11 +36,10 @@
|
|||
<version>${cucumber.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.stefanbirkner</groupId>
|
||||
|
@ -103,6 +102,7 @@
|
|||
<checkstyle-maven-plugin.version>3.0.0</checkstyle-maven-plugin.version>
|
||||
<system-rules.version>1.19.0</system-rules.version>
|
||||
<system-lambda.version>1.0.0</system-lambda.version>
|
||||
<spring-boot.version>2.4.3</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue