File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
1010### Relevant Articles:
1111- [ Spring MVC Tutorial] ( http://www.baeldung.com/spring-mvc-tutorial )
1212- [ Servlet Session Timeout] ( http://www.baeldung.com/servlet-session-timeout )
13- - [ Basic Forms with Spring MVC] ( http://www.baeldung.com/spring-mvc-form-tutorial )
1413- [ Returning Image/Media Data with Spring MVC] ( http://www.baeldung.com/spring-mvc-image-media-data )
1514- [ Geolocation by IP in Java] ( http://www.baeldung.com/geolocation-by-ip-with-maxmind )
1615- [ Guide to JavaServer Pages (JSP)] ( http://www.baeldung.com/jsp )
Original file line number Diff line number Diff line change 3737
3838 <!-- web -->
3939
40- <dependency >
41- <groupId >com.fasterxml.jackson.core</groupId >
42- <artifactId >jackson-databind</artifactId >
43- <version >2.9.2</version >
44- </dependency >
45-
46-
4740 <dependency >
4841 <groupId >javax.servlet</groupId >
4942 <artifactId >javax.servlet-api</artifactId >
127120 <properties >
128121 <!-- Spring -->
129122 <org .springframework.version>5.0.2.RELEASE</org .springframework.version>
130- <org .springframework.security.version>4.2.0.RELEASE</org .springframework.security.version>
131123
132124 <!-- persistence -->
133- <hibernate .version>5.2.5.Final</hibernate .version>
134125 <mysql-connector-java .version>5.1.40</mysql-connector-java .version>
135126
136127 <!-- http -->
137128 <httpcore .version>4.4.5</httpcore .version>
138129 <httpclient .version>4.5.2</httpclient .version>
139130
140131 <!-- various -->
141- <hibernate-validator .version>5.3.3 .Final</hibernate-validator .version>
132+ <hibernate-validator .version>6.0.10 .Final</hibernate-validator .version>
142133 <jstl .version>1.2</jstl .version>
143134 <javax .servlet.version>3.1.0</javax .servlet.version>
144- <jackson .version>2.8.5 </jackson .version>
135+ <jackson .version>2.9.6 </jackson .version>
145136
146137 <!-- util -->
147138 <guava .version>19.0</guava .version>
148139 <commons-lang3 .version>3.5</commons-lang3 .version>
149140 <commons-io .version>2.5</commons-io .version>
150141 <geoip2 .version>2.8.0</geoip2 .version>
151142
152- <!-- testing -->
153- <rest-assured .version>2.9.0</rest-assured .version>
154-
155143 <!-- Maven plugins -->
156144 <maven-war-plugin .version>2.6</maven-war-plugin .version>
157145 <cargo-maven2-plugin .version>1.6.1</cargo-maven2-plugin .version>
Original file line number Diff line number Diff line change 22
33import org .springframework .context .annotation .Configuration ;
44import org .springframework .context .annotation .ImportResource ;
5- import org .springframework .web .servlet .config .annotation .WebMvcConfigurerAdapter ;
5+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
66
77@ ImportResource ("classpath:webMvcConfig.xml" )
88@ Configuration
9- public class ClientWebConfig extends WebMvcConfigurerAdapter {
9+ public class ClientWebConfig implements WebMvcConfigurer {
1010
1111 public ClientWebConfig () {
1212 super ();
Original file line number Diff line number Diff line change 99import org .springframework .context .support .ResourceBundleMessageSource ;
1010import org .springframework .web .servlet .ViewResolver ;
1111import org .springframework .web .servlet .config .annotation .ViewControllerRegistry ;
12- import org .springframework .web .servlet .config .annotation .WebMvcConfigurerAdapter ;
12+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
1313import org .springframework .web .servlet .view .InternalResourceViewResolver ;
1414import org .springframework .web .servlet .view .JstlView ;
1515
1616//@EnableWebMvc
1717//@Configuration
18- public class ClientWebConfigJava extends WebMvcConfigurerAdapter {
18+ public class ClientWebConfigJava implements WebMvcConfigurer {
1919
2020 public ClientWebConfigJava () {
2121 super ();
@@ -38,8 +38,6 @@ public ResourceBundle getBeanResourceBundle() {
3838
3939 @ Override
4040 public void addViewControllers (final ViewControllerRegistry registry ) {
41- super .addViewControllers (registry );
42-
4341 registry .addViewController ("/sample.html" );
4442 }
4543
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1111import com .baeldung .spring .form .GeoIP ;
1212import com .baeldung .spring .service .RawDBDemoGeoIPLocationService ;
1313
14- @ Controller
14+ //@Controller
15+ //add db file and uncomment to see the working example
1516public class GeoIPTestController {
1617 private RawDBDemoGeoIPLocationService locationService ;
1718
Load diff This file was deleted.
Original file line number Diff line number Diff line change 22
33import java .util .List ;
44
5- import org .hibernate .validator .constraints .NotEmpty ;
5+ import javax .validation .constraints .NotEmpty ;
6+
67import org .springframework .web .multipart .MultipartFile ;
78
89public class Person {
Original file line number Diff line number Diff line change 44 xmlns:mvc=" http://www.springframework.org/schema/mvc"
55 xsi:schemaLocation="
66 http://www.springframework.org/schema/beans
7- http://www.springframework.org/schema/beans/spring-beans-4.3 .xsd
7+ http://www.springframework.org/schema/beans/spring-beans.xsd
88 http://www.springframework.org/schema/context
9- http://www.springframework.org/schema/context/spring-context-4.3 .xsd
9+ http://www.springframework.org/schema/context/spring-context.xsd
1010 http://www.springframework.org/schema/mvc
11- http://www.springframework.org/schema/mvc/spring-mvc-4.3 .xsd" >
11+ http://www.springframework.org/schema/mvc/spring-mvc.xsd" >
1212
1313 <mvc : annotation-driven content-negotiation-manager =" contentNegotiationManager" />
1414 <context : component-scan base-package =" com.baeldung.spring.controller" />
Original file line number Diff line number Diff line change 33 xmlns : mvc =" http://www.springframework.org/schema/mvc"
44 xsi : schemaLocation ="
55 http://www.springframework.org/schema/beans
6- http://www.springframework.org/schema/beans/spring-beans-4.3 .xsd
6+ http://www.springframework.org/schema/beans/spring-beans.xsd
77 http://www.springframework.org/schema/context
8- http://www.springframework.org/schema/context/spring-context-4.3 .xsd
8+ http://www.springframework.org/schema/context/spring-context.xsd
99 http://www.springframework.org/schema/mvc
10- http://www.springframework.org/schema/mvc/spring-mvc-4.3 .xsd"
10+ http://www.springframework.org/schema/mvc/spring-mvc.xsd"
1111>
1212
1313 <mvc : annotation-driven >
You can’t perform that action at this time.
0 commit comments