security and rest work
This commit is contained in:
parent
0eea508ede
commit
79269f8a43
|
@ -9,11 +9,11 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
||||||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||||
import org.springframework.web.servlet.view.JstlView;
|
import org.springframework.web.servlet.view.JstlView;
|
||||||
|
|
||||||
@EnableWebMvc
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class FrontendConfig extends WebMvcConfigurerAdapter {
|
@EnableWebMvc
|
||||||
|
public class MvcConfig extends WebMvcConfigurerAdapter {
|
||||||
|
|
||||||
public FrontendConfig() {
|
public MvcConfig() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
id="WebApp_ID" version="3.0">
|
id="WebApp_ID" version="3.0">
|
||||||
|
|
||||||
<display-name>Spring MVC Application</display-name>
|
<display-name>Spring Security Basic Auth Application</display-name>
|
||||||
|
|
||||||
<!-- Spring root -->
|
<!-- Spring root -->
|
||||||
<context-param>
|
<context-param>
|
||||||
|
|
|
@ -1,142 +1,157 @@
|
||||||
<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">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<modelVersion>4.0.0</modelVersion>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<groupId>org.baeldung</groupId>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>spring-security-custom</artifactId>
|
<groupId>org.baeldung</groupId>
|
||||||
<version>0.1-SNAPSHOT</version>
|
<artifactId>spring-security-custom</artifactId>
|
||||||
|
<version>0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>spring-security-custom</name>
|
<name>spring-security-custom</name>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- Spring Security -->
|
<!-- Spring Security -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.security</groupId>
|
<groupId>org.springframework.security</groupId>
|
||||||
<artifactId>spring-security-web</artifactId>
|
<artifactId>spring-security-web</artifactId>
|
||||||
<version>${org.springframework.security.version}</version>
|
<version>${org.springframework.security.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.security</groupId>
|
<groupId>org.springframework.security</groupId>
|
||||||
<artifactId>spring-security-config</artifactId>
|
<artifactId>spring-security-config</artifactId>
|
||||||
<version>${org.springframework.security.version}</version>
|
<version>${org.springframework.security.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring -->
|
<!-- Spring -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-core</artifactId>
|
<artifactId>spring-core</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-context</artifactId>
|
<artifactId>spring-context</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-jdbc</artifactId>
|
<artifactId>spring-jdbc</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-beans</artifactId>
|
<artifactId>spring-beans</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-aop</artifactId>
|
<artifactId>spring-aop</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-tx</artifactId>
|
<artifactId>spring-tx</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-expression</artifactId>
|
<artifactId>spring-expression</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-webmvc</artifactId>
|
<artifactId>spring-webmvc</artifactId>
|
||||||
<version>${org.springframework.version}</version>
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-oxm</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- web -->
|
<!-- marshalling -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>2.2.2</version>
|
||||||
<scope>provided</scope>
|
</dependency>
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<!-- web -->
|
||||||
<groupId>javax.servlet</groupId>
|
|
||||||
<artifactId>jstl</artifactId>
|
|
||||||
<version>1.2</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- util -->
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>jstl</artifactId>
|
||||||
<version>${guava.version}</version>
|
<version>1.2</version>
|
||||||
</dependency>
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- test scoped -->
|
<!-- util -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>junit-dep</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>${junit.version}</version>
|
<version>${guava.version}</version>
|
||||||
<scope>test</scope>
|
</dependency>
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<!-- test scoped -->
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-core</artifactId>
|
|
||||||
<version>${org.hamcrest.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-library</artifactId>
|
|
||||||
<version>${org.hamcrest.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>junit-dep</artifactId>
|
||||||
<version>${mockito.version}</version>
|
<version>${junit.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<version>${org.hamcrest.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<version>${org.hamcrest.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<build>
|
<dependency>
|
||||||
<finalName>spring-security-custom</finalName>
|
<groupId>org.mockito</groupId>
|
||||||
<resources>
|
<artifactId>mockito-core</artifactId>
|
||||||
<resource>
|
<version>${mockito.version}</version>
|
||||||
<directory>src/main/resources</directory>
|
<scope>test</scope>
|
||||||
<filtering>true</filtering>
|
</dependency>
|
||||||
</resource>
|
|
||||||
</resources>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>spring-security-custom</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
@ -148,80 +163,80 @@
|
||||||
<debuglevel>source</debuglevel>
|
<debuglevel>source</debuglevel>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<!-- <exclude>**/*ProductionTest.java</exclude> -->
|
|
||||||
</excludes>
|
|
||||||
<systemPropertyVariables>
|
|
||||||
<!-- <provPersistenceTarget>h2</provPersistenceTarget> -->
|
|
||||||
</systemPropertyVariables>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.cargo</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>cargo-maven2-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${cargo-maven2-plugin.version}</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<wait>true</wait>
|
<excludes>
|
||||||
<container>
|
<!-- <exclude>**/*ProductionTest.java</exclude> -->
|
||||||
<containerId>jetty8x</containerId>
|
</excludes>
|
||||||
<type>embedded</type>
|
<systemPropertyVariables>
|
||||||
<systemProperties>
|
<!-- <provPersistenceTarget>h2</provPersistenceTarget> -->
|
||||||
<!-- <provPersistenceTarget>cargo</provPersistenceTarget> -->
|
</systemPropertyVariables>
|
||||||
</systemProperties>
|
</configuration>
|
||||||
</container>
|
</plugin>
|
||||||
<configuration>
|
|
||||||
<properties>
|
|
||||||
<cargo.servlet.port>8082</cargo.servlet.port>
|
|
||||||
</properties>
|
|
||||||
</configuration>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
<plugin>
|
||||||
|
<groupId>org.codehaus.cargo</groupId>
|
||||||
|
<artifactId>cargo-maven2-plugin</artifactId>
|
||||||
|
<version>${cargo-maven2-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<wait>true</wait>
|
||||||
|
<container>
|
||||||
|
<containerId>jetty8x</containerId>
|
||||||
|
<type>embedded</type>
|
||||||
|
<systemProperties>
|
||||||
|
<!-- <provPersistenceTarget>cargo</provPersistenceTarget> -->
|
||||||
|
</systemProperties>
|
||||||
|
</container>
|
||||||
|
<configuration>
|
||||||
|
<properties>
|
||||||
|
<cargo.servlet.port>8082</cargo.servlet.port>
|
||||||
|
</properties>
|
||||||
|
</configuration>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</build>
|
</plugins>
|
||||||
|
|
||||||
<properties>
|
</build>
|
||||||
<!-- Spring -->
|
|
||||||
<org.springframework.version>3.2.3.RELEASE</org.springframework.version>
|
|
||||||
<org.springframework.security.version>3.1.4.RELEASE</org.springframework.security.version>
|
|
||||||
|
|
||||||
<!-- persistence -->
|
<properties>
|
||||||
<hibernate.version>4.2.2.Final</hibernate.version>
|
<!-- Spring -->
|
||||||
<mysql-connector-java.version>5.1.25</mysql-connector-java.version>
|
<org.springframework.version>3.2.3.RELEASE</org.springframework.version>
|
||||||
|
<org.springframework.security.version>3.1.4.RELEASE</org.springframework.security.version>
|
||||||
|
|
||||||
<!-- logging -->
|
<!-- persistence -->
|
||||||
<org.slf4j.version>1.7.5</org.slf4j.version>
|
<hibernate.version>4.2.2.Final</hibernate.version>
|
||||||
<logback.version>1.0.11</logback.version>
|
<mysql-connector-java.version>5.1.25</mysql-connector-java.version>
|
||||||
|
|
||||||
<!-- various -->
|
<!-- logging -->
|
||||||
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
|
<org.slf4j.version>1.7.5</org.slf4j.version>
|
||||||
|
<logback.version>1.0.11</logback.version>
|
||||||
|
|
||||||
<!-- util -->
|
<!-- various -->
|
||||||
<guava.version>14.0.1</guava.version>
|
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
|
||||||
<commons-lang3.version>3.1</commons-lang3.version>
|
|
||||||
|
|
||||||
<!-- testing -->
|
<!-- util -->
|
||||||
<org.hamcrest.version>1.3</org.hamcrest.version>
|
<guava.version>14.0.1</guava.version>
|
||||||
<junit.version>4.11</junit.version>
|
<commons-lang3.version>3.1</commons-lang3.version>
|
||||||
<mockito.version>1.9.5</mockito.version>
|
|
||||||
|
|
||||||
<httpcore.version>4.2.4</httpcore.version>
|
<!-- testing -->
|
||||||
<httpclient.version>4.2.5</httpclient.version>
|
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||||
|
<junit.version>4.11</junit.version>
|
||||||
|
<mockito.version>1.9.5</mockito.version>
|
||||||
|
|
||||||
<rest-assured.version>1.8.0</rest-assured.version>
|
<httpcore.version>4.2.4</httpcore.version>
|
||||||
<groovy.version>1.8.9</groovy.version>
|
<httpclient.version>4.2.5</httpclient.version>
|
||||||
|
|
||||||
<!-- Maven plugins -->
|
<rest-assured.version>1.8.0</rest-assured.version>
|
||||||
<cargo-maven2-plugin.version>1.4.2</cargo-maven2-plugin.version>
|
<groovy.version>1.8.9</groovy.version>
|
||||||
<maven-surefire-plugin.version>2.14.1</maven-surefire-plugin.version>
|
|
||||||
</properties>
|
<!-- Maven plugins -->
|
||||||
|
<cargo-maven2-plugin.version>1.4.2</cargo-maven2-plugin.version>
|
||||||
|
<maven-surefire-plugin.version>2.14.1</maven-surefire-plugin.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -1,10 +1,16 @@
|
||||||
package org.baeldung.spring;
|
package org.baeldung.spring;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@EnableWebMvc
|
||||||
@ComponentScan("org.baeldung.web")
|
@ComponentScan("org.baeldung.web")
|
||||||
public class WebConfig extends WebMvcConfigurerAdapter {
|
public class WebConfig extends WebMvcConfigurerAdapter {
|
||||||
|
|
||||||
|
@ -12,6 +18,14 @@ public class WebConfig extends WebMvcConfigurerAdapter {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
// API
|
// beans
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configureMessageConverters(final List<HttpMessageConverter<?>> converters) {
|
||||||
|
super.configureMessageConverters(converters);
|
||||||
|
converters.add(new MappingJackson2HttpMessageConverter());
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,6 +2,9 @@ package org.baeldung.web.dto;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
@XmlRootElement
|
||||||
public class Foo implements Serializable {
|
public class Foo implements Serializable {
|
||||||
|
|
||||||
public Foo() {
|
public Foo() {
|
||||||
|
|
|
@ -1,50 +1,52 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="
|
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
|
xsi:schemaLocation="
|
||||||
http://java.sun.com/xml/ns/javaee
|
http://java.sun.com/xml/ns/javaee
|
||||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
|
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
|
id="WebApp_ID" version="3.0">
|
||||||
|
|
||||||
<display-name>Spring MVC Application</display-name>
|
<display-name>Spring Security Custom Application</display-name>
|
||||||
|
|
||||||
<!-- Spring root -->
|
<!-- Spring root -->
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>contextClass</param-name>
|
<param-name>contextClass</param-name>
|
||||||
<param-value>
|
<param-value>
|
||||||
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
|
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
|
||||||
</param-value>
|
</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<param-value>org.baeldung.spring</param-value>
|
<param-value>org.baeldung.spring</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
<!-- Spring child -->
|
<!-- Spring child -->
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>api</servlet-name>
|
<servlet-name>api</servlet-name>
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||||
<load-on-startup>1</load-on-startup>
|
<load-on-startup>1</load-on-startup>
|
||||||
</servlet>
|
</servlet>
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>api</servlet-name>
|
<servlet-name>api</servlet-name>
|
||||||
<url-pattern>/api/*</url-pattern>
|
<url-pattern>/api/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- Spring Security -->
|
<!-- Spring Security -->
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>springSecurityFilterChain</filter-name>
|
<filter-name>springSecurityFilterChain</filter-name>
|
||||||
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
||||||
</filter>
|
</filter>
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>springSecurityFilterChain</filter-name>
|
<filter-name>springSecurityFilterChain</filter-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<!-- <welcome-file-list> -->
|
<welcome-file-list>
|
||||||
<!-- <welcome-file>index.html</welcome-file> -->
|
<welcome-file>index.html</welcome-file>
|
||||||
<!-- </welcome-file-list> -->
|
</welcome-file-list>
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
Loading…
Reference in New Issue