Clean up Spring MVC Form Tag Library example
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.web.servlet.ViewResolver;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring.form;
|
||||
package com.baeldung.spring.form;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring.form;
|
||||
package com.baeldung.spring.form;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -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;
|
||||
@@ -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/"/>
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user