Commit Graph

367 Commits (c73adcd198fe2088049484bc4441aa47392884c3)

Author SHA1 Message Date
Stephane Nicoll 884c058e57 Add processor to generate configuration meta-data
Adds an annotation processor to generates a JSON meta-data file at
compile time from @ConfigurationProperties items. Each meta-data file
can include an array or 'properties' and 'groups'.

A 'property' is a single item that may appear in a Spring Boot
'application.properties' file with a given value. For example,
'server.port' and 'server.context-path' are properties. Each property
may optionally include 'type' and 'description' attributes to provide
the data type (e.g. `java.lang.Integer`, `java.lang.String`) and
some short documentation (taken from the field javadoc) about what the
property is for. For consistency, the type of a primitive is translated
to its wrapper counterpart, i.e. `boolean` becomes `java.lang.Boolean`.

A 'group' provides a higher level grouping of properties. For example
the 'server.port' and 'server.context-path' properties are in the
'server' group.

Both 'property' and 'group' items may additional have 'sourceType' and
'sourceMethod' attributes to indicate the source that contributed them.

Users may use `META-INF/additional-spring-configuration-metadata.json`
to manually provide additionally meta-data that is not covered by
@ConfigurationProperties objects. The contents of this file will be
read and merged with harvested items. The complete meta-data file is
finally written to `META-INF/spring-configuration-metadata.json`.

See gh-1001
10 years ago
Phillip Webb 830ce80824 Polish CLI init command
Rename a few classes and methods and extract some logic into helper
classes. Also change 2 char shortcuts to a single char.

Closes gh-1751
10 years ago
Dave Syer 49fbf215a1 Switch to Dropwizard metrics 3.1.0
Fixes gh-1775
10 years ago
Stephane Nicoll b2fe2dd912 Add init command to the CLI
This commit adds a new command to the CLI that allows to initialize a new
project from the command line. It uses the Spring initializr service to
actually generate the project.

The command offers two main operations:

1. Listing the capabilities of the service (--list or -l). This basically
dumps the defaults of a given service and the list of dependencies and
project types it supports
2. Generating a project. By default, http://start.spring.io is used and
its configured defaults are applied. Running spring init would therefore
have the same effect as clicking the 'generate project' on the UI without
entering any extra information. No file is overwritten by default.

The generation can be customized with the following options:

* --boot-version (-bv) Spring Boot version the project should use
* --dependencies (-d) comma separated list of dependencies to add to the
generated project
* --java-version (-jv) Java version to use
* --packaging (-p) the packaging for the project (jar, war)
* --target the url of the service to use

The actual type of the project can be defined in several ways:

1. Using the --type (-t) option that identifies a type that is supported
by the service
2. A combination of --build and/or --format that can be used to uniquely
identify matching these tags. Build represents the build system to use
(e.g. maven or gradle) while --format defines the format of the generated
project.

The project is saved on disk with the name provided by the server through
the Content-Disposition header, if any. It is possible to force it with
the --output option. It is possible to overwrite existing files by adding
the --force (-f) flag.

The --extract (-x) option allows to extract the project instead of saving
the zip archive. By default, the project is extracted in the current
working directory but it is possible to specify an alternate directory
using the --output option.

Fixes gh-1751
10 years ago
Phillip Webb 4b45ce9e57 Upgrade to Spring 4.1.2.BUILD-SNAPSHOT 10 years ago
Andy Wilkinson c8d7a6dc24 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 9a491013c3 Update email addresses in pom files to use new pivotal.io domain
Closes gh-1774
10 years ago
Andy Wilkinson ef2455938e Align new JavaMail dependencies with Spring IO Platform
Spring IO Platform already provides dependency management for JavaMail.
This commit updates Boot’s new JavaMail dependency management to align
with the Platform, thereby allowing the Platform to inherit Boot’s
dependency management instead of defining its own.
10 years ago
Stephane Nicoll ccc5e65779 Add email support
This commit adds a new starter to auto-configure a MailSender when the
necessary classes are present and when the property "spring.mail.host" is
set.

The auto-configuration also accepts any arbitrary properties that
JavaMail might need using the "spring.mail.properties" prefix.

Fixes gh-1760
10 years ago
Andy Wilkinson 741d1f7273 Merge branch '1.1.x'
Conflicts:
	spring-boot-dependencies/pom.xml
10 years ago
Andy Wilkinson 812acec48f Upgrade to Spring Batch 3.0.2.RELEASE
Closes gh-1782
10 years ago
Andy Wilkinson b1e7cd0be2 Rename spring-boot-starter-cloud in spring-boot-dependencies
Fixes #1781
10 years ago
Dave Syer 015377f9de Exclude log4j in a couple of places (see gh-1660)
also rename spring-cloud starter
10 years ago
Andy Wilkinson cebfd44d16 Upgrade to Spring AMQP 1.4.0.RC1 10 years ago
Andy Wilkinson 43eda4ce5d Upgrade to Spring Integration 4.1.0.RC1
Closes gh-1765
10 years ago
Dave Syer 4cd3bf18e0 Revert "Updated liquibase dependency to 3.2."
This reverts commit d6621e62ad. I think
the test failure might be a bug in Liquibase:
https://liquibase.jira.com/browse/CORE-2094
10 years ago
Nathan Voxland d6621e62ad Updated liquibase dependency to 3.2.
Fixes gh-1382
10 years ago
Dave Syer 576f5cfb06 Upgrade Jersey to 2.13
Fixes gh-1752
10 years ago
Andy Wilkinson cf0018e88c Merge branch '1.1.x' 10 years ago
Andy Wilkinson 5e5e707945 Upgrade to Reactor 1.1.5.RELEASE
Closes gh-1742
10 years ago
Brett Wooldridge 9984939c47 Update HikariCP to 2.1.0, compile against the Java 6-compatible artifact
For those running applications on Java 8, dependency management for the
Java 8-compatible artifact is also provided.

