Commit Graph

1620 Commits

Author SHA1 Message Date
Andy Wilkinson
9be96c49e2 Polish "Use HTTPS for external links wherever possible"
See gh-16316
2019-03-27 11:44:18 +00:00
Spring Operator
e401d02ced Use HTTPS for external links wherever possible
See gh-16316
2019-03-27 11:35:54 +00:00
Spring Operator
adc2462689 Use HTTPS for external links from XML files where possible
See gh-16311
2019-03-26 13:37:30 +00:00
Andy Wilkinson
0e009ef047 Use HTTPS to link to the Apache license 2019-03-20 15:00:10 +00:00
Spring Operator
7c314122f7 Update build and setup configuration to use HTTPS
See gh-16243
2019-03-19 16:01:05 +00:00
Spring Buildmaster
5f959b074f Next Development Version 2016-09-20 20:20:06 +00:00
Andy Wilkinson
b6e3eb0db3 Upgrade to Tomcat 8.0.37
Closes gh-6930
2016-09-19 20:26:19 +01:00
Phillip Webb
b97e0bd471 Allow HttpPutFormContentFilter to be disabled
Add `spring.mvc.formcontent.putfilter.enabled` property to allow the
HttpPutFormContentFilter to be disabled.

Fixes gh-6519
2016-09-16 14:14:21 -07:00
Phillip Webb
a2e4127d4f Fix multi-annotation nested condition logic
Update `AbstractNestedCondition` to correctly group nested conditions
on members.

Fixes gh-6672
2016-09-16 13:31:55 -07:00
Andy Wilkinson
63b8e82c10 Update OnBeanCondition to consider hierarchy for PARENTS search strategy
Closes gh-6762
2016-08-31 13:28:08 +01:00
Phillip Webb
69e96c6211 Polish 2016-08-29 15:29:54 +01:00
Andy Wilkinson
a5c6b0954d Consider ancestors when finding primary beans for ConditionalOnSingleCandidate
Closes gh-6559
2016-08-26 17:29:47 +01:00
Andy Wilkinson
75c1e50c5a Improve type determination for factory beans during condition evaluation
Previously, BeanTypeRegistry did not correctly determine the type
that would be created by a factory bean if that factory bean was
returned from a bean method with arguments on a configuration class
found via component scanning.

The key difference is that bean definitions for bean methods on
configuration classes found via component scanning use ASM-based
metadata rather than reflection-based metadata. The ASM-based method
data does not provide direct access to the Method that will create the
bean. In this case, BeanTypeRegistry was falling back to looking for
a method with the matching name and no arguments. Therefore, if
the bean method had any arguments it would fail to find the method
and would, therefore, be unable to determine the type of bean
produced by the factory bean.

This commit updates BeanTypeRegistry to use logic that is very similar
to Spring Framework's ConstructorResolver's
resolveFactoryMethodIfPossible method to locate the method that will
produce the factory bean. It looks for a single method with
the required name with any number of arguments. If it finds multiple
methods with the required name and different arguments it returns
null, just as ConstructorResolver does.

Closes gh-6755
2016-08-26 13:46:56 +01:00
Andy Wilkinson
1dc231f771 Use Hamcrest's containsString matcher rather than Mockito's 2016-08-22 15:48:44 +01:00
Andy Wilkinson
ba51dc5c4a Make configuration of Liquibase’s logging more robust
We make Liquibase aware of our custom Commons Logging-based logger by
adding its package to the Liquibase ServiceLocator’s packages to scan.
Previously, this was happening too late so Liquibase may have already
initialized and cached a particular logger.

This commit moves the registration of the extra package from the
Liquibase auto-configuration to the application listener that customises
Liquibase’s ServiceLocator. This ensures that the package is added
before Liquibase is used. Unfortunately, configuring Liquibase’s
ServiceLocator and its packages to scan causes it to try to perform
some logging, resulting in it caching the wrong type of logger. We
work around this problem by resetting Liquibase’s LogFactory once we’ve
finished setting everything up.

