Extract ProblemCollector interface
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.web.servlet.config;
|
||||
|
||||
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
|
||||
import org.springframework.beans.factory.parsing.ProblemCollector;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.context.config.AbstractFeatureSpecification;
|
||||
import org.springframework.context.config.FeatureSpecificationExecutor;
|
||||
@@ -243,7 +243,7 @@ public final class MvcAnnotationDriven extends AbstractFeatureSpecification {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doValidate(SimpleProblemCollector reporter) {
|
||||
protected void doValidate(ProblemCollector problems) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.web.servlet.config;
|
||||
|
||||
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
|
||||
import org.springframework.beans.factory.parsing.ProblemCollector;
|
||||
import org.springframework.context.config.AbstractFeatureSpecification;
|
||||
import org.springframework.context.config.FeatureSpecificationExecutor;
|
||||
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
|
||||
@@ -78,7 +78,7 @@ public class MvcDefaultServletHandler extends AbstractFeatureSpecification {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doValidate(SimpleProblemCollector reporter) {
|
||||
protected void doValidate(ProblemCollector problems) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.web.servlet.config;
|
||||
|
||||
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
|
||||
import org.springframework.beans.factory.parsing.ProblemCollector;
|
||||
import org.springframework.context.config.AbstractFeatureSpecification;
|
||||
import org.springframework.context.config.FeatureSpecificationExecutor;
|
||||
import org.springframework.core.Ordered;
|
||||
@@ -167,7 +167,7 @@ public final class MvcResources extends AbstractFeatureSpecification {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doValidate(SimpleProblemCollector problems) {
|
||||
protected void doValidate(ProblemCollector problems) {
|
||||
if (!StringUtils.hasText(mapping)) {
|
||||
problems.error("Mapping is required");
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
|
||||
import org.springframework.beans.factory.parsing.ProblemCollector;
|
||||
import org.springframework.context.config.AbstractFeatureSpecification;
|
||||
import org.springframework.context.config.FeatureSpecificationExecutor;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -72,7 +72,7 @@ public final class MvcViewControllers extends AbstractFeatureSpecification {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doValidate(SimpleProblemCollector problems) {
|
||||
protected void doValidate(ProblemCollector problems) {
|
||||
if (mappings.size() == 0) {
|
||||
problems.error("At least one ViewController must be defined");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user