diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java index 99eb2fa6f5..fa6cc80a1f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,12 +61,12 @@ public class AopNamespaceHandler extends NamespaceHandlerSupport { */ @Override public void init() { - // In 2.0 XSD as well as in 2.1 XSD. + // In 2.0 XSD as well as in 2.5+ XSDs registerBeanDefinitionParser("config", new ConfigBeanDefinitionParser()); registerBeanDefinitionParser("aspectj-autoproxy", new AspectJAutoProxyBeanDefinitionParser()); registerBeanDefinitionDecorator("scoped-proxy", new ScopedProxyBeanDefinitionDecorator()); - // Only in 2.0 XSD: moved to context namespace as of 2.1 + // Only in 2.0 XSD: moved to context namespace in 2.5+ registerBeanDefinitionParser("spring-configured", new SpringConfiguredBeanDefinitionParser()); } diff --git a/spring-web/src/main/java/org/springframework/web/util/DefaultUriBuilderFactory.java b/spring-web/src/main/java/org/springframework/web/util/DefaultUriBuilderFactory.java index 428b8e5bad..8f2822bc65 100644 --- a/spring-web/src/main/java/org/springframework/web/util/DefaultUriBuilderFactory.java +++ b/spring-web/src/main/java/org/springframework/web/util/DefaultUriBuilderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,55 +39,6 @@ import org.springframework.util.StringUtils; */ public class DefaultUriBuilderFactory implements UriBuilderFactory { - /** - * Enum to represent multiple URI encoding strategies. - * @see #setEncodingMode - */ - public enum EncodingMode { - - /** - * Pre-encode the URI template first, then strictly encode URI variables - * when expanded, with the following rules: - *
For most cases, this mode is most likely to give the expected
- * result because in treats URI variables as opaque data to be fully
- * encoded, while {@link #URI_COMPONENT} by comparison is useful only
- * if intentionally expanding URI variables with reserved characters.
- * @since 5.0.8
- * @see UriComponentsBuilder#encode()
- */
- TEMPLATE_AND_VALUES,
-
- /**
- * Does not encode the URI template and instead applies strict encoding
- * to URI variables via {@link UriUtils#encodeUriVariables} prior to
- * expanding them into the template.
- * @see UriUtils#encodeUriVariables(Object...)
- * @see UriUtils#encodeUriVariables(Map)
- */
- VALUES_ONLY,
-
- /**
- * Expand URI variables first, and then encode the resulting URI
- * component values, replacing only non-ASCII and illegal
- * (within a given URI component type) characters, but not characters
- * with reserved meaning.
- * @see UriComponents#encode()
- */
- URI_COMPONENT,
-
- /**
- * No encoding should be applied.
- */
- NONE
- }
-
-
@Nullable
private final UriComponentsBuilder baseUri;
@@ -194,16 +145,19 @@ public class DefaultUriBuilderFactory implements UriBuilderFactory {
// UriTemplateHandler
+ @Override
public URI expand(String uriTemplate, Map For most cases, this mode is most likely to give the expected
+ * result because in treats URI variables as opaque data to be fully
+ * encoded, while {@link #URI_COMPONENT} by comparison is useful only
+ * if intentionally expanding URI variables with reserved characters.
+ * @since 5.0.8
+ * @see UriComponentsBuilder#encode()
+ */
+ TEMPLATE_AND_VALUES,
+
+ /**
+ * Does not encode the URI template and instead applies strict encoding
+ * to URI variables via {@link UriUtils#encodeUriVariables} prior to
+ * expanding them into the template.
+ * @see UriUtils#encodeUriVariables(Object...)
+ * @see UriUtils#encodeUriVariables(Map)
+ */
+ VALUES_ONLY,
+
+ /**
+ * Expand URI variables first, and then encode the resulting URI
+ * component values, replacing only non-ASCII and illegal
+ * (within a given URI component type) characters, but not characters
+ * with reserved meaning.
+ * @see UriComponents#encode()
+ */
+ URI_COMPONENT,
+
+ /**
+ * No encoding should be applied.
+ */
+ NONE
+ }
+
+
/**
* {@link DefaultUriBuilderFactory} specific implementation of UriBuilder.
*/
diff --git a/spring-web/src/main/java/org/springframework/web/util/UriBuilderFactory.java b/spring-web/src/main/java/org/springframework/web/util/UriBuilderFactory.java
index c1d7698123..ddd5f5dd83 100644
--- a/spring-web/src/main/java/org/springframework/web/util/UriBuilderFactory.java
+++ b/spring-web/src/main/java/org/springframework/web/util/UriBuilderFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.web.util;
/**
@@ -22,13 +23,14 @@ package org.springframework.web.util;
*
* @author Rossen Stoyanchev
* @since 5.0
+ * @see DefaultUriBuilderFactory
*/
public interface UriBuilderFactory extends UriTemplateHandler {
/**
* Initialize a builder with the given URI template.
* @param uriTemplate the URI template to use
- * @return the URI builder instance
+ * @return the builder instance
*/
UriBuilder uriString(String uriTemplate);
diff --git a/src/docs/asciidoc/core/core-aop.adoc b/src/docs/asciidoc/core/core-aop.adoc
index e95011de58..ebefe137da 100644
--- a/src/docs/asciidoc/core/core-aop.adoc
+++ b/src/docs/asciidoc/core/core-aop.adoc
@@ -1403,8 +1403,8 @@ In many cases, you do this binding anyway (as in the preceding example).
What happens when multiple pieces of advice all want to run at the same join point?
Spring AOP follows the same precedence rules as AspectJ to determine the order of advice
-execution. The highest precedence advice runs first "`on the way in`" (so, given two pieces
-of before advice, the one with highest precedence runs first). "`On the way out`" from a
+execution. The highest precedence advice runs first "on the way in" (so, given two pieces
+of before advice, the one with highest precedence runs first). "On the way out" from a
join point, the highest precedence advice runs last (so, given two pieces of after
advice, the one with the highest precedence will run second).
@@ -1412,7 +1412,7 @@ When two pieces of advice defined in different aspects both need to run at the s
join point, unless you specify otherwise, the order of execution is undefined. You can
control the order of execution by specifying precedence. This is done in the normal
Spring way by either implementing the `org.springframework.core.Ordered` interface in
-the aspect class or annotating it with the `Order` annotation. Given two aspects, the
+the aspect class or annotating it with the `@Order` annotation. Given two aspects, the
aspect returning the lower value from `Ordered.getValue()` (or the annotation value) has
the higher precedence.
@@ -1643,9 +1643,9 @@ expression so that only `@Idempotent` operations match, as follows:
== Schema-based AOP Support
If you prefer an XML-based format, Spring also offers support for defining aspects
-using the new `aop` namespace tags. The exact same pointcut expressions and advice kinds
+using the `aop` namespace tags. The exact same pointcut expressions and advice kinds
as when using the @AspectJ style are supported. Hence, in this section we focus on
-the new syntax and refer the reader to the discussion in the previous section
+that syntax and refer the reader to the discussion in the previous section
(<
+ *
+ * @see #setEncodingMode
+ */
+ public enum EncodingMode {
+
+ /**
+ * Pre-encode the URI template first, then strictly encode URI variables
+ * when expanded, with the following rules:
+ *
+ *
+ *