Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
efce7902
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
efce7902
编写于
9月 27, 2017
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
a4b2ae58
变更
43
隐藏空白更改
内联
并排
Showing
43 changed file
with
107 addition
and
98 deletion
+107
-98
spring-beans/src/main/java/org/springframework/beans/factory/parsing/ReaderContext.java
.../springframework/beans/factory/parsing/ReaderContext.java
+1
-1
spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java
...in/java/org/springframework/cache/jcache/JCacheCache.java
+1
-1
spring-context/src/main/java/org/springframework/cache/support/NoOpCache.java
...ain/java/org/springframework/cache/support/NoOpCache.java
+0
-1
spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java
...work/context/event/GenericApplicationListenerAdapter.java
+0
-1
spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java
.../springframework/jmx/export/naming/KeyNamingStrategy.java
+0
-1
spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java
...ringframework/validation/DefaultMessageCodesResolver.java
+2
-2
spring-core/src/main/java/org/springframework/core/io/VfsUtils.java
...e/src/main/java/org/springframework/core/io/VfsUtils.java
+1
-1
spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java
...work/expression/common/TemplateAwareExpressionParser.java
+2
-4
spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java
...pringframework/expression/spel/ast/FunctionReference.java
+1
-1
spring-expression/src/main/java/org/springframework/expression/spel/ast/NullLiteral.java
.../org/springframework/expression/spel/ast/NullLiteral.java
+1
-1
spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java
...org/springframework/expression/spel/ast/SpelNodeImpl.java
+4
-4
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java
...ork/expression/spel/support/ReflectiveMethodExecutor.java
+1
-0
spring-jms/src/test/java/org/springframework/jms/core/JmsMessagingTemplateTests.java
...g/springframework/jms/core/JmsMessagingTemplateTests.java
+1
-1
spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java
...ingframework/messaging/converter/ContentTypeResolver.java
+1
-2
spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodReturnValueHandler.java
...g/handler/invocation/HandlerMethodReturnValueHandler.java
+1
-1
spring-messaging/src/main/java/org/springframework/messaging/simp/config/ChannelRegistration.java
...gframework/messaging/simp/config/ChannelRegistration.java
+6
-2
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java
...rg/springframework/messaging/simp/stomp/StompSession.java
+2
-0
spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResult.java
...gframework/messaging/simp/user/UserDestinationResult.java
+1
-0
spring-oxm/spring-oxm.gradle
spring-oxm/spring-oxm.gradle
+1
-1
spring-test/src/main/java/org/springframework/test/context/transaction/TransactionContext.java
...ramework/test/context/transaction/TransactionContext.java
+9
-7
spring-web/src/main/java/org/springframework/http/ResponseEntity.java
...rc/main/java/org/springframework/http/ResponseEntity.java
+2
-1
spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java
...ework/http/client/InterceptingAsyncClientHttpRequest.java
+2
-2
spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java
...ccept/ServletPathExtensionContentNegotiationStrategy.java
+1
-1
spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java
...pringframework/web/context/request/ServletWebRequest.java
+4
-4
spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java
...org/springframework/web/filter/DelegatingFilterProxy.java
+1
-1
spring-web/src/main/java/org/springframework/web/method/annotation/SessionAttributesHandler.java
...ework/web/method/annotation/SessionAttributesHandler.java
+2
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java
...springframework/web/servlet/config/MvcNamespaceUtils.java
+1
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java
...eb/servlet/config/ViewControllerBeanDefinitionParser.java
+4
-4
spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java
...web/servlet/config/ViewResolversBeanDefinitionParser.java
+1
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java
...eb/servlet/config/annotation/InterceptorRegistration.java
+19
-14
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractNameValueExpression.java
...eb/servlet/mvc/condition/AbstractNameValueExpression.java
+1
-0
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ParamsRequestCondition.java
...ork/web/servlet/mvc/condition/ParamsRequestCondition.java
+2
-2
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java
...gframework/web/servlet/mvc/method/RequestMappingInfo.java
+15
-15
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpHeadersReturnValueHandler.java
.../mvc/method/annotation/HttpHeadersReturnValueHandler.java
+1
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
...t/mvc/method/annotation/RequestMappingHandlerAdapter.java
+3
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/Param.java
...main/java/org/springframework/web/servlet/tags/Param.java
+3
-3
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
...ain/java/org/springframework/web/servlet/tags/UrlTag.java
+0
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfig.java
...amework/web/servlet/view/freemarker/FreeMarkerConfig.java
+2
-2
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java
...method/annotation/HttpEntityMethodProcessorMockTests.java
+0
-1
spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java
.../annotation/WebMvcStompWebSocketEndpointRegistration.java
+1
-2
spring-websocket/src/main/java/org/springframework/web/socket/server/standard/ServletServerContainerFactoryBean.java
...et/server/standard/ServletServerContainerFactoryBean.java
+4
-4
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java
...ork/web/socket/sockjs/client/DefaultTransportRequest.java
+1
-3
src/docs/asciidoc/core/core-beans.adoc
src/docs/asciidoc/core/core-beans.adoc
+1
-1
未找到文件。
spring-beans/src/main/java/org/springframework/beans/factory/parsing/ReaderContext.java
浏览文件 @
efce7902
...
...
@@ -91,7 +91,7 @@ public class ReaderContext {
}
/**
* Raise a
fatal
error.
* Raise a
regular
error.
*/
public
void
error
(
String
message
,
@Nullable
Object
source
)
{
error
(
message
,
source
,
null
,
null
);
...
...
spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java
浏览文件 @
efce7902
/*
* Copyright 2002-201
5
the original author or authors.
* Copyright 2002-201
7
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.
...
...
spring-context/src/main/java/org/springframework/cache/support/NoOpCache.java
浏览文件 @
efce7902
...
...
@@ -46,7 +46,6 @@ public class NoOpCache implements Cache {
}
@Override
public
String
getName
()
{
return
this
.
name
;
...
...
spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java
浏览文件 @
efce7902
...
...
@@ -97,7 +97,6 @@ public class GenericApplicationListenerAdapter implements GenericApplicationList
ResolvableType
declaredEventType
=
resolveDeclaredEventType
(
listener
.
getClass
());
if
(
declaredEventType
==
null
||
declaredEventType
.
isAssignableFrom
(
ResolvableType
.
forClass
(
ApplicationEvent
.
class
)))
{
Class
<?>
targetClass
=
AopUtils
.
getTargetClass
(
listener
);
if
(
targetClass
!=
listener
.
getClass
())
{
declaredEventType
=
resolveDeclaredEventType
(
targetClass
);
...
...
spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java
浏览文件 @
efce7902
...
...
@@ -110,7 +110,6 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean
* Merges the {@code Properties} configured in the {@code mappings} and
* {@code mappingLocations} into the final {@code Properties} instance
* used for {@code ObjectName} resolution.
* @throws IOException
*/
@Override
public
void
afterPropertiesSet
()
throws
IOException
{
...
...
spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java
浏览文件 @
efce7902
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
7
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.
...
...
@@ -142,7 +142,7 @@ public class DefaultMessageCodesResolver implements MessageCodesResolver, Serial
* object/field-specific code, a field-specific code, a plain error code.
* <p>Arrays, Lists and Maps are resolved both for specific elements and
* the whole collection.
* <p>See the {@link DefaultMessageCodesResolver class level
J
avadoc} for
* <p>See the {@link DefaultMessageCodesResolver class level
j
avadoc} for
* details on the generated codes.
* @return the list of codes
*/
...
...
spring-core/src/main/java/org/springframework/core/io/VfsUtils.java
浏览文件 @
efce7902
...
...
@@ -91,7 +91,7 @@ public abstract class VfsUtils {
Class
<?>
visitorAttributesClass
=
loader
.
loadClass
(
VFS3_PKG
+
"VisitorAttributes"
);
VISITOR_ATTRIBUTES_FIELD_RECURSE
=
visitorAttributesClass
.
getField
(
"RECURSE"
);
}
catch
(
Exception
ex
)
{
catch
(
Throwable
ex
)
{
throw
new
IllegalStateException
(
"Could not detect JBoss VFS infrastructure"
,
ex
);
}
}
...
...
spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java
浏览文件 @
efce7902
...
...
@@ -90,6 +90,7 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser
String
prefix
=
context
.
getExpressionPrefix
();
String
suffix
=
context
.
getExpressionSuffix
();
int
startIdx
=
0
;
while
(
startIdx
<
expressionString
.
length
())
{
int
prefixIndex
=
expressionString
.
indexOf
(
prefix
,
startIdx
);
if
(
prefixIndex
>=
startIdx
)
{
...
...
@@ -104,22 +105,18 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser
"No ending suffix '"
+
suffix
+
"' for expression starting at character "
+
prefixIndex
+
": "
+
expressionString
.
substring
(
prefixIndex
));
}
if
(
suffixIndex
==
afterPrefixIndex
)
{
throw
new
ParseException
(
expressionString
,
prefixIndex
,
"No expression defined within delimiter '"
+
prefix
+
suffix
+
"' at character "
+
prefixIndex
);
}
String
expr
=
expressionString
.
substring
(
prefixIndex
+
prefix
.
length
(),
suffixIndex
);
expr
=
expr
.
trim
();
if
(
expr
.
isEmpty
())
{
throw
new
ParseException
(
expressionString
,
prefixIndex
,
"No expression defined within delimiter '"
+
prefix
+
suffix
+
"' at character "
+
prefixIndex
);
}
expressions
.
add
(
doParseExpression
(
expr
,
context
));
startIdx
=
suffixIndex
+
suffix
.
length
();
}
...
...
@@ -129,6 +126,7 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser
startIdx
=
expressionString
.
length
();
}
}
return
expressions
.
toArray
(
new
Expression
[
expressions
.
size
()]);
}
...
...
spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java
浏览文件 @
efce7902
...
...
@@ -62,7 +62,7 @@ public class FunctionReference extends SpelNodeImpl {
public
FunctionReference
(
String
functionName
,
int
pos
,
SpelNodeImpl
...
arguments
)
{
super
(
pos
,
arguments
);
super
(
pos
,
arguments
);
this
.
name
=
functionName
;
}
...
...
spring-expression/src/main/java/org/springframework/expression/spel/ast/NullLiteral.java
浏览文件 @
efce7902
/*
* Copyright 2002-201
4
the original author or authors.
* Copyright 2002-201
7
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.
...
...
spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java
浏览文件 @
efce7902
...
...
@@ -196,9 +196,9 @@ public abstract class SpelNodeImpl implements SpelNode, Opcodes {
/**
* Generate code that handles building the argument values for the specified method.
This method will take account
*
of whether the invoked method is a varargs method and if it is then the argument values will be appropriately
* packaged into an array.
* Generate code that handles building the argument values for the specified method.
*
This method will take account of whether the invoked method is a varargs method
*
and if it is then the argument values will be appropriately
packaged into an array.
* @param mv the method visitor where code should be generated
* @param cf the current codeflow
* @param member the method or constructor for which arguments are being setup
...
...
@@ -208,7 +208,7 @@ public abstract class SpelNodeImpl implements SpelNode, Opcodes {
String
[]
paramDescriptors
=
null
;
boolean
isVarargs
=
false
;
if
(
member
instanceof
Constructor
)
{
Constructor
<?>
ctor
=
(
Constructor
<?>)
member
;
Constructor
<?>
ctor
=
(
Constructor
<?>)
member
;
paramDescriptors
=
CodeFlow
.
toDescriptors
(
ctor
.
getParameterTypes
());
isVarargs
=
ctor
.
isVarArgs
();
}
...
...
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java
浏览文件 @
efce7902
...
...
@@ -59,6 +59,7 @@ public class ReflectiveMethodExecutor implements MethodExecutor {
}
}
public
Method
getMethod
()
{
return
this
.
method
;
}
...
...
spring-jms/src/test/java/org/springframework/jms/core/JmsMessagingTemplateTests.java
浏览文件 @
efce7902
...
...
@@ -56,7 +56,7 @@ import static org.mockito.BDDMockito.*;
/**
* Tests for {@link JmsMessagingTemplate}.
*
*
* @author Stephane Nicoll
*/
public
class
JmsMessagingTemplateTests
{
...
...
spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java
浏览文件 @
efce7902
...
...
@@ -34,8 +34,7 @@ public interface ContentTypeResolver {
* Determine the {@link MimeType} of a message from the given MessageHeaders.
* @param headers the headers to use for the resolution
* @return the resolved {@code MimeType}, or {@code null} if none found
* @throws org.springframework.util.InvalidMimeTypeException if the content type
* is a String that cannot be parsed
* @throws InvalidMimeTypeException if the content type is a String that cannot be parsed
* @throws IllegalArgumentException if there is a content type but its type is unknown
*/
@Nullable
...
...
spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodReturnValueHandler.java
浏览文件 @
efce7902
/*
* Copyright 2002-201
3
the original author or authors.
* Copyright 2002-201
7
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.
...
...
spring-messaging/src/main/java/org/springframework/messaging/simp/config/ChannelRegistration.java
浏览文件 @
efce7902
...
...
@@ -70,11 +70,15 @@ public class ChannelRegistration {
}
/**
* Configure interceptors for the message channel.
* @deprecated as of 4.3.12, in favor of {@link #interceptors(ChannelInterceptor...)}
*/
@Deprecated
public
ChannelRegistration
setInterceptors
(
ChannelInterceptor
...
interceptors
)
{
return
interceptors
(
interceptors
);
public
ChannelRegistration
setInterceptors
(
@Nullable
ChannelInterceptor
...
interceptors
)
{
if
(
interceptors
!=
null
)
{
this
.
interceptors
.
addAll
(
Arrays
.
asList
(
interceptors
));
}
return
this
;
}
...
...
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java
浏览文件 @
efce7902
...
...
@@ -148,6 +148,7 @@ public interface StompSession {
/**
* Return the headers used on the SUBSCRIBE frame.
* @since 5.0
*/
StompHeaders
getSubscriptionHeaders
();
...
...
@@ -160,6 +161,7 @@ public interface StompSession {
* Alternative to {@link #unsubscribe()} with additional custom headers
* to send to the server.
* <p><strong>Note:</strong> There is no need to set the subscription id.
* @since 5.0
*/
void
unsubscribe
(
@Nullable
StompHeaders
stompHeaders
);
}
...
...
spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResult.java
浏览文件 @
efce7902
...
...
@@ -102,4 +102,5 @@ public class UserDestinationResult {
return
"UserDestinationResult [source="
+
this
.
sourceDestination
+
", target="
+
this
.
targetDestinations
+
", subscribeDestination="
+
this
.
subscribeDestination
+
", user="
+
this
.
user
+
"]"
;
}
}
spring-oxm/spring-oxm.gradle
浏览文件 @
efce7902
...
...
@@ -2,8 +2,8 @@ description = "Spring Object/XML Marshalling"
configurations
{
castor
xjc
jibx
xjc
}
dependencies
{
...
...
spring-test/src/main/java/org/springframework/test/context/transaction/TransactionContext.java
浏览文件 @
efce7902
...
...
@@ -96,13 +96,15 @@ class TransactionContext {
void
startTransaction
()
{
Assert
.
state
(
this
.
transactionStatus
==
null
,
"Cannot start a new transaction without ending the existing transaction first."
);
this
.
flaggedForRollback
=
this
.
defaultRollback
;
this
.
transactionStatus
=
this
.
transactionManager
.
getTransaction
(
this
.
transactionDefinition
);
++
this
.
transactionsStarted
;
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
String
.
format
(
"Began transaction (%s) for test context %s; transaction manager [%s]; rollback [%s]"
,
this
.
transactionsStarted
,
this
.
testContext
,
this
.
transactionManager
,
flaggedForRollback
));
"Began transaction (%s) for test context %s; transaction manager [%s]; rollback [%s]"
,
this
.
transactionsStarted
,
this
.
testContext
,
this
.
transactionManager
,
flaggedForRollback
));
}
}
...
...
@@ -113,14 +115,14 @@ class TransactionContext {
void
endTransaction
()
{
if
(
logger
.
isTraceEnabled
())
{
logger
.
trace
(
String
.
format
(
"Ending transaction for test context %s; transaction status [%s]; rollback [%s]"
,
this
.
testContext
,
this
.
transactionStatus
,
flaggedForRollback
));
"Ending transaction for test context %s; transaction status [%s]; rollback [%s]"
,
this
.
testContext
,
this
.
transactionStatus
,
this
.
flaggedForRollback
));
}
Assert
.
state
(
this
.
transactionStatus
!=
null
,
()
->
String
.
format
(
"Failed to end transaction for test context %s: transaction does not exist."
,
this
.
testContext
));
try
{
if
(
flaggedForRollback
)
{
if
(
this
.
flaggedForRollback
)
{
this
.
transactionManager
.
rollback
(
this
.
transactionStatus
);
}
else
{
...
...
@@ -132,8 +134,8 @@ class TransactionContext {
}
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
String
.
format
(
"%s transaction for test context %s."
,
(
flaggedForRollback
?
"Rolled back"
:
"Committed"
),
this
.
testContext
));
logger
.
info
(
String
.
format
(
"%s transaction for test context %s."
,
(
this
.
flaggedForRollback
?
"Rolled back"
:
"Committed"
),
this
.
testContext
));
}
}
...
...
spring-web/src/main/java/org/springframework/http/ResponseEntity.java
浏览文件 @
efce7902
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
7
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.
...
...
@@ -51,6 +51,7 @@ import org.springframework.util.ObjectUtils;
* return new ResponseEntity<String>("Hello World", responseHeaders, HttpStatus.CREATED);
* }
* </pre>
*
* Or, by using a builder accessible via static methods:
* <pre class="code">
* @RequestMapping("/handle")
...
...
spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java
浏览文件 @
efce7902
...
...
@@ -106,12 +106,12 @@ class InterceptingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHtt
return
interceptor
.
intercept
(
request
,
body
,
this
);
}
else
{
URI
theU
ri
=
request
.
getURI
();
URI
u
ri
=
request
.
getURI
();
HttpMethod
method
=
request
.
getMethod
();
HttpHeaders
headers
=
request
.
getHeaders
();
Assert
.
state
(
method
!=
null
,
"No standard HTTP method"
);
AsyncClientHttpRequest
delegate
=
requestFactory
.
createAsyncRequest
(
theU
ri
,
method
);
AsyncClientHttpRequest
delegate
=
requestFactory
.
createAsyncRequest
(
u
ri
,
method
);
delegate
.
getHeaders
().
putAll
(
headers
);
if
(
body
.
length
>
0
)
{
StreamUtils
.
copy
(
body
,
delegate
.
getBody
());
...
...
spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java
浏览文件 @
efce7902
...
...
@@ -90,7 +90,7 @@ public class ServletPathExtensionContentNegotiationStrategy extends PathExtensio
* {@link PathExtensionContentNegotiationStrategy#getMediaTypeForResource}
* with the ability to also look up through the ServletContext.
* @param resource the resource to look up
* @return the MediaType for the extension
or {@code null}.
* @return the MediaType for the extension
, or {@code null} if none found
* @since 4.3
*/
@Override
...
...
spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java
浏览文件 @
efce7902
...
...
@@ -289,11 +289,11 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ
etag
=
padEtagIfNecessary
(
etag
);
while
(
ifNoneMatch
.
hasMoreElements
())
{
String
clientETags
=
ifNoneMatch
.
nextElement
();
Matcher
e
T
agMatcher
=
ETAG_HEADER_VALUE_PATTERN
.
matcher
(
clientETags
);
Matcher
e
t
agMatcher
=
ETAG_HEADER_VALUE_PATTERN
.
matcher
(
clientETags
);
// Compare weak/strong ETags as per https://tools.ietf.org/html/rfc7232#section-2.3
while
(
e
T
agMatcher
.
find
())
{
if
(
StringUtils
.
hasLength
(
e
T
agMatcher
.
group
())
&&
etag
.
replaceFirst
(
"^W/"
,
""
).
equals
(
e
T
agMatcher
.
group
(
3
)))
{
while
(
e
t
agMatcher
.
find
())
{
if
(
StringUtils
.
hasLength
(
e
t
agMatcher
.
group
())
&&
etag
.
replaceFirst
(
"^W/"
,
""
).
equals
(
e
t
agMatcher
.
group
(
3
)))
{
this
.
notModified
=
true
;
break
;
}
...
...
spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java
浏览文件 @
efce7902
...
...
@@ -162,7 +162,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
* @see #setEnvironment(org.springframework.core.env.Environment)
*/
public
DelegatingFilterProxy
(
String
targetBeanName
,
@Nullable
WebApplicationContext
wac
)
{
Assert
.
hasText
(
targetBeanName
,
"
t
arget Filter bean name must not be null or empty"
);
Assert
.
hasText
(
targetBeanName
,
"
T
arget Filter bean name must not be null or empty"
);
this
.
setTargetBeanName
(
targetBeanName
);
this
.
webApplicationContext
=
wac
;
if
(
wac
!=
null
)
{
...
...
spring-web/src/main/java/org/springframework/web/method/annotation/SessionAttributesHandler.java
浏览文件 @
efce7902
...
...
@@ -44,6 +44,7 @@ import org.springframework.web.context.request.WebRequest;
* {@link SessionStatus#setComplete()}.
*
* @author Rossen Stoyanchev
* @author Juergen Hoeller
* @since 3.1
*/
public
class
SessionAttributesHandler
{
...
...
@@ -154,7 +155,7 @@ public class SessionAttributesHandler {
* A pass-through call to the underlying {@link SessionAttributeStore}.
* @param request the current request
* @param attributeName the name of the attribute of interest
* @return the attribute value
or {@code null}
* @return the attribute value
, or {@code null} if none
*/
@Nullable
Object
retrieveAttribute
(
WebRequest
request
,
String
attributeName
)
{
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java
浏览文件 @
efce7902
...
...
@@ -189,7 +189,7 @@ abstract class MvcNamespaceUtils {
/**
* Find the {@code ContentNegotiationManager} bean created by or registered
* with the {@code annotation-driven} element.
* @return a bean definition, bean reference, or
null.
* @return a bean definition, bean reference, or
{@code null}
*/
@Nullable
public
static
Object
getContentNegotiationManager
(
ParserContext
context
)
{
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java
浏览文件 @
efce7902
...
...
@@ -37,9 +37,9 @@ import org.springframework.web.servlet.view.RedirectView;
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser} that
* parses the following MVC namespace elements:
* <ul>
*
<li>{@code <view-controller>}
*
<li>{@code <redirect-view-controller>}
*
<li>{@code <status-controller>}
*
<li>{@code <view-controller>}
*
<li>{@code <redirect-view-controller>}
*
<li>{@code <status-controller>}
* </ul>
*
* <p>All elements result in the registration of a
...
...
@@ -56,7 +56,7 @@ import org.springframework.web.servlet.view.RedirectView;
class
ViewControllerBeanDefinitionParser
implements
BeanDefinitionParser
{
private
static
final
String
HANDLER_MAPPING_BEAN_NAME
=
"org.springframework.web.servlet.config.viewControllerHandlerMapping"
;
"org.springframework.web.servlet.config.viewControllerHandlerMapping"
;
@Override
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java
浏览文件 @
efce7902
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
7
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.
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java
浏览文件 @
efce7902
...
...
@@ -42,11 +42,11 @@ public class InterceptorRegistration {
private
final
List
<
String
>
excludePatterns
=
new
ArrayList
<>();
private
int
order
=
0
;
@Nullable
private
PathMatcher
pathMatcher
;
private
int
order
=
0
;
/**
* Creates an {@link InterceptorRegistration} instance.
...
...
@@ -72,18 +72,6 @@ public class InterceptorRegistration {
return
this
;
}
/**
* An order position to be used, default is 0.
*/
public
InterceptorRegistration
order
(
int
order
){
this
.
order
=
order
;
return
this
;
}
protected
int
getOrder
()
{
return
this
.
order
;
}
/**
* A PathMatcher implementation to use with this interceptor. This is an optional,
* advanced property required only if using custom PathMatcher implementations
...
...
@@ -95,6 +83,23 @@ public class InterceptorRegistration {
return
this
;
}
/**
* Specify an order position to be used. Default is 0.
* @since 5.0
*/
public
InterceptorRegistration
order
(
int
order
){
this
.
order
=
order
;
return
this
;
}
/**
* Return the order position to be used.
* @since 5.0
*/
protected
int
getOrder
()
{
return
this
.
order
;
}
/**
* Returns the underlying interceptor. If URL patterns are provided the returned type is
* {@link MappedInterceptor}; otherwise {@link HandlerInterceptor}.
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractNameValueExpression.java
浏览文件 @
efce7902
...
...
@@ -134,4 +134,5 @@ abstract class AbstractNameValueExpression<T> implements NameValueExpression<T>
}
return
builder
.
toString
();
}
}
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ParamsRequestCondition.java
浏览文件 @
efce7902
...
...
@@ -144,8 +144,8 @@ public final class ParamsRequestCondition extends AbstractRequestCondition<Param
@Override
protected
boolean
matchName
(
HttpServletRequest
request
)
{
return
WebUtils
.
hasSubmitParameter
(
request
,
this
.
name
)
||
request
.
getParameterMap
().
containsKey
(
this
.
name
);
return
(
WebUtils
.
hasSubmitParameter
(
request
,
this
.
name
)
||
request
.
getParameterMap
().
containsKey
(
this
.
name
)
)
;
}
@Override
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java
浏览文件 @
efce7902
...
...
@@ -113,55 +113,55 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
}
/**
* Return
s
the URL patterns of this {@link RequestMappingInfo};
* or instance with 0 patterns
, never {@code null}
.
* Return the URL patterns of this {@link RequestMappingInfo};
* or instance with 0 patterns
(never {@code null})
.
*/
public
PatternsRequestCondition
getPatternsCondition
()
{
return
this
.
patternsCondition
;
}
/**
* Return
s
the HTTP request methods of this {@link RequestMappingInfo};
* or instance with 0 request methods
, never {@code null}
.
* Return the HTTP request methods of this {@link RequestMappingInfo};
* or instance with 0 request methods
(never {@code null})
.
*/
public
RequestMethodsRequestCondition
getMethodsCondition
()
{
return
this
.
methodsCondition
;
}
/**
* Return
s
the "parameters" condition of this {@link RequestMappingInfo};
* or instance with 0 parameter expressions
, never {@code null}
.
* Return the "parameters" condition of this {@link RequestMappingInfo};
* or instance with 0 parameter expressions
(never {@code null})
.
*/
public
ParamsRequestCondition
getParamsCondition
()
{
return
this
.
paramsCondition
;
}
/**
* Return
s
the "headers" condition of this {@link RequestMappingInfo};
* or instance with 0 header expressions
, never {@code null}
.
* Return the "headers" condition of this {@link RequestMappingInfo};
* or instance with 0 header expressions
(never {@code null})
.
*/
public
HeadersRequestCondition
getHeadersCondition
()
{
return
this
.
headersCondition
;
}
/**
* Return
s
the "consumes" condition of this {@link RequestMappingInfo};
* or instance with 0 consumes expressions
, never {@code null}
.
* Return the "consumes" condition of this {@link RequestMappingInfo};
* or instance with 0 consumes expressions
(never {@code null})
.
*/
public
ConsumesRequestCondition
getConsumesCondition
()
{
return
this
.
consumesCondition
;
}
/**
* Return
s
the "produces" condition of this {@link RequestMappingInfo};
* or instance with 0 produces expressions
, never {@code null}
.
* Return the "produces" condition of this {@link RequestMappingInfo};
* or instance with 0 produces expressions
(never {@code null})
.
*/
public
ProducesRequestCondition
getProducesCondition
()
{
return
this
.
producesCondition
;
}
/**
* Return
s the "custom" condition of this {@link RequestMappingInfo};
or {@code null}.
* Return
the "custom" condition of this {@link RequestMappingInfo},
or {@code null}.
*/
@Nullable
public
RequestCondition
<?>
getCustomCondition
()
{
...
...
@@ -170,7 +170,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
/**
* Combine
s
"this" request mapping info (i.e. the current instance) with another request mapping info instance.
* Combine "this" request mapping info (i.e. the current instance) with another request mapping info instance.
* <p>Example: combine type- and method-level request mappings.
* @return a new request mapping info instance; never {@code null}
*/
...
...
@@ -199,7 +199,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
return
this
.
name
;
}
else
{
return
(
other
.
name
!=
null
?
other
.
name
:
null
)
;
return
other
.
name
;
}
}
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpHeadersReturnValueHandler.java
浏览文件 @
efce7902
...
...
@@ -55,7 +55,7 @@ public class HttpHeadersReturnValueHandler implements HandlerMethodReturnValueHa
Assert
.
state
(
servletResponse
!=
null
,
"No HttpServletResponse"
);
ServletServerHttpResponse
outputMessage
=
new
ServletServerHttpResponse
(
servletResponse
);
outputMessage
.
getHeaders
().
putAll
(
headers
);
outputMessage
.
getBody
();
// flush headers
outputMessage
.
getBody
();
// flush headers
}
}
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
浏览文件 @
efce7902
...
...
@@ -250,7 +250,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
*/
@Nullable
public
List
<
HandlerMethodArgumentResolver
>
getInitBinderArgumentResolvers
()
{
return
(
this
.
initBinderArgumentResolvers
!=
null
)
?
this
.
initBinderArgumentResolvers
.
getResolvers
()
:
null
;
return
(
this
.
initBinderArgumentResolvers
!=
null
?
this
.
initBinderArgumentResolvers
.
getResolvers
()
:
null
)
;
}
/**
...
...
@@ -427,6 +427,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
/**
* Configure the registry for reactive library types to be supported as
* return values from controller methods.
* @since 5.0
*/
public
void
setReactiveRegistry
(
ReactiveAdapterRegistry
reactiveRegistry
)
{
Assert
.
notNull
(
reactiveRegistry
,
"ReactiveAdapterRegistry is required"
);
...
...
@@ -435,6 +436,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
/**
* Return the configured reactive type registry of adapters.
* @since 5.0
*/
public
ReactiveAdapterRegistry
getReactiveAdapterRegistry
()
{
return
this
.
reactiveRegistry
;
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/Param.java
浏览文件 @
efce7902
...
...
@@ -39,7 +39,7 @@ public class Param {
/**
* Set the raw name of the parameter
* Set the raw name of the parameter
.
*/
public
void
setName
(
@Nullable
String
name
)
{
this
.
name
=
name
;
...
...
@@ -54,14 +54,14 @@ public class Param {
}
/**
* Set the raw value of the parameter
* Set the raw value of the parameter
.
*/
public
void
setValue
(
@Nullable
String
value
)
{
this
.
value
=
value
;
}
/**
* Return the raw parameter value
* Return the raw parameter value
.
*/
@Nullable
public
String
getValue
()
{
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
浏览文件 @
efce7902
...
...
@@ -203,7 +203,6 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware {
/**
* Build the URL for the tag from the tag attributes and parameters.
* @return the URL value as a String
* @throws JspException
*/
String
createUrl
()
throws
JspException
{
Assert
.
state
(
this
.
value
!=
null
,
"No value set"
);
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfig.java
浏览文件 @
efce7902
/*
* Copyright 2002-20
09
the original author or authors.
* Copyright 2002-20
17
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.
...
...
@@ -33,7 +33,7 @@ import freemarker.template.Configuration;
public
interface
FreeMarkerConfig
{
/**
* Return the FreeMarker
Configuration
object for the current
* Return the FreeMarker
{@link Configuration}
object for the current
* web application context.
* <p>A FreeMarker Configuration object may be used to set FreeMarker
* properties and shared objects, and allows to retrieve templates.
...
...
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java
浏览文件 @
efce7902
...
...
@@ -115,7 +115,6 @@ public class HttpEntityMethodProcessorMockTests {
@Before
@SuppressWarnings
(
"unchecked"
)
public
void
setup
()
throws
Exception
{
stringHttpMessageConverter
=
mock
(
HttpMessageConverter
.
class
);
given
(
stringHttpMessageConverter
.
getSupportedMediaTypes
()).
willReturn
(
Collections
.
singletonList
(
MediaType
.
TEXT_PLAIN
));
resourceMessageConverter
=
mock
(
HttpMessageConverter
.
class
);
...
...
spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java
浏览文件 @
efce7902
...
...
@@ -110,8 +110,7 @@ public class WebMvcStompWebSocketEndpointRegistration implements StompWebSocketE
this
.
registration
.
setTransportHandlerOverrides
(
handler
);
}
if
(!
this
.
allowedOrigins
.
isEmpty
())
{
this
.
registration
.
setAllowedOrigins
(
this
.
allowedOrigins
.
toArray
(
new
String
[
this
.
allowedOrigins
.
size
()]));
this
.
registration
.
setAllowedOrigins
(
this
.
allowedOrigins
.
toArray
(
new
String
[
this
.
allowedOrigins
.
size
()]));
}
return
this
.
registration
;
}
...
...
spring-websocket/src/main/java/org/springframework/web/socket/server/standard/ServletServerContainerFactoryBean.java
浏览文件 @
efce7902
...
...
@@ -66,7 +66,7 @@ public class ServletServerContainerFactoryBean
private
ServerContainer
serverContainer
;
public
void
setAsyncSendTimeout
(
l
ong
timeoutInMillis
)
{
public
void
setAsyncSendTimeout
(
L
ong
timeoutInMillis
)
{
this
.
asyncSendTimeout
=
timeoutInMillis
;
}
...
...
@@ -75,7 +75,7 @@ public class ServletServerContainerFactoryBean
return
this
.
asyncSendTimeout
;
}
public
void
setMaxSessionIdleTimeout
(
l
ong
timeoutInMillis
)
{
public
void
setMaxSessionIdleTimeout
(
L
ong
timeoutInMillis
)
{
this
.
maxSessionIdleTimeout
=
timeoutInMillis
;
}
...
...
@@ -84,7 +84,7 @@ public class ServletServerContainerFactoryBean
return
this
.
maxSessionIdleTimeout
;
}
public
void
setMaxTextMessageBufferSize
(
int
bufferSize
)
{
public
void
setMaxTextMessageBufferSize
(
Integer
bufferSize
)
{
this
.
maxTextMessageBufferSize
=
bufferSize
;
}
...
...
@@ -93,7 +93,7 @@ public class ServletServerContainerFactoryBean
return
this
.
maxTextMessageBufferSize
;
}
public
void
setMaxBinaryMessageBufferSize
(
int
bufferSize
)
{
public
void
setMaxBinaryMessageBufferSize
(
Integer
bufferSize
)
{
this
.
maxBinaryMessageBufferSize
=
bufferSize
;
}
...
...
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java
浏览文件 @
efce7902
...
...
@@ -226,9 +226,7 @@ class DefaultTransportRequest implements TransportRequest {
fallbackRequest
.
connect
(
this
.
handler
,
this
.
future
);
}
else
{
if
(
logger
.
isErrorEnabled
())
{
logger
.
error
(
"No more fallback transports after "
+
DefaultTransportRequest
.
this
,
ex
);
}
logger
.
error
(
"No more fallback transports after "
+
DefaultTransportRequest
.
this
,
ex
);
if
(
ex
!=
null
)
{
this
.
future
.
setException
(
ex
);
}
...
...
src/docs/asciidoc/core/core-beans.adoc
浏览文件 @
efce7902
...
...
@@ -7951,7 +7951,7 @@ Alternatively for XML configuration use the `context:load-time-weaver` element:
Once configured for the `ApplicationContext`. Any bean within that `ApplicationContext`
may implement `LoadTimeWeaverAware`, thereby receiving a reference to the load-time
weaver instance. This is particularly useful in combination with
<<data-acess.adoc#orm-jpa,Spring'
s
JPA
support
>>
where
load
-
time
weaving
may
be
necessary
<<data-ac
c
ess.adoc#orm-jpa,Spring'
s
JPA
support
>>
where
load
-
time
weaving
may
be
necessary
for
JPA
class
transformation
.
Consult
the
`
LocalContainerEntityManagerFactoryBean
`
javadocs
for
more
detail
.
For
more
on
AspectJ
load
-
time
weaving
,
see
<<
aop
-
aj
-
ltw
>>.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录