Merge remote-tracking branch 'origin/master'

This commit is contained in:
pivovarit 2016-12-14 16:20:17 +01:00
commit 32ed4d622a
29 changed files with 228 additions and 171 deletions

View File

@ -15,7 +15,7 @@
<properties> <properties>
<auto-service.version>1.0-rc2</auto-service.version> <auto-service.version>1.0-rc2</auto-service.version>
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -13,6 +13,11 @@
<artifactId>annotation-user</artifactId> <artifactId>annotation-user</artifactId>
<properties>
<junit.version>4.12</junit.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
@ -24,7 +29,7 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
@ -37,7 +42,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>

View File

@ -4,15 +4,18 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cxf-introduction</artifactId> <artifactId>cxf-introduction</artifactId>
<parent> <parent>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<artifactId>apache-cxf</artifactId> <artifactId>apache-cxf</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>
<cxf.version>3.1.6</cxf.version> <cxf.version>3.1.8</cxf.version>
<surefire.version>2.19.1</surefire.version> <surefire.version>2.19.1</surefire.version>
</properties> </properties>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -24,7 +27,7 @@
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version> <version>${surefire.version}</version>
<configuration> <configuration>
<excludes> <excludes>
<exclude>**/*LiveTest.java</exclude> <exclude>**/*LiveTest.java</exclude>
@ -33,6 +36,7 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>

View File

@ -4,17 +4,20 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cxf-jaxrs-implementation</artifactId> <artifactId>cxf-jaxrs-implementation</artifactId>
<parent> <parent>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<artifactId>apache-cxf</artifactId> <artifactId>apache-cxf</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cxf.version>3.1.7</cxf.version> <cxf.version>3.1.8</cxf.version>
<httpclient.version>4.5.2</httpclient.version> <httpclient.version>4.5.2</httpclient.version>
<surefire.version>2.19.1</surefire.version> <surefire.version>2.19.1</surefire.version>
</properties> </properties>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -26,7 +29,7 @@
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version> <version>${surefire.version}</version>
<configuration> <configuration>
<excludes> <excludes>
<exclude>**/*LiveTest.java</exclude> <exclude>**/*LiveTest.java</exclude>
@ -35,6 +38,7 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>

View File