Closes gh-6713
2016-08-22 14:58:34 +01:00
Spring Buildmaster
a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Andy Wilkinson
68fb5789ca Create one SpringApplicationAdminMXBeanRegistrar per context hierarchy
Previously, one SpringApplicationAdminMXBeanRegistrar was created
per context. When there was more then one context this would result
in a javax.management.InstanceAlreadyExistsException being thrown
as an attempt was made to register the MBean more than once.

This commit updates SpringApplicationAdminJmxAutoConfiguration so
that the registrar is only created when there's no such existing bean
in the context hierarchy.

Closes gh-6378
2016-07-13 09:52:23 +01:00
Stephane Nicoll
bbb29dd70f Remove @Primary from IntegrationMBeanExporter
Commit 3ea84f9e1 has wrongly introduced a `@Primary` marker on
`IntegrationMBeanExporter` so any use of both Spring's JMX support
and Spring Integration's JMX support leads to an exception. This commit
makes sure to remove the unnecessary `@Primary`

Closes gh-6328
2016-07-07 15:36:02 +02:00
Spring Buildmaster
2216369348 Next Development Version 2016-07-04 14:15:02 +00:00
Stephane Nicoll
4e07003e1d Polish "Use missing MongoClientOptions in MongoProperties"
Closes gh-6176
2016-06-27 15:14:24 +02:00
Nasko Vasilev
59f9cfb8a6 Use missing MongoClientOptions in MongoProperties
See gh-6176
2016-06-27 15:14:08 +02:00
Stephane Nicoll
7a5fabf59d Polish "Add condition on MongoClientFactoryBean"
Closes gh-6203
2016-06-27 14:55:47 +02:00
Julien May
2003c5e1ae Add condition on MongoClientFactoryBean
This commit makes sure that the condition that links a `MongoClient` to
the embedded mongo server kicks in only if `MongoClientFactoryBean` is
also on the classpath.

Previously, only a condition on the mongo driver existed, leading to
`ClassNotFoundException` if Spring Data MongoDB wasn't available.

See gh-6203
2016-06-27 14:39:20 +02:00
Phillip Webb
5b97981c87 Polish 2016-06-20 18:13:43 -07:00
Artem Bilan
3ea84f9e1d Fix relaxed binding of SI JMX config
Instead of using an expression for JMX-related properties, this commit
properly honors relaxed binding.

Closes gh-6184
2016-06-20 10:04:38 +02:00
Phillip Webb
ed6f11d60d Polish 2016-06-10 11:46:26 -07:00
Vedran Pavic
6dde498b87 Update DataSourceBuilder aliases
This commit adds a `user` alias for the `username` property which permits
the use of `OracleDataSource`.

Closes gh-6124, gh-6027, gh-6125
2016-06-09 14:16:21 +02:00
Phillip Webb
7fb545d26c Polish 2016-05-10 09:35:10 -07:00
Andy Wilkinson
1ab835a0f7 Add tests for JooqExceptionTranslator
See gh-5884
2016-05-10 13:21:59 +01:00
tfeiner
61cb18a69c Use JOOQ's Spring DB name during exception translation
The name of a JOOQ SQLDialect does not always match the name defined
in sql-error-codes.xml. For example, the Postgres translator was not
initialized correctly because in JOOQ the dialect is named
SQLDialect.POSTGRES, but in sql-error-codes.xml the bean is named
"PostgreSQL".

This commit updates the translator to use the dialects third-party
springDbName which ensures that it maps correctly to the entries in
sql-error-codes.xml.

Closes gh-5884
2016-05-10 13:21:59 +01:00
Spring Buildmaster
819a9574a6 Next Development Version 2016-05-10 05:28:34 +00:00
Stephane Nicoll
2cacc19c91 Polish
See gh-5901
2016-05-09 17:49:55 +02:00
Stephane Nicoll
a4ba8f61c9 Backport 6dd8415
While working on gh-5309, a regression was introduced and fixed right the
way on master. Unfortunately, the fix wasn't applied to `1.3.x` as it
should have been.

This commit applies 6dd8415 to `1.3.x`

Closes gh-5901
2016-05-09 17:49:16 +02:00
Spring Buildmaster
376bbe68d8 Next Development Version 2016-05-06 11:23:57 +00:00
Andy Wilkinson
34420a8768 Allow @ConditionalOnProperty to be used as a meta-annotation
Closes gh-5819
2016-05-05 17:33:18 +01:00
Andy Wilkinson
147956a7b2 Avoid creating multiple BeanNameViewResolver beans
ErrorMvcAutoConfiguration creates a BeanNameViewResolver bean in case
the user has used @EnabledWebMvc and disabled WebMvcAutoConfiguration.
If the user hasn’t used @EnabledWebMvc, WebMvcAutoConfiguration will
creates its BeanNameViewResolver and override the one that’s already
been defined by ErrorMvcAutoConfiguration.

This commit makes WebMvcAutoConfiguration’s BeanNameViewResolver
definition conditional on there being no existing BeanNameViewResolver
bean definition.

Closes gh-5354
2016-05-05 16:10:36 +01:00
Dave Syer
905451f92e That BaseConfiguration thing didn't work out after all
It seems like a base class that defines `@Beans` just doesn't
define any beans. Oh well, time to copy-paste.
2016-05-04 21:01:40 +01:00
Dave Syer
1babdd5c2e Remove log config for non boot things 2016-05-04 14:22:41 +01:00
Dave Syer
e98264debf Move base configuration class to a separate file
to stop it from being included in the enclosing @Configuration.

That way, if the app is not a web app, then there really is a
client_credentials OAuth2 resource (as claimed in the user guide).

Fixes gh-5735
2016-05-04 14:02:00 +01:00
Phillip Webb
ef7b511b0e Polish 2016-04-28 09:29:49 -07:00
Dave Syer
9c0679b1f4 Add support for spring.rabbitmq.ssl.algorithm
Rabbit client 3.6.* uses TLSv1.1 as the default algorithm which
many brokers are deisabling these days. Spring AMQP supports
changing the algorithm by name, so this is just a pass thru for
that.
2016-04-28 10:27:51 +01:00
Stephane Nicoll
ac8e87d79f Polish contribution
Closes gh-5782
2016-04-26 09:24:37 +02:00
Venil Noronha
d5554e0aa1 Use static-locations properties to locate favicon
Closes gh-5751
2016-04-26 09:09:19 +02:00
Stephane Nicoll
247685e992 Add missing @Documented
Closes gh-5786
2016-04-26 08:29:20 +02:00
Dave Syer
568d716c99 Move OAuth2ClientContextFilter back before the main security filter
It sometimes has to catch an exception from the security filter so
it needs to be before, and somehow this hasn't been a problem up to
now, but probably only by some fluke.

Fixes gh-5792
2016-04-25 16:44:43 +01:00
Andy Wilkinson
a4d7a77547 Apply spring.thymeleaf.cache to auto-configured ThymeleafViewResolver
Previously, spring.thymeleaf.cache was only applied to auto-configured
TemplateResolver. This commit also applies the propery to the
auto-configured ThymeleafViewResolver.

Closes gh-5395
2016-04-18 17:26:13 +01:00
Sergey Pauk
8542f4f481 Make UserInfoTokenServices.getPrincipal protected
Update UserInfoTokenServices.getPrincipal() so that it can be overridden
by subclasses to allow a custom authenticated principal to be returned
from the authorized request parameters.

Fixes gh-5053
2016-04-12 14:40:37 -07:00
Phillip Webb
d7e56abdf3 Don't apply null ServerProperties from customize
Update ServerProperties so that `null` values are not applied when
customizing the EmbeddedServletContainerFactory. Primarily changed to
stop `server.undertow.accesslog.enabled` from being blindly applied.

Fixes gh-5515
2016-04-09 23:32:39 -07:00
Andy Wilkinson
ffe21175ca Upgrade to Logback 1.1.7
Closes gh-5568
2016-04-05 12:40:21 +01:00
Phillip Webb
39140945b5 Polish 2016-03-29 21:45:11 -07:00