Commit Graph

2009 Commits

Author SHA1 Message Date
Rossen Stoyanchev
4252b7fd7d @ExceptionHandler support for non-@Controller handlers
Closes gh-22619
2020-07-27 21:20:50 +03:00
Sam Brannen
335c3d5db6 Polish contribution
See gh-25445
2020-07-22 17:26:59 +02:00
XenoAmess
ab859fcc96 Refine use of substring operations
Closes gh-25445
2020-07-22 17:26:42 +02:00
Sam Brannen
a8901e3cf8 Polish contribution
See gh-25445
2020-07-22 16:36:14 +02:00
XenoAmess
edfc6c0293 Refine use of substring operations
Closes gh-25445
2020-07-22 16:28:58 +02:00
XenoAmess
c7f44ff671 Fix links in Javadoc
Closes gh-25448
2020-07-22 10:24:55 +02:00
May
24b1caf434 Simplify PathResourceLookupFunction
This commit simplified two return statements.
2020-07-20 11:04:32 +02:00
Juergen Hoeller
e0d05153aa Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-07-17 19:30:03 +02:00
Juergen Hoeller
0b697a3068 Polishing 2020-07-17 19:24:23 +02:00
Juergen Hoeller
198d64d539 Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-07-17 17:52:08 +02:00
Juergen Hoeller
e9898f7d52 Polishing 2020-07-17 17:48:33 +02:00
Rossen Stoyanchev
1dec4f3d0f DefaultServerRequest parses the path if necessary
Closes gh-25353
2020-07-13 13:16:49 +03:00
Rossen Stoyanchev
37366e0c91 Support for custom status in ResponseStatusException
Closes gh-20336
2020-07-09 15:06:33 +03:00
Rossen Stoyanchev
4d7418841c AbstractHandlerMethodMapping refactoring
Remove convenience Map that is to avoid. The only downside is that
getHandlerMethods requires a transformation but that should not be used frequently.

See gh-22961
2020-07-09 12:11:15 +03:00
Rossen Stoyanchev
0584c289ab Support for direct path lookups in WebFlux
Closes gh-22961
2020-07-09 11:26:04 +03:00
Rossen Stoyanchev
0e4e25d227 Updates to CORS patterns contribution
Closes gh-25016
2020-07-08 13:18:46 +03:00
Rossen Stoyanchev
1181bb1852 Rename originsPattern to originPatterns
See gh-25016
2020-07-08 13:18:46 +03:00
Ruslan Akhundov
8632118e8d CorsConfiguration now supports pattern based origins.
Closes gh-24763
2020-07-08 13:18:46 +03:00
Rossen Stoyanchev
34607d96f1 PathPattern caching with HandlerMappingIntrospector
This commit evolves the solution from M1 by parsing and caching patterns with the
target HandlerMapping's PathPatternParser. This makes it unnecessary for callers to
be aware of pattern parsing.

Closes gh-25312
2020-07-06 15:31:35 +03:00
Arjen Poutsma
20254f02d2 Polishing 2020-06-30 11:33:12 +02:00
Arjen Poutsma
e9d9de5f99 RouterFunction honors PathPatternParser in config
This commit introduces a way to change the PathPatternParser used in
PathPredicates, by way of a ChangePathPatternParserVisitor. This
visitor is used by both WebFluxConfigurationSupport and
WebMvcConfigurationSupport to make sure the configured parser is used.

Closes gh-23236
2020-06-30 11:33:12 +02:00
Sam Brannen
b33d2fe683 Clean up warnings in Gradle build, polishing, etc. 2020-06-24 15:02:24 +02:00
May
bc9b9bc477 Replace cascading if statements with switch statement
Closes gh-25308
2020-06-24 13:54:17 +02:00
Rossen Stoyanchev
57f868fcbd Direct matches by URL path work again
This commit fixes a recent regression as a result of 5225a57411
with the determination of non-pattern vs pattern URLs. That in turn affects the ability to perform
direct matches by URL path.

There is also a fix in PathPattern to recognize "catch-all" patterns as pattern syntax.

See gh-24945
2020-06-24 08:07:40 +01:00
Rossen Stoyanchev
22bf62def1 Replace remaining use of deprecated Processors in tests
See gh-25085
2020-06-23 20:29:35 +01:00
Juergen Hoeller
d0209e5f1f Nullability refinements and related polishing 2020-06-23 16:55:09 +02:00
Rossen Stoyanchev
837dfe285a Set PathPatternParser in RouterFunctionMapping
See gh-24945
2020-06-23 15:18:25 +01:00
Sam Brannen
9d5881e0ad Suppress warnings, remove unused code, etc. 2020-06-20 17:15:35 +02:00
Rossen Stoyanchev
b1da89344f MatchableHandlerMapping is backwards compatible 2020-06-19 22:01:51 +01:00
Sébastien Deleuze
1e501f2583 Provide a flag to disable XML support
This commit introduces a spring.xml.ignore system property
which when set to true avoid initializing XML infrastructure.