@ -33,7 +33,7 @@
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version> <version>${javax.servlet-api.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
@ -41,7 +41,7 @@
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>2.6</version> <version>${maven-war-plugin.version}</version>
<configuration> <configuration>
<failOnMissingWebXml>false</failOnMissingWebXml> <failOnMissingWebXml>false</failOnMissingWebXml>
</configuration> </configuration>
@ -66,7 +66,7 @@
<plugin> <plugin>
<groupId>org.codehaus.cargo</groupId> <groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId> <artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.19</version> <version>${cargo-maven2-plugin.version}</version>
<configuration> <configuration>
<container> <container>
<containerId>tomcat8x</containerId> <containerId>tomcat8x</containerId>
@ -121,9 +121,13 @@
</profiles> </profiles>
<properties> <properties>
<cxf.version>3.1.6</cxf.version> <cxf.version>3.1.8</cxf.version>
<spring.version>4.3.1.RELEASE</spring.version> <spring.version>4.3.4.RELEASE</spring.version>
<javax.servlet-api.version>3.1.0</javax.servlet-api.version>
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<surefire.version>2.19.1</surefire.version> <surefire.version>2.19.1</surefire.version>
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version>
</properties> </properties>
</project> </project>

View File

@ -5,19 +5,28 @@
<artifactId>apache-cxf</artifactId> <artifactId>apache-cxf</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>cxf-introduction</module> <module>cxf-introduction</module>
<module>cxf-spring</module> <module>cxf-spring</module>
<module>cxf-jaxrs-implementation</module> <module>cxf-jaxrs-implementation</module>
</modules> </modules>
<properties>
<junit.version>4.12</junit.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<defaultGoal>install</defaultGoal> <defaultGoal>install</defaultGoal>
<pluginManagement> <pluginManagement>
@ -25,7 +34,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
@ -34,7 +43,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version> <version>${exec-maven-plugin.version}</version>
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>

View File

@ -67,7 +67,7 @@
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId> <artifactId>fop</artifactId>
<version>1.1</version> <version>${fop.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.apache.avalon.framework</groupId> <groupId>org.apache.avalon.framework</groupId>
@ -83,18 +83,18 @@
<dependency> <dependency>
<groupId>avalon-framework</groupId> <groupId>avalon-framework</groupId>
<artifactId>avalon-framework-api</artifactId> <artifactId>avalon-framework-api</artifactId>
<version>4.2.0</version> <version>${avalon-framework.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>avalon-framework</groupId> <groupId>avalon-framework</groupId>
<artifactId>avalon-framework-impl</artifactId> <artifactId>avalon-framework-impl</artifactId>
<version>4.2.0</version> <version>${avalon-framework.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.dbdoclet</groupId> <groupId>org.dbdoclet</groupId>
<artifactId>dbdoclet</artifactId> <artifactId>dbdoclet</artifactId>
<version>8.0.2</version> <version>${dbdoclet.version}</version>
</dependency> </dependency>
<dependency> <dependency>
@ -108,7 +108,7 @@
<dependency> <dependency>
<groupId>net.sf.jtidy</groupId> <groupId>net.sf.jtidy</groupId>
<artifactId>jtidy</artifactId> <artifactId>jtidy</artifactId>
<version>r938</version> <version>${jtidy.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
@ -187,40 +187,22 @@
</profiles> </profiles>
<properties> <properties>
<!-- persistence --> <fop.version>1.1</fop.version>
<hibernate.version>4.3.11.Final</hibernate.version> <avalon-framework.version>4.3</avalon-framework.version>
<mysql-connector-java.version>5.1.38</mysql-connector-java.version> <dbdoclet.version>8.0.2</dbdoclet.version>
<jtidy.version>r938</jtidy.version>
<!-- marshalling -->
<jackson.version>2.7.2</jackson.version>
<!-- logging --> <!-- logging -->
<org.slf4j.version>1.7.9</org.slf4j.version> <org.slf4j.version>1.7.21</org.slf4j.version>
<logback.version>1.1.2</logback.version> <logback.version>1.1.7</logback.version>
<!-- various -->
<hibernate-validator.version>5.1.3.Final</hibernate-validator.version>
<!-- util -->
<guava.version>19.0</guava.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
<!-- testing --> <!-- testing -->
<org.hamcrest.version>1.3</org.hamcrest.version> <org.hamcrest.version>1.3</org.hamcrest.version>
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
<mockito.version>1.10.19</mockito.version> <mockito.version>1.10.19</mockito.version>
<httpcore.version>4.4</httpcore.version>
<httpclient.version>4.4</httpclient.version>
<rest-assured.version>2.9.0</rest-assured.version>
<!-- maven plugins --> <!-- maven plugins -->
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<maven-resources-plugin.version>2.7</maven-resources-plugin.version>
<cargo-maven2-plugin.version>1.4.18</cargo-maven2-plugin.version>
</properties> </properties>

View File

@ -121,12 +121,11 @@
<properties> <properties>
<source.version>1.8</source.version> <source.version>1.8</source.version>
<aspectj.version>1.6.11</aspectj.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.9</aspectj.version> <aspectj.version>1.8.9</aspectj.version>
<org.slf4j.version>1.7.21</org.slf4j.version> <org.slf4j.version>1.7.21</org.slf4j.version>
<logback.version>1.1.7</logback.version> <logback.version>1.1.7</logback.version>
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
</properties> </properties>

View File

@ -23,13 +23,13 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
<version>3.5.1</version> <version>${assertj-core.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
@ -40,7 +40,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
@ -51,6 +51,11 @@
<properties> <properties>
<guava.version>19.0</guava.version> <guava.version>19.0</guava.version>
<assertj-guava.version>3.1.0</assertj-guava.version>
<junit.version>4.12</junit.version>
<assertj-core.version>3.6.1</assertj-core.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
</properties> </properties>
</project> </project>

View File

@ -5,12 +5,13 @@
<artifactId>autovalue-tutorial</artifactId> <artifactId>autovalue-tutorial</artifactId>
<version>1.0</version> <version>1.0</version>
<name>AutoValue</name> <name>AutoValue</name>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>7</source> <source>7</source>
<target>7</target> <target>7</target>
@ -19,19 +20,25 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.google.auto.value</groupId> <groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId> <artifactId>auto-value</artifactId>
<version>1.2</version> <version>${auto-value.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.3</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<properties>
<auto-value.version>1.3</auto-value.version>
<junit.version>4.12</junit.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
</properties>
</project> </project>

View File

@ -22,18 +22,18 @@
<dependency> <dependency>
<groupId>org.aspectj</groupId> <groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId> <artifactId>aspectjweaver</artifactId>
<version>1.8.9</version> <version>${aspectjweaver.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.weld.se</groupId> <groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId> <artifactId>weld-se-core</artifactId>
<version>2.3.5.Final</version> <version>${weld-se-core.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -97,7 +97,10 @@
</profile> </profile>
</profiles> </profiles>
<properties> <properties>
<spring.version>4.3.1.RELEASE</spring.version> <spring.version>4.3.4.RELEASE</spring.version>
<aspectjweaver.version>1.8.9</aspectjweaver.version>
<weld-se-core.version>2.4.1.Final</weld-se-core.version>
<junit.version>4.12</junit.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
</properties> </properties>

View File

@ -76,9 +76,7 @@
<properties> <properties>
<!-- logging --> <!-- logging -->
<org.slf4j.version>1.7.13</org.slf4j.version> <org.slf4j.version>1.7.21</org.slf4j.version>
<logback.version>1.0.13</logback.version>
<!-- maven plugins --> <!-- maven plugins -->
<maven-compiler-plugin.version>3.6-jigsaw-SNAPSHOT</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.6-jigsaw-SNAPSHOT</maven-compiler-plugin.version>

View File

@ -14,7 +14,7 @@
<dependency> <dependency>
<groupId>net.sourceforge.collections</groupId> <groupId>net.sourceforge.collections</groupId>
<artifactId>collections-generic</artifactId> <artifactId>collections-generic</artifactId>
<version>4.01</version> <version>${collections-generic.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
@ -25,13 +25,13 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId> <artifactId>commons-collections4</artifactId>
<version>4.0</version> <version>${commons-collections4.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<version>2.4</version> <version>${commons-io.version}</version>
</dependency> </dependency>
<dependency> <dependency>
@ -43,7 +43,7 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId> <artifactId>commons-math3</artifactId>
<version>3.3</version> <version>${commons-math3.version}</version>
</dependency> </dependency>
<dependency> <dependency>
@ -122,8 +122,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
@ -321,44 +319,33 @@
</profiles> </profiles>
<properties> <properties>
<!-- persistence -->
<hibernate.version>4.3.11.Final</hibernate.version>
<mysql-connector-java.version>5.1.38</mysql-connector-java.version>
<!-- marshalling --> <!-- marshalling -->
<jackson.version>2.7.8</jackson.version> <jackson.version>2.8.5</jackson.version>
<!-- logging --> <!-- logging -->
<org.slf4j.version>1.7.13</org.slf4j.version> <org.slf4j.version>1.7.21</org.slf4j.version>
<logback.version>1.1.3</logback.version> <logback.version>1.1.7</logback.version>
<!-- various -->
<hibernate-validator.version>5.1.3.Final</hibernate-validator.version>
<!-- util --> <!-- util -->
<guava.version>19.0</guava.version> <guava.version>19.0</guava.version>
<commons-lang3.version>3.4</commons-lang3.version> <commons-lang3.version>3.5</commons-lang3.version>
<bouncycastle.version>1.55</bouncycastle.version> <bouncycastle.version>1.55</bouncycastle.version>
<commons-codec.version>1.10</commons-codec.version> <commons-codec.version>1.10</commons-codec.version>
<commons-math3.version>3.6.1</commons-math3.version>
<commons-io.version>2.5</commons-io.version>
<commons-collections4.version>4.1</commons-collections4.version>
<collections-generic.version>4.01</collections-generic.version>
<!-- testing --> <!-- testing -->
<org.hamcrest.version>1.3</org.hamcrest.version> <org.hamcrest.version>1.3</org.hamcrest.version>
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
<mockito.version>1.10.19</mockito.version> <mockito.version>1.10.19</mockito.version>
<testng.version>6.8</testng.version> <testng.version>6.10</testng.version>
<assertj.version>3.5.1</assertj.version> <assertj.version>3.6.1</assertj.version>
<httpcore.version>4.4.1</httpcore.version>
<httpclient.version>4.5</httpclient.version>
<rest-assured.version>2.9.0</rest-assured.version>
<!-- maven plugins --> <!-- maven plugins -->
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<maven-resources-plugin.version>2.7</maven-resources-plugin.version>
<cargo-maven2-plugin.version>1.4.18</cargo-maven2-plugin.version>
</properties> </properties>

View File

@ -16,10 +16,10 @@ public class ExitingExecutorServiceExample {
public static void main(String... args) { public static void main(String... args) {
ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(5); final ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(5);
ExecutorService executorService = MoreExecutors.getExitingExecutorService(executor, 100, TimeUnit.MILLISECONDS); final ExecutorService executorService = MoreExecutors.getExitingExecutorService(executor, 100, TimeUnit.MILLISECONDS);
executorService.submit(() -> { executorService.submit((Runnable) () -> {
while (true) { while (true) {
} }
}); });

View File

@ -79,10 +79,10 @@
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>1.7</source> <source>${java.version}</source>
<target>1.7</target> <target>${java.version}</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -100,14 +100,15 @@
</build> </build>
<properties> <properties>
<java.version>1.7</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<couchbase.client.version>2.2.6</couchbase.client.version> <couchbase.client.version>2.3.6</couchbase.client.version>
<spring-framework.version>4.2.4.RELEASE</spring-framework.version> <spring-framework.version>4.3.4.RELEASE</spring-framework.version>
<logback.version>1.1.3</logback.version> <logback.version>1.1.7</logback.version>
<org.slf4j.version>1.7.12</org.slf4j.version> <org.slf4j.version>1.7.21</org.slf4j.version>
<junit.version>4.11</junit.version> <junit.version>4.12</junit.version>
<commons-lang3.version>3.4</commons-lang3.version> <commons-lang3.version>3.5</commons-lang3.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
</properties> </properties>

View File

@ -25,17 +25,22 @@
resources, i.e. build is platform dependent! --> resources, i.e. build is platform dependent! -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>1.7.21</slf4j.version>
<querydsl.version>3.7.4</querydsl.version>
<deltaspike.version>1.7.2</deltaspike.version>
<!-- JBoss dependency versions --> <!-- JBoss dependency versions -->
<version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin> <wildfly.maven.plugin.version>1.0.2.Final</wildfly.maven.plugin.version>
<!-- Define the version of the JBoss BOMs we want to import to specify <!-- Define the version of the JBoss BOMs we want to import to specify
tested stacks. --> tested stacks. -->
<version.jboss.bom>8.2.1.Final</version.jboss.bom> <jboss.bom.version>8.2.2.Final</jboss.bom.version>
<!-- other plugin versions --> <!-- other plugin versions -->
<version.compiler.plugin>3.1</version.compiler.plugin> <version.compiler.plugin>3.6.0</version.compiler.plugin>
<version.surefire.plugin>2.16</version.surefire.plugin> <surefire.plugin.version>2.19.1</surefire.plugin.version>
<version.war.plugin>2.5</version.war.plugin> <war.plugin.version>2.6</war.plugin.version>
<apt-maven-plugin.version>1.1.3</apt-maven-plugin.version>
<!-- maven-compiler-plugin --> <!-- maven-compiler-plugin -->
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
@ -56,14 +61,14 @@
<dependency> <dependency>
<groupId>org.wildfly.bom</groupId> <groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-tools</artifactId> <artifactId>jboss-javaee-7.0-with-tools</artifactId>
<version>${version.jboss.bom}</version> <version>${jboss.bom.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wildfly.bom</groupId> <groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-hibernate</artifactId> <artifactId>jboss-javaee-7.0-with-hibernate</artifactId>
<version>${version.jboss.bom}</version> <version>${jboss.bom.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -187,14 +192,14 @@
<dependency> <dependency>
<groupId>org.apache.deltaspike.modules</groupId> <groupId>org.apache.deltaspike.modules</groupId>
<artifactId>deltaspike-data-module-api</artifactId> <artifactId>deltaspike-data-module-api</artifactId>
<version>1.7.1</version> <version>${deltaspike.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.deltaspike.modules</groupId> <groupId>org.apache.deltaspike.modules</groupId>
<artifactId>deltaspike-data-module-impl</artifactId> <artifactId>deltaspike-data-module-impl</artifactId>
<version>1.7.1</version> <version>${deltaspike.version}</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
@ -202,20 +207,20 @@
<dependency> <dependency>
<groupId>com.mysema.querydsl</groupId> <groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-apt</artifactId> <artifactId>querydsl-apt</artifactId>
<version>3.7.4</version> <version>${querydsl.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.mysema.querydsl</groupId> <groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId> <artifactId>querydsl-jpa</artifactId>
<version>3.7.4</version> <version>${querydsl.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version> <version>${slf4j.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
@ -226,7 +231,7 @@
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version> <version>${war.plugin.version}</version>
<configuration> <configuration>
<!-- Java EE 7 doesn't require web.xml, Maven needs to catch up! --> <!-- Java EE 7 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml> <failOnMissingWebXml>false</failOnMissingWebXml>
@ -235,7 +240,7 @@
<plugin> <plugin>
<groupId>com.mysema.maven</groupId> <groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId> <artifactId>apt-maven-plugin</artifactId>
<version>1.0.9</version> <version>${apt-maven-plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
@ -253,7 +258,7 @@
<plugin> <plugin>
<groupId>org.wildfly.plugins</groupId> <groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId> <artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version> <version>${wildfly.maven.plugin.version}</version>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
@ -272,7 +277,7 @@
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>${version.surefire.plugin}</version> <version>${surefire.plugin.version}</version>
<configuration> <configuration>
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>

View File

@ -13,7 +13,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>7</source> <source>7</source>
<target>7</target> <target>7</target>
@ -26,33 +26,41 @@
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>1.7.5</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId> <artifactId>jcl-over-slf4j</artifactId>
<version>1.7.5</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.2.1</version> <version>${commons-lang3.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.dozer</groupId> <groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId> <artifactId>dozer</artifactId>
<version>5.5.1</version> <version>${dozer.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.3</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<properties>
<slf4j.version>1.7.21</slf4j.version>
<commons-lang3.version>3.5</commons-lang3.version>
<dozer.version>5.5.1</dozer.version>
<junit.version>4.12</junit.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
</properties>
</project> </project>

View File

@ -44,4 +44,10 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<properties>
<junit.version>4.12</junit.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
</properties>
</project> </project>

View File

@ -15,7 +15,7 @@
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
<artifactId>javaee-api</artifactId> <artifactId>javaee-api</artifactId>
<version>7.0</version> <version>${javaee-api.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@ -25,7 +25,7 @@
<plugin> <plugin>
<groupId>org.wildfly.plugins</groupId> <groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId> <artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha5</version> <version>${wildfly-maven-plugin.version}</version>
<configuration> <configuration>
<hostname>127.0.0.1</hostname> <hostname>127.0.0.1</hostname>
<port>9990</port> <port>9990</port>
@ -37,4 +37,9 @@
</plugins> </plugins>
<!-- <finalName>ejb-remote</finalName> --> <!-- <finalName>ejb-remote</finalName> -->
</build> </build>
<properties>
<javaee-api.version>7.0</javaee-api.version>
<wildfly-maven-plugin.version>1.1.0.Beta1</wildfly-maven-plugin.version>
</properties>
</project> </project>

View File

@ -38,14 +38,14 @@
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
<artifactId>javaee-api</artifactId> <artifactId>javaee-api</artifactId>
<version>7.0</version> <version>${javaee-api.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wildfly</groupId> <groupId>org.wildfly</groupId>
<artifactId>wildfly-ejb-client-bom</artifactId> <artifactId>wildfly-ejb-client-bom</artifactId>
<version>10.1.0.Final</version> <version>${wildfly.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -57,7 +57,7 @@
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
@ -66,7 +66,7 @@
<plugin> <plugin>
<artifactId>maven-ejb-plugin</artifactId> <artifactId>maven-ejb-plugin</artifactId>
<version>2.4</version> <version>${maven-ejb-plugin.version}</version>
<configuration> <configuration>
<ejbVersion>3.2</ejbVersion> <ejbVersion>3.2</ejbVersion>
</configuration> </configuration>
@ -79,4 +79,11 @@
<module>ejb-remote</module> <module>ejb-remote</module>
<module>ejb-client</module> <module>ejb-client</module>
</modules> </modules>
<properties>
<javaee-api.version>7.0</javaee-api.version>
<wildfly.version>10.1.0.Final</wildfly.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-ejb-plugin.version>2.5.1</maven-ejb-plugin.version>
</properties>
</project> </project>

View File

@ -23,7 +23,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
@ -32,4 +32,8 @@
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
<properties>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
</properties>
</project> </project>

View File

@ -16,54 +16,62 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<feign.version>9.4.0</feign.version>
<slf4j.version>1.7.21</slf4j.version>
<log4j.version>2.7</log4j.version>
<lombok.version>1.16.12</lombok.version>
<junit.version>4.12</junit.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<spring-boot-maven-plugin.version>1.4.2.RELEASE</spring-boot-maven-plugin.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.github.openfeign</groupId> <groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId> <artifactId>feign-core</artifactId>
<version>9.3.1</version> <version>${feign.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.openfeign</groupId> <groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId> <artifactId>feign-okhttp</artifactId>
<version>9.3.1</version> <version>${feign.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.openfeign</groupId> <groupId>io.github.openfeign</groupId>
<artifactId>feign-gson</artifactId> <artifactId>feign-gson</artifactId>
<version>9.3.1</version> <version>${feign.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.openfeign</groupId> <groupId>io.github.openfeign</groupId>
<artifactId>feign-slf4j</artifactId> <artifactId>feign-slf4j</artifactId>
<version>9.3.1</version> <version>${feign.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>1.7.21</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId> <artifactId>log4j-core</artifactId>
<version>2.6.2</version> <version>${log4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId> <artifactId>log4j-slf4j-impl</artifactId>
<version>2.6.2</version> <version>${log4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.16.10</version> <version>${lombok.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@ -74,7 +82,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
@ -83,7 +91,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version> <version>${maven-surefire-plugin.version}</version>
<configuration> <configuration>
<skipTests>true</skipTests> <skipTests>true</skipTests>
</configuration> </configuration>
@ -91,9 +99,10 @@
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>1.4.0.RELEASE</version> <version>${spring-boot-maven-plugin.version}</version>
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
</project> </project>

View File

@ -218,7 +218,7 @@ public class HttpClientConnectionManagementLiveTest {
final HeaderElement he = it.nextElement(); final HeaderElement he = it.nextElement();
final String param = he.getName(); final String param = he.getName();
final String value = he.getValue(); final String value = he.getValue();
if (value != null && param.equalsIgnoreCase("timeout")) { if ((value != null) && param.equalsIgnoreCase("timeout")) {
return Long.parseLong(value) * 1000; return Long.parseLong(value) * 1000;
} }
} }
@ -251,9 +251,9 @@ public class HttpClientConnectionManagementLiveTest {
basicConnManager.connect(conn, route, 1000, context); basicConnManager.connect(conn, route, 1000, context);
basicConnManager.routeComplete(conn, route, context); basicConnManager.routeComplete(conn, route, context);
final HttpRequestExecutor exeRequest = new HttpRequestExecutor(); final HttpRequestExecutor exeRequest = new HttpRequestExecutor();
context.setTargetHost((new HttpHost("www.baeldung.com", 80))); context.setTargetHost((new HttpHost("http://httpbin.org", 80)));
final HttpGet get = new HttpGet("http://www.baeldung.com"); final HttpGet get = new HttpGet("http://httpbin.org");
exeRequest.execute(get, conn, context); exeRequest.execute(get, conn, context);
conn.isResponseAvailable(1000); conn.isResponseAvailable(1000);
basicConnManager.releaseConnection(conn, null, 1, TimeUnit.SECONDS); basicConnManager.releaseConnection(conn, null, 1, TimeUnit.SECONDS);
@ -282,8 +282,9 @@ public class HttpClientConnectionManagementLiveTest {
for (final MultiHttpClientConnThread thread : threads) { for (final MultiHttpClientConnThread thread : threads) {
thread.join(10000); thread.join(10000);
countConnMade++; countConnMade++;
if (countConnMade == 0) if (countConnMade == 0) {
assertTrue(thread.getLeasedConn() == 5); assertTrue(thread.getLeasedConn() == 5);
}
} }
} }
@ -356,7 +357,7 @@ public class HttpClientConnectionManagementLiveTest {
// @Ignore // @Ignore
// 8.2 ARTICLE VERSION // 8.2 ARTICLE VERSION
public final void whenCustomizedIdleConnMonitor_thenNoExceptions() throws InterruptedException, IOException { public final void whenCustomizedIdleConnMonitor_thenNoExceptions() throws InterruptedException, IOException {
final HttpGet get = new HttpGet("http://google.com"); new HttpGet("http://google.com");
poolingConnManager = new PoolingHttpClientConnectionManager(); poolingConnManager = new PoolingHttpClientConnectionManager();
client = HttpClients.custom().setConnectionManager(poolingConnManager).build(); client = HttpClients.custom().setConnectionManager(poolingConnManager).build();
final IdleConnectionMonitorThread staleMonitor = new IdleConnectionMonitorThread(poolingConnManager); final IdleConnectionMonitorThread staleMonitor = new IdleConnectionMonitorThread(poolingConnManager);

View File

@ -3,3 +3,4 @@
classes classes
target target
*.iml *.iml
out

View File

@ -1,4 +1,4 @@
package com.root; package com.baeldung.servlets;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException; import javax.servlet.ServletException;

View File

@ -1,4 +1,4 @@
package com.root; package com.baeldung.servlets;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient; import org.apache.http.client.HttpClient;
@ -13,7 +13,7 @@ import java.util.List;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
public class FormServletTest { public class FormServletLiveTest {
@Test @Test
public void whenPostRequestUsingHttpClient_thenCorrect() throws Exception { public void whenPostRequestUsingHttpClient_thenCorrect() throws Exception {

View File

@ -1,12 +1,18 @@
package org.baeldung.spring; package org.baeldung.spring;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.context.request.RequestContextListener;
import org.springframework.web.filter.ShallowEtagHeaderFilter; import org.springframework.web.filter.ShallowEtagHeaderFilter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/** /**
* Main Application Class - uses Spring Boot. Just run this as a normal Java * Main Application Class - uses Spring Boot. Just run this as a normal Java
@ -16,7 +22,19 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@EnableScheduling @EnableScheduling
@EnableAutoConfiguration @EnableAutoConfiguration
@ComponentScan("org.baeldung") @ComponentScan("org.baeldung")
public class Application extends WebMvcConfigurerAdapter { @SpringBootApplication
public class Application extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
@Override
public void onStartup(ServletContext sc) throws ServletException {
// Manages the lifecycle of the root application context
sc.addListener(new RequestContextListener());
}
public static void main(final String[] args) { public static void main(final String[] args) {
SpringApplication.run(Application.class, args); SpringApplication.run(Application.class, args);

View File

@ -1,16 +0,0 @@
package org.baeldung.spring;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.request.RequestContextListener;
public class ListenerConfig implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext sc) throws ServletException {
// Manages the lifecycle of the root application context
sc.addListener(new RequestContextListener());
}
}

View File

@ -1,2 +1,3 @@
server.port=8082 server.port=8082
server.context-path=/spring-security-rest-full server.context-path=/spring-security-rest-full
endpoints.metrics.enabled=true