Closes gh-1721
10 years ago
Andy Wilkinson d4fa5fa1cf Merge branch '1.1.x' 10 years ago
Andy Wilkinson 7cb3ae43d4 Update to Tomcat 7.0.56
Closes gh-1710
10 years ago
Phillip Webb 3228cfa9bd Fixup version numbers following release 10 years ago
Spring Buildmaster 3e71a21b30 Next development version 10 years ago
Daniel Fullarton 1dbc94d0f7 Add a logging system, starter and sample for Log4j 2
Closes gh-1565
10 years ago
Andy Wilkinson 73b80dbeed Merge branch '1.1.x'
Conflicts:
	spring-boot-dependencies/pom.xml
10 years ago
Andy Wilkinson e130c00e6c Upgrade to Spring Loaded 1.2.1.RELEASE
Closes gh-1474
10 years ago
Sebastien Deleuze 315213ea4e Support Jackson based XML serialization and Jackson2ObjectMapperBuilder
This commit introduces support for Jackson based XML serialization, using the
new MappingJackson2XmlHttpMessageConverter provided by Spring Framework
4.1. It is automatically activated when Jackson XML extension is detected on the
classpath.

Jackson2ObjectMapperBuilder is now used to create ObjectMapper and XmlMapper
instances with the following customized properties:
 - MapperFeature.DEFAULT_VIEW_INCLUSION is disabled
 - DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES is disabled

JodaModuleAutoConfiguration and Jsr310ModuleAutoConfiguration have been removed
since their behaviors are now handled directly by the ObjectMapper builder.

In addition to the existing @Bean of type ObjectMapper support, it is now
possible to customize Jackson based serialization properties by declaring
a @Bean of type Jackson2ObjectMapperBuilder.

Fixes gh-1237
Fixes gh-1580
Fixes gh-1644
10 years ago
Stephane Nicoll 24da6a504e Upgrade to Spring framework 4.1.1
Closes gh-1654
10 years ago
Dave Syer 339f3b7bf0 Add autoconfig support for Jersey (2)
Jersey 2 has some Spring support built in but it's a bit awkward to
use in a Boot app, so autoconfiguration seems appropriate. The tests
and sample show how to use it, but the short story is that any
@Component can define JAX-RS endpoints via @GET etc.

There's a sample for Jersey 1 as well (pay careful attention to
the plugin configuration if you want to build an executable jar)

Fixes gh-1651
10 years ago
Andy Wilkinson c601c09ecc Upgrade to Hibernate Validator 5.1.2.Final
Closes gh-1595
10 years ago
Henryk Konsek 7f20f5d4f8 Upgraded ActiveMQ version to 5.10.0
Fixes gh-1609
10 years ago
Phillip Webb 4f9258a345 Fixup version numbers following release 10 years ago
Spring Buildmaster edb4b7ed7d Next development version 10 years ago
Phillip Webb 22378698fe Upgrade to Spring Framework 4.1.1.BUILD-SNAPSHOT 10 years ago
Andy Wilkinson 750c116078 Upgrade to Spring Integration 4.0.4 and Spring AMQP 1.3.6
Closes gh-1503
Closes gh-1505
10 years ago
Andy Wilkinson fbeb8c966c Upgrade to Spring Data Evans
The missing bean condition on the auto-configuration classes for
Elasticsearch, Jpa, Mongo and Solr repositories have been tightened to
look for ElasticsearchRepositoryFactoryBean, JapRepositoryFactoryBean,
MonoRepositoryFactoryBean, and SolrRepositoryFactoryBean respectively.

In Spring Data Evans, when there are multiple repository types on the
classpath, a strict mode is entered to prevent the different
repositories from trampling over each other. A side-effect of this is
that for the Mongo domain types in the tests to be discovered they
must be explicitly annotated with @Document.

Closes gh-1338
10 years ago
David Liu 8e9e502b6a Add support for auto-configuration of Commons DBCP2
Closes gh-1292
Closes gh-1477
10 years ago
Andy Wilkinson 85ebc29639 Upgrade to latest Spring Integration and AMQP milestones
Closes gh-1493
Closes gh-1517
10 years ago
Phillip Webb 338288205b Fixup version numbers following release 10 years ago
Spring Buildmaster d63e4b4329 Next development version 10 years ago
Stephane Nicoll 2d8ec0faab Upgrade to Spring framework 4.1.0
Fixes gh-1501
10 years ago
Stephane Nicoll 3f148683a1 Update to Spring framework 4.0.7
Fixes gh-1488
10 years ago
Ramnivas Laddad 413890de48 Add starter for spring-cloud
Fixes gh-1385
10 years ago
Phillip Webb 9a1c15a88d Upgrade to spring-cloud v1.1.0 10 years ago
Andy Wilkinson bf249d4205 Provide dependency management for all of Spring Cloud
Closes #1462
10 years ago
Phillip Webb ff870de0f0 Fix a few JTA issues
- Search for ConnectionFactories in java:/JmsXA and
  java:/XAConnectionFactory
- Remove javax.transaction:jta managed dependency
- Removed unused JtaProperties argument

Fixes gh-947
10 years ago
David Liu f4ccaa874a Provide auto-configuration for Gson
Closes #1339
10 years ago
Andy Wilkinson d16ae2afd4 Merge branch '1.1.x' 10 years ago