A typical use case is optimizing GraalVM native image footprint
for applications not using XML. In order to be effective, those
classes should be initialized at build time:

- org.springframework.util.DefaultPropertiesPersister
- org.springframework.core.io.support.PropertiesLoaderUtils
- org.springframework.web.servlet.function.support.RouterFunctionMapping
- org.springframework.web.client.RestTemplate
- org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver
- org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
- org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
- org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter
- org.springframework.http.codec.support.BaseDefaultCodecs
- org.springframework.beans.PropertyEditorRegistrySupport

Closes gh-25151
2020-06-19 09:42:12 +02:00
Marten Deinum
bad81cef8a Align DispatcherServlet defaults for Java and XML
Prior to this commit some of the default strategies defined
for the DispatcherServlet weren't included in the default
configuration for both Java and XML configuration.

The following default beans have been added to the configuration
with the name as expected by the DispatcherServlet:

- org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver
- org.springframework.web.servlet.theme.FixedThemeResolver
- org.springframework.web.servlet.support.SessionFlashMapManager
- org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator

Closes gh-25209
2020-06-18 12:30:49 +02:00
Juergen Hoeller
d36407d585 Deprecate rarely used bean definition variants
Closes gh-24875
2020-06-17 10:59:55 +02:00
Сергей Цыпанов
7949937655 Remove redundant assignment of default values to volatile fields 2020-06-17 10:50:51 +02:00
Sébastien Deleuze
e2944c37e4 Make DispatcherServlet.properties loading lazy
With #25209, DispatcherServlet.properties loading and parsing
will be useless for most of use cases, and it requires
configuration on GraalVM native images.

The purpose of this issue to make such loading and parsing lazy,
only invoked in getDefaultStrategies() if needed.

Closes gh-25257
2020-06-16 17:25:05 +02:00
Rossen Stoyanchev
b572f7618f HandlerMappings expose usesPathPatterns() method
See gh-24945
2020-06-15 15:53:40 +01:00
Rossen Stoyanchev
5225a57411 Support for parsed PathPatterns in Spring MVC
See gh-24945
2020-06-15 11:25:35 +01:00
Juergen Hoeller
1279b3b822 Merge branch '5.2.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
#	spring-context-support/src/main/java/org/springframework/cache/jcache/config/AbstractJCacheConfiguration.java
2020-06-11 23:53:27 +02:00
Juergen Hoeller
e46ccd74b1 Consistent abstract declaration of "Abstract" base classes
Closes gh-25240
2020-06-11 23:43:41 +02:00
Sam Brannen
b0e07cc7e3 Delete dead code in spring-webmvc 2020-06-10 18:35:03 +02:00
liym@home
8fb7399a0c Upgrade to Dom4j 2.1.3 and Jaxen 1.2.0
Closes gh-25078
2020-06-10 16:38:43 +02:00
Rossen Stoyanchev
1984cfe9d7 Merge branch '5.2.x' 2020-06-08 21:20:44 +01:00
Rossen Stoyanchev
a2d516d526 Replace "whitelist" with alternative words 2020-06-08 21:19:28 +01:00
Rossen Stoyanchev
a7f8120164 Merge branch '5.2.x' 2020-06-03 06:14:20 +01:00
Rossen Stoyanchev
8dc8d88f88 Pre-calculated RequestMappingInfo hashcode
See gh-25143
2020-06-03 06:11:35 +01:00
Rossen Stoyanchev
1e25556049 Shared PathPatternParser instance
See gh-25143
2020-06-03 05:58:10 +01:00
Juergen Hoeller
e955e52f2f Refactor method name dispatching to switch statements
Closes gh-25163
2020-05-29 23:07:25 +02:00
Rossen Stoyanchev
1175b7eb52 Deprecate HandlerInterceptorAdapter
Closes gh-25147
2020-05-29 18:09:24 +01:00
Rossen Stoyanchev
d706899b7e Merge branch '5.2.x' 2020-05-28 06:52:23 +01:00
Rossen Stoyanchev
a92f425529 Also use constant for custom mapping condition
See gh-25143
2020-05-28 06:51:57 +01:00
Rossen Stoyanchev
90ccabd60b Merge branch '5.2.x' 2020-05-27 19:12:57 +01:00