Rework commit 4a69755b to remove the need for the ApplicationInfo class.
The updated code now uses the auto-configuration class to compute a
default persistence unit root location
Closes gh-6635
Due to the layout format change in 1.4, Spring Framework is no longer
able to compute a default persistence unit root URL. If a Spring Boot 1.4
application has JPA but does not have any entity, the application started
from a fat jar now fails with a quite cryptic exception.
This commit introduces `ApplicationInfo` as a general replacement for
the `ApplicationArguments` and `Banner` singleton beans that
`SpringApplication` registers on startup. `ApplicationInfo` also defines
the detected "main" `Class` that can be used to compute a last resort
URL that makes sense.
If such bean is available, `EntityManagerFactoryBuilder` now sets the
default persistence unit root location, preventing Spring Framework to
attempt to resolve an unknown location. Note that in our case the
persistence unit root location is actually useless: given the way the
persistence unit is created, nothing actually uses it but Hibernate, as a
compliant JPA provider, has to make sure this setting is set to a valid
URL nevertheless.
Closes gh-6635
As of Spring Boot 1.4, IDEs are supposed to provide auto-completion for
hints and enum values. This commit removes the hard-coded copy of
allowed values for enum-based properties. This was mostly the case
already and this commit fixes the few ones remaining.
Closes gh-6654
This commit restores the support of "spring.datasource.type". If this
property is set to an unsupported `DataSource` implementation, we now
properly create it again, rather than ignoring it because its value did
not match any value we support.
Since Spring Boot 1.4 now redirects `DataSource` implementation settings
to dedicated namespaces, the documentation has been updated to explicitly
mention how one can create such arrangement for an unsupported
implementation.
As a convenience, `DataSourceProperties` can initialize a
`DataSourceBuilder` based on its internal state, making it very easy for
anyone to create a `DataSource` from a `DataSourceProperties` instance.
Closes gh-6695
Update spring-boot-docs so that an empty jar file is produced. The
code is only needed for documentation includes and if included in the
deployed jar seems to prevent promotion to Maven Central.
Fixes gh-6495
Switch `@AutoConfigureJsonTesters` to use regular `@Autowired` injection
for JSON testers. Prior to this commit JSON Tester fields were
initialized directly which caused IDE issues and was also a little
confusing.
Fixes gh-6451