This commit updates the JSR 107 cache auto-configuration to only create
a cache if it does not already exist. It also puts a specific order for
the auto-configured customizer so that another instance can run prior to
it reliably.
Closes gh-1157
This commit extracts various test utilities to a dedicated
initializr-generator-test module for easier consumption. The previous
test-jar are no longer published and a dependency to this new module
should be equivalent.
This commit also cleans various resources that were located in the wrong
place. In particular initializr-generator does not know anything about
metadata anymore.
Closes gh-988
This commit adds an optional module that gathers the opinions that are
used to generate a Spring Boot project.
Closes gh-340
Co-authored-by: Madhura Bhave <mbhave@pivotal.io>
Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
This commit removes the former `ProjectGenerator` api based on mustache
template in favour of a new DSL infrastructure to be detailed in further
commits.
Event handling is now web-specific with a `ProjectRequest` and a
`WebProjectRequest` that gathers the base input from the request and
some additional web-specific metadata, respectively. As a consequence
the `initializr-actuator` module has now a dependency on the
`initializr-web` module.
See gh-340
Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
This commit moves the generation of bundles for snippet and stubs to the
`docs` profile. This allows to successfully build the project when tests
are skipped, as long as the `docs` profile is not active.
Closes gh-665
Rather than creating a `CacheManager` ourselves, we now rely on JCache
to provide a `CacheManager` that we'll augment with the caches that
initializr needs.
If Initializr is embedded in another app and that app uses JCache, then
its cache manager will be transparently upgraded to define the caches
that initializr needs. If not, such caches will have to be created as
part of the custom config.
Also, caching only kicks in if required at the service level.
This commit also switches the cache implementation to EhCache 3.
See gh-389
The commons wrapper we were using didn't support executable files
so Ant seems like the best choice ultimately, even if it has a
lot of features we don't use or need.
This commit commit adds restdocs and stub generators and initiate
a reference guide for Initializr.
Most of the controller tests now use MockMvc via a custom version
of the MockMvcClientHttpRequestFactory (from spring-test). The
snippet names are auto-generated in the form
<HttpMethod>/<path>[/queries(/<name-value)*][/headers](/name-value)*]
when there is a comma-separated value in a header it is
abbreviated as <first-value>.MORE.
Wiremock stubs are generated in the same form under
snippets/stubs (with ".json" as the
file extension).
The controller tests that stayed as full stack use a different
base class AbstractFullStackInitializrIntegrationTests.
A long JSON body can be broken out into separate snippets
for each field (or rather a list of fields supplied by the
user). This feature was already used with hard-coded snippets
in the wiki.
See gh-295
This commit upgrades to Spring Boot 1.4.0.RELEASE and bumps to Java8. It
also migrate the cache library from Guava to Caffeeine.
The git and build information are now exposed via the `info` endpoint.
Closes gh-251
This commit splits the feature of Spring Initializr in several modules:
* `initializr-generator` is a standalone library that is responsible for
generating projects based on a `File` directory. It has a minimal set of
dependencies and is not web-related
* `initializr-web` provides the web integration (project generation,
meta-data, etc)
* `initializr-actuator` is an optional module that can be added to
support project-generation-specific statistics
Closes gh-214