Clean up Spring MVC Form Tag Library example

This commit is contained in:
David Morley 2016-03-03 06:20:44 -06:00
parent 0385e78ff5
commit cf4cce751b
11 changed files with 15 additions and 15 deletions

View File

@ -1,6 +1,6 @@
<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>org.baeldung</groupId>
<groupId>com.baeldung</groupId>
<version>0.1-SNAPSHOT</version>
<artifactId>spring-mvc-xml</artifactId>

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.ViewResolver;

View File

@ -1,8 +1,8 @@
package org.baeldung.spring.controller;
package com.baeldung.spring.controller;
import javax.validation.Valid;
import org.baeldung.spring.form.Employee;
import com.baeldung.spring.form.Employee;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.controller;
package com.baeldung.spring.controller;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@ -7,8 +7,8 @@ import java.util.Map;
import javax.validation.Valid;
import org.baeldung.spring.form.Person;
import org.baeldung.spring.validator.PersonValidator;
import com.baeldung.spring.form.Person;
import com.baeldung.spring.validator.PersonValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.form;
package com.baeldung.spring.form;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.form;
package com.baeldung.spring.form;
import java.util.List;

View File

@ -1,6 +1,6 @@
package org.baeldung.spring.validator;
package com.baeldung.spring.validator;
import org.baeldung.spring.form.Person;
import com.baeldung.spring.form.Person;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;

View File

@ -12,7 +12,7 @@
<mvc:annotation-driven/>
<context:component-scan base-package="org.baeldung.spring.controller"/>
<context:component-scan base-package="com.baeldung.spring.controller"/>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/view/"/>

View File

@ -24,7 +24,7 @@
<h3>Welcome, Enter The Person Details</h3>
<form:form method="POST" action="/spring-mvc-xml/addPerson" modelAttribute="person" enctype="multipart/form-data">
<form:form method="POST" action="addPerson" modelAttribute="person" enctype="multipart/form-data">
<form:errors path="*" cssClass="errorbox" element="div" />

View File

@ -16,7 +16,7 @@
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>org.baeldung.spring</param-value>
<param-value>com.baeldung.spring</param-value>
</context-param>
<listener>