polishing
This commit is contained in:
parent
bef30a838c
commit
ef024db318
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -156,7 +156,7 @@ public class SqlMapClientTemplate extends JdbcAccessor implements SqlMapClientOp
|
||||||
Assert.notNull(action, "Callback object must not be null");
|
Assert.notNull(action, "Callback object must not be null");
|
||||||
Assert.notNull(this.sqlMapClient, "No SqlMapClient specified");
|
Assert.notNull(this.sqlMapClient, "No SqlMapClient specified");
|
||||||
|
|
||||||
// We always needs to use a SqlMapSession, as we need to pass a Spring-managed
|
// We always need to use a SqlMapSession, as we need to pass a Spring-managed
|
||||||
// Connection (potentially transactional) in. This shouldn't be necessary if
|
// Connection (potentially transactional) in. This shouldn't be necessary if
|
||||||
// we run against a TransactionAwareDataSourceProxy underneath, but unfortunately
|
// we run against a TransactionAwareDataSourceProxy underneath, but unfortunately
|
||||||
// we still need it to make iBATIS batch execution work properly: If iBATIS
|
// we still need it to make iBATIS batch execution work properly: If iBATIS
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package org.springframework.web.servlet.config;
|
package org.springframework.web.servlet.config;
|
||||||
|
|
||||||
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
import org.springframework.beans.factory.config.BeanDefinition;
|
import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||||
import org.springframework.beans.factory.parsing.BeanComponentDefinition;
|
import org.springframework.beans.factory.parsing.BeanComponentDefinition;
|
||||||
|
|
@ -38,7 +40,6 @@ import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
|
||||||
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
|
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
|
||||||
import org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter;
|
import org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter;
|
||||||
import org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping;
|
import org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping;
|
||||||
import org.w3c.dom.Element;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link BeanDefinitionParser} that parses the {@code annotation-driven} element to configure a Spring MVC web
|
* {@link BeanDefinitionParser} that parses the {@code annotation-driven} element to configure a Spring MVC web
|
||||||
|
|
@ -67,7 +68,7 @@ import org.w3c.dom.Element;
|
||||||
* @author Arjen Poutsma
|
* @author Arjen Poutsma
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
||||||
|
|
||||||
private static final boolean jsr303Present = ClassUtils.isPresent(
|
private static final boolean jsr303Present = ClassUtils.isPresent(
|
||||||
"javax.validation.Validator", AnnotationDrivenBeanDefinitionParser.class.getClassLoader());
|
"javax.validation.Validator", AnnotationDrivenBeanDefinitionParser.class.getClassLoader());
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
<xsd:documentation
|
<xsd:documentation
|
||||||
source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
|
source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
|
||||||
Configures the annotation-driven Spring MVC Controller programming model.
|
Configures the annotation-driven Spring MVC Controller programming model.
|
||||||
|
Note that, with Spring 3.0, this tag works in Servlet MVC only!
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
|
|
@ -53,7 +54,8 @@
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
The ordered set of interceptors that intercept HTTP Servlet Requests handled by Controllers.
|
The ordered set of interceptors that intercept HTTP Servlet Requests handled by Controllers.
|
||||||
Interceptors allow requests to be pre/post processed before/after handling.
|
Interceptors allow requests to be pre/post processed before/after handling.
|
||||||
Each inteceptor must implement the org.springframework.web.servlet.HandlerInterceptor or org.springframework.web.context.request.WebRequestInterceptor interface.
|
Each inteceptor must implement the org.springframework.web.servlet.HandlerInterceptor or
|
||||||
|
org.springframework.web.context.request.WebRequestInterceptor interface.
|
||||||
The interceptors in this set are automatically configured on each registered HandlerMapping.
|
The interceptors in this set are automatically configured on each registered HandlerMapping.
|
||||||
The URI paths each interceptor applies to are configurable.
|
The URI paths each interceptor applies to are configurable.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
|
|
@ -81,7 +83,7 @@
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
A path into the application intercepted by this interceptor.
|
A path into the application intercepted by this interceptor.
|
||||||
Exact path mapping URIås (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
|
Exact path mapping URIs (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:attribute>
|
</xsd:attribute>
|
||||||
|
|
@ -120,7 +122,8 @@
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
The name of the view to render. Optional.
|
The name of the view to render. Optional.
|
||||||
If not specified, the view name will be determined from the current HttpServletRequest by the DispatcherServlet's RequestToViewNameTranslator.
|
If not specified, the view name will be determined from the current HttpServletRequest
|
||||||
|
by the DispatcherServlet's RequestToViewNameTranslator.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:attribute>
|
</xsd:attribute>
|
||||||
|
|
|
||||||
|
|
@ -21,21 +21,18 @@ import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import junit.framework.AssertionFailedError;
|
import junit.framework.AssertionFailedError;
|
||||||
import junit.framework.TestCase;
|
|
||||||
import org.easymock.MockControl;
|
import org.easymock.MockControl;
|
||||||
import static org.easymock.EasyMock.*;
|
|
||||||
import org.junit.Test;
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.springframework.beans.TestBean;
|
import org.springframework.beans.TestBean;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.mock.web.MockHttpServletRequest;
|
import org.springframework.mock.web.MockHttpServletRequest;
|
||||||
import org.springframework.mock.web.MockHttpServletResponse;
|
import org.springframework.mock.web.MockHttpServletResponse;
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.web.servlet.View;
|
import org.springframework.web.servlet.View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue