Skip to content

Commit fd416a0

Browse files
author
eugenp
committed
maven work
1 parent 4f6e4f3 commit fd416a0

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

‎spring-mvc-no-xml/pom.xml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@
8181

8282
<plugins>
8383

84+
<plugin>
85+
<groupId>org.apache.maven.plugins</groupId>
86+
<artifactId>maven-war-plugin</artifactId>
87+
<version>${maven-war-plugin.version}</version>
88+
<configuration>
89+
<failonmissingwebxml>false</failonmissingwebxml>
90+
</configuration>
91+
</plugin>
92+
8493
<plugin>
8594
<groupId>org.apache.maven.plugins</groupId>
8695
<artifactId>maven-surefire-plugin</artifactId>
@@ -118,9 +127,10 @@
118127
<rest-assured.version>1.8.1</rest-assured.version>
119128
<groovy.version>1.8.9</groovy.version>
120129

121-
<!-- Maven plugins -->
122-
<cargo-maven2-plugin.version>1.4.3</cargo-maven2-plugin.version>
123-
<maven-surefire-plugin.version>2.15</maven-surefire-plugin.version>
130+
<!-- Maven plugins -->
131+
<cargo-maven2-plugin.version>1.4.3</cargo-maven2-plugin.version>
132+
<maven-surefire-plugin.version>2.15</maven-surefire-plugin.version>
133+
<maven-war-plugin.version>2.4</maven-war-plugin.version>
124134
</properties>
125135

126136
</project>

‎spring-mvc-no-xml/src/main/java/org/baeldung/servlet/WebAppNew.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.baeldung.servlet;
22

3+
import javax.servlet.ServletRegistration.Dynamic;
4+
35
import org.baeldung.spring.ClientWebConfig;
46
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
57

@@ -32,4 +34,9 @@ protected String[] getServletMappings() {
3234
return new String[] { "/" };
3335
}
3436

37+
@Override
38+
protected void customizeRegistration(final Dynamic registration) {
39+
super.customizeRegistration(registration);
40+
}
41+
3542
}

‎spring-mvc-xml/src/main/webapp/WEB-INF/web.xml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<listener>
2424
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
2525
</listener>
26-
26+
2727
<!-- Spring child -->
2828
<servlet>
2929
<servlet-name>mvc</servlet-name>
@@ -36,7 +36,11 @@
3636
</servlet-mapping>
3737

3838
<!-- additional config -->
39-
39+
40+
<session-config>
41+
<session-timeout>10</session-timeout>
42+
</session-config>
43+
4044
<welcome-file-list>
4145
<welcome-file>index.html</welcome-file>
4246
</welcome-file-list>

0 commit comments

Comments
 (0)