upgrade boot parent

This commit is contained in:
DOHA 2018-01-04 22:52:28 +02:00
parent 172cd46585
commit 3db819c842
68 changed files with 188 additions and 258 deletions

View File

@ -7,10 +7,10 @@
<name>hystrix</name>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>

View File

@ -12,10 +12,10 @@
<description>Exercising the JJWT</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -2,12 +2,12 @@ package io.jsonwebtoken.jjwtfun;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = JJWTFunApplication.class)
@SpringBootTest(classes = JJWTFunApplication.class)
@WebAppConfiguration
public class DemoApplicationIntegrationTest {

View File

@ -1 +0,0 @@
## Relevant articles:

View File

@ -1,81 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-4</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Parent Boot 4</name>
<description>Parent for all spring boot 1.4 modules</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<rest-assured.version>3.0.1</rest-assured.version>
<!-- plugins -->
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
</properties>
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.4.4.RELEASE</version>
<relativePath />
</parent>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>${rest-assured.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*LongRunningUnitTest.java</exclude>
<exclude>**/*ManualTest.java</exclude>
<exclude>**/JdbcTest.java</exclude>
<exclude>**/*LiveTest.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -12,16 +12,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<rest-assured.version>3.0.1</rest-assured.version>
<rest-assured.version>3.0.6</rest-assured.version>
<!-- plugins -->
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
</properties>
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.5.3.RELEASE</version>
<version>1.5.9.RELEASE</version>
<relativePath />
</parent>

View File

@ -28,6 +28,7 @@
</properties>
<modules>
<module>parent-boot-5</module>
<module>asm</module>
<module>atomix</module>
<module>apache-cayenne</module>

View File

@ -9,10 +9,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -14,9 +14,9 @@
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -7,10 +7,10 @@
<version>1.0.0-SNAPSHOT</version>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -7,10 +7,10 @@
<version>1.0.0-SNAPSHOT</version>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -7,10 +7,10 @@
<version>1.0.0-SNAPSHOT</version>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -8,10 +8,10 @@
<version>1.0.0-SNAPSHOT</version>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -8,10 +8,10 @@
<version>1.0.0-SNAPSHOT</version>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -7,10 +7,10 @@
<version>1.0.0-SNAPSHOT</version>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -1,14 +1,13 @@
package com.baeldung.spring.cloud.config.client;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = ConfigClient.class)
@SpringBootTest(classes = ConfigClient.class)
@WebAppConfiguration
public class ConfigClientLiveTest {
@Test

View File

@ -15,10 +15,10 @@
</modules>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencyManagement>

View File

@ -3,12 +3,12 @@ package com.baeldung.spring.cloud.config.server;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = ConfigServer.class)
@SpringBootTest(classes = ConfigServer.class)
@WebAppConfiguration
@Ignore
public class ConfigServerListIntegrationTest {

View File

@ -12,10 +12,10 @@
<description>Simple books API</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Spring Cloud REST configuration server</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Spring Cloud REST server</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Simple reviews API</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-4</relativePath>
<relativePath>../../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -9,10 +9,10 @@
<description>Introduction to Spring Cloud Rest Client with Netflix Ribbon</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -1,8 +1,10 @@
package com.baeldung;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationContextLoader;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.test.context.ContextConfiguration;
@ -10,14 +12,9 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.client.ResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
//@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringDemoApplication.class, loader = SpringApplicationContextLoader.class)
@ContextConfiguration(classes = SpringDemoApplication.class)
@WebAppConfiguration
@IntegrationTest
public class SpringIntegrationTest {
static ResponseResults latestResponse = null;

View File

@ -7,10 +7,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -2,7 +2,7 @@ package org.baeldung;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class Application extends SpringBootServletInitializer {

View File

@ -11,10 +11,10 @@
<url>http://maven.apache.org</url>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Injecting Mockito Mocks into Spring Beans</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -5,13 +5,13 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@ActiveProfiles("test")
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = MocksApplication.class)
@SpringBootTest(classes = MocksApplication.class)
public class UserServiceIntegrationTest {
@Autowired

View File

@ -10,10 +10,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -7,10 +7,10 @@
<name>spring-protobuf</name>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -1,7 +1,11 @@
package com.baeldung.protobuf;
import com.baeldung.protobuf.BaeldungTraining.Course;
import com.googlecode.protobuf.format.JsonFormat;
import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertThat;
import java.io.IOException;
import java.io.InputStream;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
@ -9,21 +13,17 @@ import org.apache.http.impl.client.HttpClients;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.io.InputStream;
import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertThat;
import com.baeldung.protobuf.BaeldungTraining.Course;
import com.googlecode.protobuf.format.JsonFormat;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@WebIntegrationTest
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT)
public class ApplicationIntegrationTest {
private static final String COURSE1_URL = "http://localhost:8080/courses/1";

View File

@ -11,10 +11,10 @@
<description>Demo project for Scheduling in Spring with Quartz</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -9,10 +9,10 @@
<url>http://maven.apache.org</url>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -11,10 +11,10 @@
<description>Parent for all projects related to Spring Remoting.</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencyManagement>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<properties>

View File

@ -1,26 +1,5 @@
package com.example;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.hateoas.MediaTypes;
import org.springframework.restdocs.RestDocumentation;
import org.springframework.restdocs.constraints.ConstraintDescriptions;
import org.springframework.restdocs.mockmvc.RestDocumentationResultHandler;
import org.springframework.restdocs.payload.FieldDescriptor;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import java.util.HashMap;
import java.util.Map;
import static java.util.Collections.singletonList;
import static org.springframework.restdocs.headers.HeaderDocumentation.headerWithName;
import static org.springframework.restdocs.headers.HeaderDocumentation.responseHeaders;
@ -43,8 +22,30 @@ import static org.springframework.restdocs.snippet.Attributes.key;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.util.StringUtils.collectionToDelimitedString;
import java.util.HashMap;
import java.util.Map;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.hateoas.MediaTypes;
import org.springframework.restdocs.RestDocumentation;
import org.springframework.restdocs.constraints.ConstraintDescriptions;
import org.springframework.restdocs.mockmvc.RestDocumentationResultHandler;
import org.springframework.restdocs.payload.FieldDescriptor;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import com.fasterxml.jackson.databind.ObjectMapper;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringRestDocsApplication.class)
@SpringBootTest(classes = SpringRestDocsApplication.class)
@WebAppConfiguration
public class ApiDocumentationIntegrationTest {

View File

@ -1,20 +1,5 @@
package com.example;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.hateoas.MediaTypes;
import org.springframework.restdocs.RestDocumentation;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
@ -26,8 +11,24 @@ import static org.springframework.restdocs.operation.preprocess.Preprocessors.pr
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.hateoas.MediaTypes;
import org.springframework.restdocs.RestDocumentation;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import com.fasterxml.jackson.databind.ObjectMapper;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringRestDocsApplication.class)
@SpringBootTest(classes = SpringRestDocsApplication.class)
@WebAppConfiguration
public class GettingStartedDocumentationIntegrationTest {

View File

@ -9,10 +9,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -9,10 +9,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -8,10 +8,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -8,10 +8,10 @@
<version>1.0-SNAPSHOT</version>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Spring Security JSP Authentication tag sample</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Spring Security JSP Authorize tag sample</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Spring Security JSP configuration</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Spring Security MVC </description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -3,7 +3,7 @@ package org.baeldung.config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class Application extends SpringBootServletInitializer {

View File

@ -12,10 +12,10 @@
<description>Spring Security thymeleaf authentication tag sample</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Spring Security thymeleaf authorize tag sample</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -12,10 +12,10 @@
<description>Spring Security thymeleaf configuration sample project</description>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-4</relativePath>
<relativePath>../../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -9,10 +9,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -9,10 +9,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -9,10 +9,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -24,10 +24,10 @@
</properties>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -15,10 +15,10 @@
</modules>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -8,10 +8,10 @@
<packaging>jar</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -9,10 +9,10 @@
<packaging>jar</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -7,10 +7,10 @@
<packaging>war</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<dependencies>

View File

@ -0,0 +1,13 @@
----------------------------------------------------------------
Thu Jan 04 22:08:53 EET 2018:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.13.1.1 - (1765088): instance a816c00e-0160-c2ca-649a-000003c87738
on database directory memory:/Users/ESSAM/Work/tutorials/spring-userservice/spring_custom_user_service with class loader sun.misc.Launcher$AppClassLoader@6d03e736
Loaded from file:/Users/ESSAM/.m2/repository/org/apache/derby/derby/10.13.1.1/derby-10.13.1.1.jar
java.vendor=Oracle Corporation
java.runtime.version=1.8.0_05-b13
user.dir=/Users/ESSAM/Work/tutorials/spring-userservice
os.name=Mac OS X
os.arch=x86_64
os.version=10.11.6
derby.system.home=null
Database Class Loader started - derby.database.classpath=''

View File

@ -9,10 +9,10 @@
<packaging>pom</packaging>
<parent>
<artifactId>parent-boot-4</artifactId>
<artifactId>parent-boot-5</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-4</relativePath>
<relativePath>../parent-boot-5</relativePath>
</parent>
<modules>

View File

@ -2,7 +2,7 @@ package org.baeldung.config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class ResourceServerApplication extends SpringBootServletInitializer {