parent
36f79aa956
commit
41bf9ddd6d
2
pom.xml
2
pom.xml
@ -94,7 +94,6 @@
|
|||||||
<module>querydsl</module>
|
<module>querydsl</module>
|
||||||
|
|
||||||
<!-- <module>raml</module> -->
|
<!-- <module>raml</module> -->
|
||||||
<module>reactor-core</module>
|
|
||||||
<module>redis</module>
|
<module>redis</module>
|
||||||
<module>rest-assured</module>
|
<module>rest-assured</module>
|
||||||
<module>rest-testing</module>
|
<module>rest-testing</module>
|
||||||
@ -111,7 +110,6 @@
|
|||||||
<module>spring-autowire</module>
|
<module>spring-autowire</module>
|
||||||
<module>spring-batch</module>
|
<module>spring-batch</module>
|
||||||
<module>spring-boot</module>
|
<module>spring-boot</module>
|
||||||
<module>spring-boot-servlet</module>
|
|
||||||
<module>spring-cloud-data-flow</module>
|
<module>spring-cloud-data-flow</module>
|
||||||
<module>spring-cloud</module>
|
<module>spring-cloud</module>
|
||||||
<module>spring-core</module>
|
<module>spring-core</module>
|
||||||
|
4
spring-boot-servlet/.gitignore
vendored
4
spring-boot-servlet/.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
/target/
|
|
||||||
.settings/
|
|
||||||
.classpath
|
|
||||||
.project
|
|
@ -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/)
|
|
@ -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>
|
|
@ -1,2 +0,0 @@
|
|||||||
Manifest-Version: 1.0
|
|
||||||
Main-Class: com.baeldung.ApplicationMain
|
|
@ -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
|
|
@ -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)
|
- [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)
|
- [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)
|
- [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/)
|
||||||
|
@ -41,6 +41,24 @@
|
|||||||
<artifactId>spring-boot-starter-security</artifactId>
|
<artifactId>spring-boot-starter-security</artifactId>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>io.dropwizard.metrics</groupId>
|
<groupId>io.dropwizard.metrics</groupId>
|
||||||
<artifactId>metrics-core</artifactId>
|
<artifactId>metrics-core</artifactId>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung;
|
package com.baeldung.servlets;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
@ -16,4 +16,4 @@ public class ApplicationMain extends SpringBootServletInitializer {
|
|||||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||||
return application.sources(ApplicationMain.class);
|
return application.sources(ApplicationMain.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.configuration;
|
package com.baeldung.servlets.configuration;
|
||||||
|
|
||||||
import org.springframework.web.WebApplicationInitializer;
|
import org.springframework.web.WebApplicationInitializer;
|
||||||
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
||||||
@ -29,4 +29,4 @@ public class WebAppInitializer implements WebApplicationInitializer {
|
|||||||
servletTwo.addMapping("/");
|
servletTwo.addMapping("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.configuration;
|
package com.baeldung.servlets.configuration;
|
||||||
|
|
||||||
import org.springframework.boot.web.support.ErrorPageFilter;
|
import org.springframework.boot.web.support.ErrorPageFilter;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@ -37,4 +37,3 @@ public class WebMvcConfigure extends WebMvcConfigurerAdapter {
|
|||||||
return new ErrorPageFilter();
|
return new ErrorPageFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.props;
|
package com.baeldung.servlets.props;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.props;
|
package com.baeldung.servlets.props;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.props;
|
package com.baeldung.servlets.props;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.servlets;
|
package com.baeldung.servlets.servlets;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServlet;
|
import javax.servlet.http.HttpServlet;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.servlets.javaee;
|
package com.baeldung.servlets.servlets.javaee;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.annotation.WebServlet;
|
import javax.servlet.annotation.WebServlet;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.servlets.javaee;
|
package com.baeldung.servlets.servlets.javaee;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServlet;
|
import javax.servlet.http.HttpServlet;
|
||||||
@ -17,4 +17,4 @@ public class EEWebXmlServlet extends HttpServlet {
|
|||||||
PrintWriter out = response.getWriter();
|
PrintWriter out = response.getWriter();
|
||||||
out.println("<p>Hello World</p>");
|
out.println("<p>Hello World</p>");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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.boot.web.servlet.ServletRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -15,5 +15,3 @@ public class SpringRegistrationBeanServlet {
|
|||||||
return bean;
|
return bean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -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.EmbeddedServletContainerFactory;
|
||||||
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
|
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
|
@ -28,4 +28,8 @@ security.user.name=admin1
|
|||||||
security.user.password=secret1
|
security.user.password=secret1
|
||||||
management.security.role=SUPERUSER
|
management.security.role=SUPERUSER
|
||||||
|
|
||||||
logging.level.org.springframework=INFO
|
logging.level.org.springframework=INFO
|
||||||
|
|
||||||
|
#Servlet Configuration
|
||||||
|
servlet.name=dispatcherExample
|
||||||
|
servlet.mapping=/dispatcherExampleURL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user