BAEL-9 Final (#1262)

* BAEL-9 #3

* pom.xml fix

* Final
This commit is contained in:
Adam InTae Gerard 2017-03-01 22:29:55 -06:00 committed by KevinGilmore
parent 36f79aa956
commit 41bf9ddd6d
26 changed files with 39 additions and 94 deletions

View File

@ -94,7 +94,6 @@
<module>querydsl</module>
<!-- <module>raml</module> -->
<module>reactor-core</module>
<module>redis</module>
<module>rest-assured</module>
<module>rest-testing</module>
@ -111,7 +110,6 @@
<module>spring-autowire</module>
<module>spring-batch</module>
<module>spring-boot</module>
<module>spring-boot-servlet</module>
<module>spring-cloud-data-flow</module>
<module>spring-cloud</module>
<module>spring-core</module>

View File

@ -1,4 +0,0 @@
/target/
.settings/
.classpath
.project

View File

@ -1,2 +0,0 @@
###Relevant Articles:
- [How to Register a Servlet in a Java Web Application](http://www.baeldung.com/how-to-register-a-servlet-in-a-java-web-application/)

View File

@ -1,55 +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>spring-boot-servlet</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>spring-boot-servlet</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.1.RELEASE</version>
</parent>
<dependencies>
<!-- Spring Boot Dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- Embedded EmbeddedTomcatExample Dependencies -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>${tomcat.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<tomcat.version>8.5.11</tomcat.version>
</properties>
</project>

View File

@ -1,2 +0,0 @@
Manifest-Version: 1.0
Main-Class: com.baeldung.ApplicationMain

View File

@ -1,10 +0,0 @@
#Server Configuration
#server.port=8080
#server.context-path=/javabootdata
#Resource Handling
#spring.resources.static-locations=classpath:/WEB-INF/resources
#spring.mvc.view.prefix=/WEB-INF/
#spring.mvc.view.suffix=.jsp
#spring.resources.cache-period=3600
servlet.name=dispatcherExample
servlet.mapping=/dispatcherExampleURL

View File

@ -10,3 +10,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [The @ServletComponentScan Annotation in Spring Boot](http://www.baeldung.com/spring-servletcomponentscan)
- [A Custom Data Binder in Spring MVC](http://www.baeldung.com/spring-mvc-custom-data-binder)
- [Intro to Building an Application with Spring Boot](http://www.baeldung.com/intro-to-spring-boot)
- [How to Register a Servlet in a Java Web Application](http://www.baeldung.com/how-to-register-a-servlet-in-a-java-web-application/)

View File

@ -41,6 +41,24 @@
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>

View File

@ -1,4 +1,4 @@
package com.baeldung;
package com.baeldung.servlets;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -16,4 +16,4 @@ public class ApplicationMain extends SpringBootServletInitializer {
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(ApplicationMain.class);
}
}
}

View File

@ -1,4 +1,4 @@
package com.baeldung.configuration;
package com.baeldung.servlets.configuration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
@ -29,4 +29,4 @@ public class WebAppInitializer implements WebApplicationInitializer {
servletTwo.addMapping("/");
}
}
}

View File

@ -1,4 +1,4 @@
package com.baeldung.configuration;
package com.baeldung.servlets.configuration;
import org.springframework.boot.web.support.ErrorPageFilter;
import org.springframework.context.annotation.Bean;
@ -37,4 +37,3 @@ public class WebMvcConfigure extends WebMvcConfigurerAdapter {
return new ErrorPageFilter();
}
}

View File

@ -1,4 +1,4 @@
package com.baeldung.props;
package com.baeldung.servlets.props;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,4 +1,4 @@
package com.baeldung.props;
package com.baeldung.servlets.props;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package com.baeldung.props;
package com.baeldung.servlets.props;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

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

View File

@ -1,4 +1,4 @@
package com.baeldung.servlets.javaee;
package com.baeldung.servlets.servlets.javaee;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;

View File

@ -1,4 +1,4 @@
package com.baeldung.servlets.javaee;
package com.baeldung.servlets.servlets.javaee;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@ -17,4 +17,4 @@ public class EEWebXmlServlet extends HttpServlet {
PrintWriter out = response.getWriter();
out.println("<p>Hello World</p>");
}
}
}

View File

@ -1,6 +1,6 @@
package com.baeldung.servlets.springboot;
package com.baeldung.servlets.servlets.springboot;
import com.baeldung.servlets.GenericCustomServlet;
import com.baeldung.servlets.servlets.GenericCustomServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -15,5 +15,3 @@ public class SpringRegistrationBeanServlet {
return bean;
}
}

View File

@ -1,4 +1,4 @@
package com.baeldung.servlets.springboot.embedded;
package com.baeldung.servlets.servlets.springboot.embedded;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;

View File

@ -28,4 +28,8 @@ security.user.name=admin1
security.user.password=secret1
management.security.role=SUPERUSER
logging.level.org.springframework=INFO
logging.level.org.springframework=INFO
#Servlet Configuration
servlet.name=dispatcherExample
servlet.mapping=/dispatcherExampleURL