From 490778552acef4a1643a21298d1e17021925d4fe Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 7 Nov 2018 09:57:31 +0100 Subject: [PATCH] Move initializr-service to a separate repository This commit moves the configuration of the start.spring.io website to a dedicated github repository. See https://github.com/spring-io/start.spring.io Closes gh-656 --- CONTRIBUTING.adoc | 6 +- README.adoc | 78 +- initializr-docs/pom.xml | 7 +- .../main/asciidoc/configuration-format.adoc | 4 - initializr-docs/src/main/asciidoc/index.adoc | 1 - initializr-service/pom.xml | 121 -- .../initializr/service/InitializrService.java | 50 - .../AbstractProjectRequestPostProcessor.java | 99 -- .../JacksonKotlinRequestPostProcessor.java | 47 - .../JavaVersionRequestPostProcessor.java | 82 - .../ReactorTestRequestPostProcessor.java | 50 - .../SpringBatchTestRequestPostProcessor.java | 51 - .../SpringBoot2RequestPostProcessor.java | 51 - ...ringCloudFunctionRequestPostProcessor.java | 73 - ...SpringCloudStreamRequestPostProcessor.java | 80 - ...pringSecurityTestRequestPostProcessor.java | 51 - .../SpringSessionRequestPostProcessor.java | 73 - .../info/CloudFoundryInfoContributor.java | 53 - .../src/main/resources/application.yml | 1395 ----------------- .../service/InitializrServiceHttpsTests.java | 74 - .../service/InitializrServiceSmokeTests.java | 90 -- .../AbstractRequestPostProcessorTests.java | 72 - ...acksonKotlinRequestPostProcessorTests.java | 67 - .../JavaVersionRequestPostProcessorTests.java | 194 --- .../ReactorTestRequestPostProcessorTests.java | 59 - ...ingBatchTestRequestPostProcessorTests.java | 61 - .../SpringBoot2RequestPostProcessorTests.java | 78 - ...loudFunctionRequestPostProcessorTests.java | 102 -- ...gCloudStreamRequestPostProcessorTests.java | 199 --- ...SecurityTestRequestPostProcessorTests.java | 61 - ...pringSessionRequestPostProcessorTests.java | 129 -- .../CloudFoundryInfoContributorTests.java | 61 - .../src/test/resources/logback-test.xml | 7 - initializr-web/pom.xml | 7 +- pom.xml | 6 - 35 files changed, 22 insertions(+), 3617 deletions(-) delete mode 100644 initializr-service/pom.xml delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/InitializrService.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/AbstractProjectRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessor.java delete mode 100644 initializr-service/src/main/java/io/spring/initializr/service/info/CloudFoundryInfoContributor.java delete mode 100644 initializr-service/src/main/resources/application.yml delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceHttpsTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceSmokeTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/AbstractRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessorTests.java delete mode 100644 initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessorTests.java delete mode 100755 initializr-service/src/test/java/io/spring/initializr/service/info/CloudFoundryInfoContributorTests.java delete mode 100644 initializr-service/src/test/resources/logback-test.xml diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 0c6e7ce8..2752a8bf 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -61,13 +61,9 @@ The project can be built from the root directory using the standard Maven comman [indent=0] ---- - $ ./mvnw clean install -Pfull + $ ./mvnw clean install ---- -NOTE: The `full` profile includes the `initializr-service` and the documentation. Make -sure to include that profile when you change code there. It is also recommended to enable -that profile in your IDE so that refactoring is applied on the entire codebase. - If you want to run the smoke tests, you need Firefox installed and available in the path [indent=0] diff --git a/README.adoc b/README.adoc index f38ae81a..7ad0af7d 100644 --- a/README.adoc +++ b/README.adoc @@ -3,6 +3,7 @@ :boot-doc: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle :code: https://github.com/spring-io/initializr/blob/master :docs: http://docs.spring.io/initializr/docs/current-SNAPSHOT/reference +:service: https://github.com/spring-io/start.spring.io Spring Initializr provides an extensible API to generate quickstart projects. It also provides a configurable service (you can see our default instance at @@ -14,14 +15,13 @@ format to allow third-party clients to provide the necessary assistance. Finally, Initializr offers a configuration structure to define all the aspects related to the project to generate: list of dependencies, supported java and boot -versions, etc. Check -the {code}/initializr-service/src/main/resources/application.yml[configuration of our -instance] for an example. Such configuration is also described in details in the -documentation. +versions, etc. Check {service}[the companion project] that defines +https://start.spring.io and, in particular, the +{service}/blob/master/src/main/resources/application.yml[configuration of our instance] +for an example. Such configuration is also described in details in the documentation. -NOTE: We use the continuous deployment technique to manage our instance; check the -https://github.com/spring-io/initializr/milestones[milestones page] for an overview -of changes +NOTE: Check the https://github.com/spring-io/initializr/milestones[milestones page] for an +overview of the changes. == Installation and Getting Started The {docs}/htmlsingle/[reference documentation] is published in @@ -38,10 +38,6 @@ in many environments (including embedded in your own project) generation * `initializr-docs`: documentation -`initializr-service` is an additional module that represents the production instance -that is available at link:https://start.spring.io[]. It is not enabled by default but -you can enable the `full` profile in your IDE to easily run it locally. - == Supported interfaces Spring Initializr can be used as follows: @@ -167,7 +163,7 @@ deploy the service. You first need to create or update your configuration to define the necessary attributes that your instance will use. Again, check the documentation for a {docs}/htmlsingle/#configuration-format[description of the configuration] and -{code}/initializr-service/application.yml[review our own config] for a sample. +{service}[review our own config] for a sample. You can integrate the library in a traditional Java-based project or by writing the super-simple script below: @@ -218,69 +214,13 @@ If you want to run the smoke tests using Geb, you need to enable the $ ./mvnw verify -PsmokeTests ---- -If you want to build both the library and the service, you can enable the `full` -profile: +To generate the docs as well, you should enable the `full` profile: [indent=0] ---- $ ./mvnw clean install -Pfull ---- - -[[run-app]] -=== Running the app locally - -Once you have <>, you can easily start the app as any -other Spring Boot app from the `initializr-service` directory: - -[indent=0] ----- - $ cd initializr-service - $ ../mvnw spring-boot:run ----- - -[[run-ide]] -=== Running the app in an IDE - -You should be able to import the projects into your IDE with no problems. Once there you -can run the `initializr-service` from its main method, debug it, and it will reload if -you make changes to other modules. (You may need to manually enable the "full" profile.) -This is the recommended way to operate while you are developing the application, -especially the UI. - - -## Deploying to Cloud Foundry - -If you are on a Mac and using http://brew.sh/[homebrew], install the Cloud Foundry -CLI: - -[indent=0] ----- - $ brew install cloudfoundry-cli ----- - -Alternatively, download a suitable binary for your platform from -https://console.run.pivotal.io/tools[Pivotal Web Services]. - -You should ensure that the application name and URL (name and host values) are -suitable for your environment before running `cf push`. - -First, make sure that you have <>, then make sure first -that the jar has been created: - -[indent=0] ----- - $ cd initializr-service - $ ../mvnw package ----- - -Once the jar has been created, you can push the application: - -[indent=0] ----- - $ cf push your-initializr -p target/initializr-service.jar ----- - == License Spring Initializr is Open Source software released under the http://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license]. diff --git a/initializr-docs/pom.xml b/initializr-docs/pom.xml index a64b716d..3140894e 100644 --- a/initializr-docs/pom.xml +++ b/initializr-docs/pom.xml @@ -67,7 +67,12 @@ - docs + full + + + full + + false ${project.build.directory}/snippets diff --git a/initializr-docs/src/main/asciidoc/configuration-format.adoc b/initializr-docs/src/main/asciidoc/configuration-format.adoc index 3b00eb8a..4da7d31f 100644 --- a/initializr-docs/src/main/asciidoc/configuration-format.adoc +++ b/initializr-docs/src/main/asciidoc/configuration-format.adoc @@ -5,10 +5,6 @@ The metadata provided through configuration are driving the options exposed by a particular instance and <>. -TIP: A good way to get started with the configuration is to look at the -{sc-initializr-service}/resources/application.yml[configuration of the production -instance] and check the end-result on https://start.spring.io - The configuration is split in several sections: * An `env` section used to provide various global settings. diff --git a/initializr-docs/src/main/asciidoc/index.adoc b/initializr-docs/src/main/asciidoc/index.adoc index e1188ebd..3e9edef6 100644 --- a/initializr-docs/src/main/asciidoc/index.adoc +++ b/initializr-docs/src/main/asciidoc/index.adoc @@ -16,7 +16,6 @@ Stéphane Nicoll; Dave Syer :github-wiki: https://github.com/{github-repo}/wiki :github-master-code: https://github.com/{github-repo}/tree/master :sc-initializr-generator: {github-code}/initializr-generator/src/main/java/io/spring/initializr -:sc-initializr-service: {github-code}/initializr-service/src/main :spring-initializr-docs-version: current :spring-initializr-docs: http://docs.spring.io/initializr/docs/{spring-initializr-docs-version}/reference :spring-initializr-docs-current: http://docs.spring.io/initializr/docs/current/reference diff --git a/initializr-service/pom.xml b/initializr-service/pom.xml deleted file mode 100644 index 244cd26d..00000000 --- a/initializr-service/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - 4.0.0 - - io.spring.initializr - initializr - 0.7.0.BUILD-SNAPSHOT - - initializr-service - Spring Initializr :: Service - - - ${basedir}/.. - - - - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-web - - - - io.spring.initializr - initializr-web - - - io.spring.initializr - initializr-actuator - - - - javax.cache - cache-api - - - org.ehcache - ehcache - - - - org.springframework.boot - spring-boot-devtools - true - - - - org.springframework.boot - spring-boot-starter-test - test - - - io.spring.initializr - initializr-generator - test-jar - test - - - xmlunit - xmlunit - test - - - - - initializr-service - - - pl.project13.maven - git-commit-id-plugin - - - - revision - - - - - ${project.basedir}/../.git - yyyy-MM-dd'T'HH:mm:ssZ - true - - ${project.build.outputDirectory}/git.properties - - - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - repackage - - - true - - - - build information - - build-info - - - - ${spring.boot.version} - - - - - - - - - - \ No newline at end of file diff --git a/initializr-service/src/main/java/io/spring/initializr/service/InitializrService.java b/initializr-service/src/main/java/io/spring/initializr/service/InitializrService.java deleted file mode 100644 index 0def51bf..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/InitializrService.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service; - -import io.spring.initializr.metadata.InitializrMetadataProvider; -import io.spring.initializr.web.project.LegacyStsController; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.Bean; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.web.servlet.resource.ResourceUrlProvider; - -/** - * Initializr service application. Enables legacy STS support for older clients. - * - * @author Stephane Nicoll - */ -@SpringBootApplication -@EnableCaching -@EnableAsync -public class InitializrService { - - public static void main(String[] args) { - SpringApplication.run(InitializrService.class, args); - } - - @Bean - public LegacyStsController legacyStsController( - InitializrMetadataProvider metadataProvider, - ResourceUrlProvider resourceUrlProvider) { - return new LegacyStsController(metadataProvider, resourceUrlProvider); - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/AbstractProjectRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/AbstractProjectRequestPostProcessor.java deleted file mode 100644 index b1c543dd..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/AbstractProjectRequestPostProcessor.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.generator.ProjectRequestPostProcessor; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.util.Version; - -/** - * Base {@link ProjectRequestPostProcessor} with reusable utilities. - * - * @author Stephane Nicoll - */ -public class AbstractProjectRequestPostProcessor implements ProjectRequestPostProcessor { - - /** - * Determine if the {@link ProjectRequest request} defines the dependency with the - * specified {@code dependencyId}. - * @param request the request to handle - * @param dependencyId the id of a dependency - * @return {@code true} if the project defines that dependency - */ - protected boolean hasDependency(ProjectRequest request, String dependencyId) { - return hasDependencies(request, dependencyId); - } - - /** - * Determine if the {@link ProjectRequest request} defines the dependencies with the - * specified {@code dependenciesId}. - * @param request the request to handle - * @param dependenciesId the dependency ids - * @return {@code true} if the project defines all dependencies - */ - protected boolean hasDependencies(ProjectRequest request, String... dependenciesId) { - for (String id : dependenciesId) { - if (getDependency(request, id) == null) { - return false; - } - } - return true; - } - - /** - * Return the {@link Dependency} with the specified {@code id} or {@code null} if the - * project does not define it. - * @param request the request to handle - * @param id the id of a dependency - * @return the {@link Dependency} with that id or {@code null} if the project does not - * define such dependency - */ - protected Dependency getDependency(ProjectRequest request, String id) { - return request.getResolvedDependencies().stream() - .filter((dependency) -> id.equals(dependency.getId())).findFirst() - .orElse(null); - } - - /** - * Specify if the Spring Boot version of the {@link ProjectRequest request} is higher - * or equal to the specified {@link Version}. - * @param request the request to handle - * @param version the minimum version - * @return {@code true} if the requested version is equal or higher than the specified - * {@code version} - */ - protected boolean isSpringBootVersionAtLeastAfter(ProjectRequest request, - Version version) { - Version requestVersion = Version.safeParse(request.getBootVersion()); - return version.compareTo(requestVersion) <= 0; - } - - /** - * Specify if the Spring Boot version of the {@link ProjectRequest request} is lower - * than the specified {@link Version}. - * @param request the request to handle - * @param version the maximum version - * @return {@code true} if the requested version is lower than the specified - * {@code version} - */ - protected boolean isSpringBootVersionBefore(ProjectRequest request, Version version) { - Version requestVersion = Version.safeParse(request.getBootVersion()); - return version.compareTo(requestVersion) > 0; - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessor.java deleted file mode 100644 index eff1040f..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessor.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.generator.ProjectRequestPostProcessor; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadata; - -import org.springframework.stereotype.Component; - -/** - * A {@link ProjectRequestPostProcessor} that automatically adds "jackson-module-kotlin" - * when Kotlin is used and a dependency has the "json" facet. - * - * @author Sebastien Deleuze - */ -@Component -class JacksonKotlinRequestPostProcessor implements ProjectRequestPostProcessor { - - static final Dependency JACKSON_KOTLIN = Dependency.withId("jackson-module-kotlin", - "com.fasterxml.jackson.module", "jackson-module-kotlin"); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - if (request.getFacets().contains("json") - && "kotlin".equals(request.getLanguage())) { - request.getResolvedDependencies().add(JACKSON_KOTLIN); - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessor.java deleted file mode 100644 index f5afb98a..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessor.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import java.util.Arrays; -import java.util.List; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.util.Version; - -import org.springframework.stereotype.Component; - -/** - * Validate that the requested java version is compatible with the chosen Spring Boot - * generation and adapt the request if necessary. - * - * @author Stephane Nicoll - */ -@Component -class JavaVersionRequestPostProcessor extends AbstractProjectRequestPostProcessor { - - private static final Version VERSION_2_0_0_M1 = Version.parse("2.0.0.M1"); - - private static final Version VERSION_2_0_1 = Version.parse("2.0.1.RELEASE"); - - private static final Version VERSION_2_1_0_M1 = Version.parse("2.1.0.M1"); - - private static final List UNSUPPORTED_LANGUAGES = Arrays.asList("groovy", - "kotlin"); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - Integer javaGeneration = determineJavaGeneration(request.getJavaVersion()); - if (javaGeneration == null) { - return; - } - // Not supported for Spring Boot 1.x - if (isSpringBootVersionBefore(request, VERSION_2_0_0_M1)) { - request.setJavaVersion("1.8"); - } - // Not supported for Kotlin & Groovy - if (UNSUPPORTED_LANGUAGES.contains(request.getLanguage())) { - request.setJavaVersion("1.8"); - } - // 10 support only as of 2.0.1 - if (javaGeneration == 10 && isSpringBootVersionBefore(request, VERSION_2_0_1)) { - request.setJavaVersion("1.8"); - } - // 11 support only as of 2.1.x - if (javaGeneration == 11 - && isSpringBootVersionBefore(request, VERSION_2_1_0_M1)) { - request.setJavaVersion("1.8"); - } - } - - private Integer determineJavaGeneration(String javaVersion) { - try { - int generation = Integer.valueOf(javaVersion); - return ((generation > 8 && generation <= 11) ? generation : null); - } - catch (NumberFormatException ex) { - return null; - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessor.java deleted file mode 100644 index ebe00e21..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessor.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.generator.ProjectRequestPostProcessor; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.util.Version; - -import org.springframework.stereotype.Component; - -/** - * A {@link ProjectRequestPostProcessor} that automatically adds "reactor-test" when - * webflux is selected. - * - * @author Stephane Nicoll - */ -@Component -class ReactorTestRequestPostProcessor extends AbstractProjectRequestPostProcessor { - - private static final Version VERSION_2_0_0_M2 = Version.parse("2.0.0.M2"); - - static final Dependency REACTOR_TEST = Dependency.withId("reactor-test", - "io.projectreactor", "reactor-test", null, Dependency.SCOPE_TEST); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - if (hasDependency(request, "webflux") - && isSpringBootVersionAtLeastAfter(request, VERSION_2_0_0_M2)) { - request.getResolvedDependencies().add(REACTOR_TEST); - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessor.java deleted file mode 100644 index 0bb4422c..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.generator.ProjectRequestPostProcessor; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.util.Version; - -import org.springframework.stereotype.Component; - -/** - * A {@link ProjectRequestPostProcessor} that automatically adds {@code spring-batch-test} - * when Spring Batch is selected. - * - * @author Tim Riemer - */ -@Component -class SpringBatchTestRequestPostProcessor extends AbstractProjectRequestPostProcessor { - - private static final Version VERSION_1_3_0 = Version.parse("1.3.0.RELEASE"); - - static final Dependency SPRING_BATCH_TEST = Dependency.withId("spring-batch-test", - "org.springframework.batch", "spring-batch-test", null, - Dependency.SCOPE_TEST); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - if (hasDependency(request, "batch") - && isSpringBootVersionAtLeastAfter(request, VERSION_1_3_0)) { - request.getResolvedDependencies().add(SPRING_BATCH_TEST); - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessor.java deleted file mode 100644 index ad95ff8e..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import java.util.Arrays; -import java.util.List; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.util.Version; - -import org.springframework.stereotype.Component; - -/** - * As of Spring Boot 2.0, Java8 is mandatory so this extension makes sure that the java - * version is forced. - * - * @author Stephane Nicoll - */ -@Component -class SpringBoot2RequestPostProcessor extends AbstractProjectRequestPostProcessor { - - private static final Version VERSION_2_0_0_M1 = Version.parse("2.0.0.M1"); - - private static final List VALID_VERSIONS = Arrays.asList("1.8", "9", "10", - "11"); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - if (!VALID_VERSIONS.contains(request.getJavaVersion()) - && isSpringBootVersionAtLeastAfter(request, VERSION_2_0_0_M1)) { - request.setJavaVersion("1.8"); - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessor.java deleted file mode 100644 index a70c5cbe..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessor.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import java.util.ArrayList; -import java.util.List; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.util.Version; - -import org.springframework.stereotype.Component; - -/** - * Determine the appropriate Spring Cloud function dependency according to the messaging - * and/or platform dependencies requested. - * - * @author Dave Syer - * @author Stephane Nicoll - */ -@Component -class SpringCloudFunctionRequestPostProcessor - extends AbstractProjectRequestPostProcessor { - - static final Dependency SCS_ADAPTER = Dependency.withId("cloud-function-stream", - "org.springframework.cloud", "spring-cloud-function-stream"); - - static final Dependency WEB_ADAPTER = Dependency.withId("cloud-function-web", - "org.springframework.cloud", "spring-cloud-function-web"); - - static final Version VERSION_2_1_0_M1 = Version.parse("2.1.0.M1"); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - Dependency cloudFunction = getDependency(request, "cloud-function"); - if (cloudFunction != null) { - List swap = new ArrayList<>(); - if ((hasDependency(request, "cloud-stream") - || hasDependency(request, "reactive-cloud-stream")) - && isSpringBootVersionBefore(request, VERSION_2_1_0_M1)) { - swap.add(SCS_ADAPTER); - } - if (hasDependency(request, "web")) { - swap.add(WEB_ADAPTER); - } - if (hasDependency(request, "webflux") - && isSpringBootVersionAtLeastAfter(request, VERSION_2_1_0_M1)) { - swap.add(WEB_ADAPTER); - } - if (!swap.isEmpty()) { - request.getResolvedDependencies().remove(cloudFunction); - request.getResolvedDependencies().addAll(swap); - } - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessor.java deleted file mode 100644 index 19abd02a..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessor.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadata; - -import org.springframework.stereotype.Component; - -/** - * Determine the appropriate Spring Cloud stream dependency to use based on the selected - * integration technology. - *

- * Does not replace the integration technology jar by the relevant binder. If more than - * one tech is selected, it is far more easier to remove the unnecessary binder jar than - * to figure out the name of the tech jar to add to keep support for that technology. - * - * @author Stephane Nicoll - */ -@Component -class SpringCloudStreamRequestPostProcessor extends AbstractProjectRequestPostProcessor { - - static final Dependency KAFKA_BINDER = Dependency.withId("cloud-stream-binder-kafka", - "org.springframework.cloud", "spring-cloud-stream-binder-kafka"); - - static final Dependency KAFKA_STREAMS_BINDER = Dependency.withId( - "cloud-stream-binder-kafka-streams", "org.springframework.cloud", - "spring-cloud-stream-binder-kafka-streams"); - - static final Dependency RABBIT_BINDER = Dependency.withId( - "cloud-stream-binder-rabbit", "org.springframework.cloud", - "spring-cloud-stream-binder-rabbit"); - - static final Dependency SCS_TEST = Dependency.withId("cloud-stream-test", - "org.springframework.cloud", "spring-cloud-stream-test-support", null, - Dependency.SCOPE_TEST); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - boolean hasSpringCloudStream = hasDependency(request, "cloud-stream"); - boolean hasReactiveSpringCloudStream = hasDependency(request, - "reactive-cloud-stream"); - boolean hasSpringCloudBus = hasDependency(request, "cloud-bus"); - boolean hasSpringCloudTurbineStream = hasDependency(request, - "cloud-turbine-stream"); - if (hasSpringCloudStream || hasReactiveSpringCloudStream || hasSpringCloudBus - || hasSpringCloudTurbineStream) { - if (hasDependencies(request, "amqp")) { - request.getResolvedDependencies().add(RABBIT_BINDER); - } - if (hasDependencies(request, "kafka")) { - request.getResolvedDependencies().add(KAFKA_BINDER); - } - } - // Spring Cloud Stream specific - if (hasSpringCloudStream || hasReactiveSpringCloudStream) { - if (hasDependencies(request, "kafka-streams")) { - request.getResolvedDependencies().add(KAFKA_STREAMS_BINDER); - } - request.getResolvedDependencies().add(SCS_TEST); - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessor.java deleted file mode 100644 index b1c1622f..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.generator.ProjectRequestPostProcessor; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.util.Version; - -import org.springframework.stereotype.Component; - -/** - * A {@link ProjectRequestPostProcessor} that automatically adds - * {@code spring-security-test} when Spring Security is selected. - * - * @author Stephane Nicoll - */ -@Component -class SpringSecurityTestRequestPostProcessor extends AbstractProjectRequestPostProcessor { - - private static final Version VERSION_1_3_0 = Version.parse("1.3.0.RELEASE"); - - static final Dependency SPRING_SECURITY_TEST = Dependency.withId("security-test", - "org.springframework.security", "spring-security-test", null, - Dependency.SCOPE_TEST); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - if (hasDependency(request, "security") - && isSpringBootVersionAtLeastAfter(request, VERSION_1_3_0)) { - request.getResolvedDependencies().add(SPRING_SECURITY_TEST); - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessor.java b/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessor.java deleted file mode 100644 index 28d71cf6..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessor.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import java.util.ArrayList; -import java.util.List; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.generator.ProjectRequestPostProcessor; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.util.Version; - -import org.springframework.stereotype.Component; - -/** - * A {@link ProjectRequestPostProcessor} that provides explicit handling for the modules - * introduced in Spring Session 2. - * - * @author Stephane Nicoll - */ -@Component -class SpringSessionRequestPostProcessor extends AbstractProjectRequestPostProcessor { - - private static final Version VERSION_2_0_0_M3 = Version.parse("2.0.0.M3"); - - static final Dependency REDIS = Dependency.withId("session-data-redis", - "org.springframework.session", "spring-session-data-redis"); - - static final Dependency JDBC = Dependency.withId("session-jdbc", - "org.springframework.session", "spring-session-jdbc"); - - @Override - public void postProcessAfterResolution(ProjectRequest request, - InitializrMetadata metadata) { - if (isSpringBootVersionAtLeastAfter(request, VERSION_2_0_0_M3)) { - swapSpringSessionDependency(request); - } - } - - private void swapSpringSessionDependency(ProjectRequest request) { - Dependency session = getDependency(request, "session"); - if (session != null) { - List swap = new ArrayList<>(); - if (hasDependency(request, "data-redis") - || hasDependency(request, "data-redis-reactive")) { - swap.add(REDIS); - } - if (hasDependency(request, "jdbc")) { - swap.add(JDBC); - } - if (!swap.isEmpty()) { - request.getResolvedDependencies().remove(session); - request.getResolvedDependencies().addAll(swap); - } - } - } - -} diff --git a/initializr-service/src/main/java/io/spring/initializr/service/info/CloudFoundryInfoContributor.java b/initializr-service/src/main/java/io/spring/initializr/service/info/CloudFoundryInfoContributor.java deleted file mode 100644 index fa9f971f..00000000 --- a/initializr-service/src/main/java/io/spring/initializr/service/info/CloudFoundryInfoContributor.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2012-2017 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.info; - -import java.util.LinkedHashMap; -import java.util.Map; - -import org.springframework.boot.actuate.info.Info; -import org.springframework.boot.actuate.info.InfoContributor; -import org.springframework.core.env.Environment; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; - -/** - * An {@link InfoContributor} that exposes the name of the app. Useful in a blue/green - * deployment scenario as the name of the app provides a hint to that. - * - * @author Stephane Nicoll - */ -@Component -public class CloudFoundryInfoContributor implements InfoContributor { - - private final Environment environment; - - public CloudFoundryInfoContributor(Environment environment) { - this.environment = environment; - } - - @Override - public void contribute(Info.Builder builder) { - String applicationName = this.environment.getProperty("vcap.application.name"); - if (StringUtils.hasText(applicationName)) { - Map details = new LinkedHashMap<>(); - details.put("name", applicationName); - builder.withDetail("app", details); - } - } - -} diff --git a/initializr-service/src/main/resources/application.yml b/initializr-service/src/main/resources/application.yml deleted file mode 100644 index d43b534a..00000000 --- a/initializr-service/src/main/resources/application.yml +++ /dev/null @@ -1,1395 +0,0 @@ -local: - gcp: - version: 1.1.0.M2 - -logging: - level: - org.springframework.core.env: warn - org.springframework.jndi: warn - -server: - compression: - enabled: true - mime-types: application/json,text/css,text/html - min-response-size: 2048 - use-forward-headers: true - -spring: - jackson: - serialization: - write-dates-as-timestamps: false - resources: - chain: - strategy: - content: - enabled: true - task: - execution: - thread-name-prefix: initializr- - -initializr: - env: - boms: - azure: - groupId: com.microsoft.azure - artifactId: azure-spring-boot-bom - versionProperty: azure.version - mappings: - - versionRange: "[1.5.4.RELEASE,2.0.0.RELEASE)" - version: 0.2.4 - - versionRange: "2.0.0.RELEASE" - version: 2.0.5 - codecentric-spring-boot-admin: - groupId: de.codecentric - artifactId: spring-boot-admin-dependencies - versionProperty: spring-boot-admin.version - mappings: - - versionRange: "[1.5.9.RELEASE,2.0.0.M1)" - version: 1.5.7 - - versionRange: "[2.0.0.M1,2.1.0.M1)" - version: 2.0.4 - - versionRange: "2.1.0.M1" - version: 2.1.0 - keycloak: - groupId: org.keycloak.bom - artifactId: keycloak-adapter-bom - versionProperty: keycloak.version - mappings: - - versionRange : "[1.5.3.RELEASE,2.0.0.M1)" - version: 3.4.2.Final - - versionRange : "2.0.0.M1" - version: 4.5.0.Final - spring-cloud: - groupId: org.springframework.cloud - artifactId: spring-cloud-dependencies - versionProperty: spring-cloud.version - order: 50 - mappings: - - versionRange: "[1.2.3.RELEASE,1.3.0.RELEASE)" - version: Angel.SR6 - - versionRange: "[1.3.0.RELEASE,1.4.0.RELEASE)" - version: Brixton.SR7 - - versionRange: "[1.4.0.RELEASE,1.4.x.RELEASE]" - version: Camden.SR7 - - versionRange: "[1.5.0.RELEASE,1.5.x.RELEASE]" - version: Edgware.SR5 - - versionRange: "[1.5.x.BUILD-SNAPSHOT,2.0.0.M1)" - version: Edgware.BUILD-SNAPSHOT - repositories: spring-snapshots,spring-milestones - - versionRange: "[2.0.0.M3, 2.0.0.M5)" - version: Finchley.M2 - repositories: spring-milestones - - versionRange: "[2.0.0.M5, 2.0.0.M5]" - version: Finchley.M3 - repositories: spring-milestones - - versionRange: "[2.0.0.M6, 2.0.0.M6]" - version: Finchley.M4 - repositories: spring-milestones - - versionRange: "[2.0.0.M7, 2.0.0.M7]" - version: Finchley.M5 - repositories: spring-milestones - - versionRange: "[2.0.0.RC1, 2.0.0.RC1]" - version: Finchley.M6 - repositories: spring-milestones - - versionRange: "[2.0.0.RC2,2.0.0.RC2]" - version: Finchley.M7 - repositories: spring-milestones - - versionRange: "[2.0.0.RELEASE,2.0.0.RELEASE]" - version: Finchley.M9 - repositories: spring-milestones - - versionRange: "[2.0.1.RELEASE,2.0.2.RELEASE)" - version: Finchley.RC1 - repositories: spring-milestones - - versionRange: "[2.0.2.RELEASE,2.0.3.RELEASE)" - version: Finchley.RC2 - repositories: spring-milestones - - versionRange: "[2.0.3.RELEASE,2.0.x.BUILD-SNAPSHOT)" - version: Finchley.SR2 - - versionRange: "[2.0.x.BUILD-SNAPSHOT,2.1.0.M3)" - version: Finchley.BUILD-SNAPSHOT - repositories: spring-snapshots,spring-milestones - - versionRange: "[2.1.0.M3,2.1.x.BUILD-SNAPSHOT)" - version: Greenwich.M1 - repositories: spring-milestones - - versionRange: "2.1.x.BUILD-SNAPSHOT" - version: Greenwich.BUILD-SNAPSHOT - repositories: spring-snapshots,spring-milestones - spring-cloud-gcp: - groupId: org.springframework.cloud - artifactId: spring-cloud-gcp-dependencies - versionProperty: spring-cloud-gcp.version - additionalBoms: [spring-cloud] - mappings: - - versionRange: "[2.0.0.RELEASE,2.1.0.M1)" - version: 1.0.0.RELEASE - - versionRange: "2.1.0.M1" - version: ${local.gcp.version} - repositories: spring-milestones - spring-cloud-services: - groupId: io.pivotal.spring.cloud - artifactId: spring-cloud-services-dependencies - versionProperty: spring-cloud-services.version - additionalBoms: [spring-cloud] - mappings: - - versionRange: "[1.3.0.RELEASE,1.4.0.RELEASE)" - version: 1.2.1.RELEASE - - versionRange: "[1.4.0.RELEASE,1.4.x.RELEASE]" - version: 1.5.0.RELEASE - - versionRange: "[1.5.0.RELEASE,1.5.x.BUILD-SNAPSHOT]" - version: 1.6.6.RELEASE - - versionRange: "2.0.0.RELEASE" - version: 2.0.2.RELEASE - spring-cloud-task: - groupId: org.springframework.cloud - artifactId: spring-cloud-task-dependencies - versionProperty: spring-cloud-task.version - order: 30 - mappings: - - versionRange: "[1.3.0.RELEASE, 1.4.0.RELEASE]" - version: 1.0.3.RELEASE - - versionRange: "[1.4.0.RELEASE, 1.5.0.RC1)" - version: 1.1.2.RELEASE - - versionRange: "[1.5.0.RC1, 2.0.0.M1)" - version: 1.2.3.RELEASE - - versionRange: "[2.0.0.M2, 2.0.0.RELEASE)" - version: 2.0.0.M3 - repositories: spring-milestones - - versionRange: "2.0.0.RELEASE" - version: 2.0.0.RELEASE - spring-statemachine: - groupId: org.springframework.statemachine - artifactId: spring-statemachine-bom - versionProperty: spring-statemachine.version - mappings: - - versionRange: "[2.0.0.RC1,2.0.0.RC1]" - version: 2.0.0.M4 - repositories: spring-milestones - - versionRange: "[2.0.0.RC2,2.0.0.RC2]" - version: 2.0.0.M5 - repositories: spring-milestones - - versionRange: "2.0.0.RELEASE" - version: 2.0.1.RELEASE - vaadin: - groupId: com.vaadin - artifactId: vaadin-bom - versionProperty: vaadin.version - mappings: - - versionRange: "[1.3.0.RELEASE, 1.5.0.M1)" - version: 7.7.7 - - versionRange: "[1.5.0.M1,2.0.0.M1)" - version: 8.4.4 - - versionRange: "2.0.0.M1" - version: 10.0.5 - gradle: - dependency-management-plugin-version: 0.6.0.RELEASE - kotlin: - default-version: 1.2.70 - mappings: - - versionRange: "[1.5.0.RELEASE,2.1.0.M1)" - version: 1.2.51 - repositories: - sonatype-snapshots: - name: Sonatype Snapshots - url: https://oss.sonatype.org/content/repositories/snapshots/ - snapshotsEnabled: true - dependencies: - - name: Core - content: - - name: DevTools - id: devtools - groupId: org.springframework.boot - artifactId: spring-boot-devtools - scope: runtime - description: Spring Boot Development Tools - versionRange: 1.3.0.RELEASE - starter: false - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#using-boot-devtools - - name: Security - id: security - description: Secure your application via spring-security - weight: 100 - links: - - rel: guide - href: https://spring.io/guides/gs/securing-web/ - description: Securing a Web Application - - rel: guide - href: https://spring.io/guides/tutorials/spring-boot-oauth2/ - description: Spring Boot and OAuth2 - - rel: guide - href: https://spring.io/guides/gs/authenticating-ldap/ - description: Authenticating a User with LDAP - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-security - - name: Lombok - id: lombok - groupId: org.projectlombok - artifactId: lombok - scope: compileOnly - description: Java annotation library which helps to reduce boilerplate code and code faster - mappings: - - versionRange: "[1.2.0.RELEASE,1.4.0.M1)" - version: 1.16.6 - starter: false - - name: Configuration Processor - id: configuration-processor - groupId: org.springframework.boot - artifactId: spring-boot-configuration-processor - scope: compileOnly - description: Generate metadata for your custom configuration keys - versionRange: 1.2.0.RELEASE - starter: false - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#configuration-metadata-annotation-processor - - name: Session - id: session - groupId: org.springframework.session - artifactId: spring-session-core - description: API and implementations for managing a user’s session information - versionRange: "1.3.0.RELEASE" - starter: false - mappings: - - versionRange: "[1.3.0.RELEASE,2.0.0.M2]" - artifactId: spring-session - - name: Cache - id: cache - description: Spring's Cache abstraction - versionRange: 1.3.0.RELEASE - links: - - rel: guide - href: https://spring.io/guides/gs/caching/ - description: Caching Data with Spring - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-caching - - name: Validation - id: validation - description: JSR-303 validation infrastructure (already included with web) - versionRange: 1.3.0.RELEASE - links: - - rel: guide - href: https://spring.io/guides/gs/validating-form-input/ - title: Validating Form Input - - name: Retry - id: retry - groupId: org.springframework.retry - artifactId: spring-retry - description: Provide declarative retry support via spring-retry - versionRange: 1.3.0.RELEASE - starter: false - - name: Aspects - id: aop - description: Create your own Aspects using Spring AOP and AspectJ - - name: Web - content: - - name: Web - id: web - description: Full-stack web development with Tomcat and Spring MVC - weight: 100 - facets: - - web - - json - links: - - rel: guide - href: https://spring.io/guides/gs/rest-service/ - description: Building a RESTful Web Service - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-developing-web-applications - - rel: guide - href: https://spring.io/guides/gs/serving-web-content/ - description: Serving Web Content with Spring MVC - - rel: guide - href: https://spring.io/guides/tutorials/bookmarks/ - description: Building REST services with Spring - - name: Reactive Web - id: webflux - versionRange: 2.0.0.M1 - description: Reactive web development with Netty and Spring WebFlux - weight: 90 - facets: - - json - - name: Rest Repositories - id: data-rest - weight: 10 - facets: - - json - description: Exposing Spring Data repositories over REST via spring-data-rest-webmvc - links: - - rel: guide - href: https://spring.io/guides/gs/accessing-data-rest/ - description: Accessing JPA Data with REST - - rel: guide - href: https://spring.io/guides/gs/accessing-neo4j-data-rest/ - description: Accessing Neo4j Data with REST - - rel: guide - href: https://spring.io/guides/gs/accessing-mongodb-data-rest/ - description: Accessing MongoDB Data with REST - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#howto-use-exposing-spring-data-repositories-rest-endpoint - - name: Rest Repositories HAL Browser - id: data-rest-hal - description: Browsing Spring Data REST repositories in your browser - groupId: org.springframework.data - artifactId: spring-data-rest-hal-browser - versionRange: 1.3.0.RELEASE - - name: HATEOAS - id: hateoas - description: HATEOAS-based RESTful services - versionRange: 1.2.2.RELEASE - links: - - rel: guide - href: https://spring.io/guides/gs/rest-hateoas/ - description: Building a Hypermedia-Driven RESTful Web Service - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-spring-hateoas - starter: false - - name: Web Services - id: web-services - description: Contract-first SOAP service development with Spring Web Services - aliases: - - ws - mappings: - - versionRange: 1.4.0.M3 - artifactId: spring-boot-starter-web-services - - versionRange: "[1.1.0.RELEASE,1.4.0.M3)" - artifactId: spring-boot-starter-ws - links: - - rel: guide - href: https://spring.io/guides/gs/producing-web-service/ - description: Producing a SOAP web service - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-webservices - - name: Jersey (JAX-RS) - id: jersey - description: RESTful Web Services framework with support of JAX-RS - facets: - - json - versionRange: 1.2.0.RELEASE - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-jersey - - name: Websocket - id: websocket - description: Websocket development with SockJS and STOMP - links: - - rel: guide - href: https://spring.io/guides/gs/messaging-stomp-websocket/ - description: Using WebSocket to build an interactive web application - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-websockets - - name: REST Docs - id: restdocs - description: Document RESTful services by combining hand-written and auto-generated documentation - groupId: org.springframework.restdocs - artifactId: spring-restdocs-mockmvc - mappings: - - versionRange: "[1.2.0.RELEASE,1.3.0.RC1)" - version: 1.0.1.RELEASE - scope: test - - name: Vaadin - id: vaadin - facets: - - web - groupId: com.vaadin - artifactId: vaadin-spring-boot-starter - description: Vaadin java web application framework - bom: vaadin - versionRange: "[1.2.0.RELEASE,2.1.0.M1)" - mappings: - - versionRange: "[1.2.0.RELEASE,1.4.0.RELEASE)" - version: 1.0.2 - - versionRange: "[1.4.0.RELEASE,1.5.0.M1)" - version: 1.2.0 - links: - - rel: guide - href: https://spring.io/guides/gs/crud-with-vaadin/ - description: Creating CRUD UI with Vaadin - - rel: reference - href: https://vaadin.com/spring - - name: Apache CXF (JAX-RS) - id: cxf-jaxrs - groupId: org.apache.cxf - artifactId: cxf-spring-boot-starter-jaxrs - version: 3.2.5 - description: RESTful Web Services framework with support of JAX-RS - versionRange: "[1.4.0.RELEASE,2.1.0.M1)" - links: - - rel: reference - href: https://cxf.apache.org/docs/springboot.html#SpringBoot-SpringBootCXFJAX-RSStarter - - name: Ratpack - id: ratpack - description: Spring Boot integration for the Ratpack framework - groupId: io.ratpack - artifactId: ratpack-spring-boot - version: 1.1.1 - versionRange: "[1.2.0.RELEASE,2.0.0.M1)" - starter: false - - name: Mobile - id: mobile - description: Simplify the development of mobile web applications with spring-mobile - versionRange : "[1.0.0.RELEASE, 2.0.0.M1)" - - name: Keycloak - id: keycloak - description: Keycloak integration, an open source Identity and Access Management solution. - groupId: org.keycloak - artifactId: keycloak-spring-boot-starter - versionRange: "[1.5.3.RELEASE,2.1.0.M1)" - bom: keycloak - links: - - rel: reference - href: https://keycloak.gitbooks.io/documentation/securing_apps/topics/oidc/java/spring-boot-adapter.html - - name: Template Engines - content: - - name: Thymeleaf - id: thymeleaf - description: Thymeleaf templating engine - weight: 90 - keywords: - - template - links: - - rel: guide - href: https://spring.io/guides/gs/handling-form-submission/ - description: Handling Form Submission - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-spring-mvc-template-engines - - name: Freemarker - id: freemarker - description: FreeMarker templating engine - keywords: - - template - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-spring-mvc-template-engines - - name: Mustache - id: mustache - description: Mustache templating engine - versionRange: 1.2.2.RELEASE - keywords: - - template - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-spring-mvc-template-engines - - name: Groovy Templates - id: groovy-templates - description: Groovy templating engine - facets: - - web - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-spring-mvc-template-engines - - name: SQL - content: - - name: JPA - id: data-jpa - description: Java Persistence API including spring-data-jpa, spring-orm and Hibernate - weight: 100 - facets: - - jpa - aliases: - - jpa - links: - - rel: guide - href: https://spring.io/guides/gs/accessing-data-jpa/ - description: Accessing Data with JPA - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-jpa-and-spring-data - - name: MySQL - id: mysql - description: MySQL JDBC driver - groupId: mysql - artifactId: mysql-connector-java - scope: runtime - starter: false - links: - - rel: guide - href: https://spring.io/guides/gs/accessing-data-mysql/ - description: Accessing data with MySQL - - name: H2 - id: h2 - description: H2 database (with embedded support) - groupId: com.h2database - artifactId: h2 - scope: runtime - starter: false - - name: JDBC - id: jdbc - description: JDBC databases - links: - - rel: guide - href: https://spring.io/guides/gs/relational-data-access/ - description: Accessing Relational Data using JDBC with Spring - - rel: guide - href: https://spring.io/guides/gs/managing-transactions/ - description: Managing Transactions - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-sql - - name: MyBatis - id: mybatis - description: Persistence support using MyBatis - links: - - rel: guide - href: https://github.com/mybatis/spring-boot-starter/wiki/Quick-Start - description: Quick Start - - rel: reference - href: http://www.mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/ - groupId: org.mybatis.spring.boot - artifactId: mybatis-spring-boot-starter - mappings: - - versionRange: "[1.3.0.RELEASE,1.4.0.RELEASE)" - version: 1.1.1 - - versionRange: "[1.4.0.RELEASE,1.5.0.RELEASE)" - version: 1.2.2 - - versionRange: 1.5.0.RELEASE - version: 1.3.2 - - name: PostgreSQL - id: postgresql - description: PostgreSQL JDBC driver - groupId: org.postgresql - artifactId: postgresql - mappings: - - versionRange: "[1.2.0.RELEASE,1.3.0.M1)" - version: 9.4-1201-jdbc41 - scope: runtime - starter: false - - name: SQL Server - id: sqlserver - description: Microsoft SQL Server JDBC driver - versionRange: 1.5.0.RC1 - groupId: com.microsoft.sqlserver - artifactId: mssql-jdbc - scope: runtime - starter: false - - name: HSQLDB - id: hsql - description: HSQLDB database (with embedded support) - groupId: org.hsqldb - artifactId: hsqldb - scope: runtime - starter: false - - name: Apache Derby - id: derby - description: Apache Derby database (with embedded support) - groupId: org.apache.derby - artifactId: derby - scope: runtime - versionRange: 1.2.2.RELEASE - starter: false - - name: Liquibase - id: liquibase - description: Liquibase Database Migrations library - groupId: org.liquibase - artifactId: liquibase-core - starter: false - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#howto-execute-liquibase-database-migrations-on-startup - - name: Flyway - id: flyway - description: Flyway Database Migrations library - groupId: org.flywaydb - artifactId: flyway-core - starter: false - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#howto-execute-flyway-database-migrations-on-startup - - name: JOOQ - id: jooq - description: Persistence support using Java Object Oriented Querying - versionRange: 1.3.0.RELEASE - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-jooq - - name: NoSQL - content: - - name: Redis - id: data-redis - description: Redis key-value data store, including spring-data-redis - aliases: - - redis - mappings: - - versionRange: 1.4.0.M1 - artifactId: spring-boot-starter-data-redis - - versionRange: "[1.1.5.RELEASE,1.4.0.M1)" - artifactId: spring-boot-starter-redis - links: - - rel: guide - href: https://spring.io/guides/gs/messaging-redis/ - description: Messaging with Redis - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-redis - - name: Reactive Redis - id: data-redis-reactive - description: Redis key-value data store, including spring-data-redis - versionRange: 2.0.0.M7 - links: - - rel: guide - href: https://spring.io/guides/gs/messaging-redis/ - description: Messaging with Redis - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-redis - - name: MongoDB - id: data-mongodb - description: MongoDB NoSQL Database, including spring-data-mongodb - weight: 50 - links: - - rel: guide - href: https://spring.io/guides/gs/accessing-data-mongodb/ - description: Accessing Data with MongoDB - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-mongodb - - name: Reactive MongoDB - id: data-mongodb-reactive - description: MongoDB NoSQL Database, including spring-data-mongodb and the reactive driver - versionRange: 2.0.0.M1 - weight: 50 - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-mongodb - - name: Embedded MongoDB - id: flapdoodle-mongo - description: Embedded MongoDB for testing - versionRange: 1.3.0.RELEASE - groupId: de.flapdoodle.embed - artifactId: de.flapdoodle.embed.mongo - scope: test - starter: false - - name: Elasticsearch - id: data-elasticsearch - description: Elasticsearch search and analytics engine including spring-data-elasticsearch - weight: 10 - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-elasticsearch - - name: Solr - id: data-solr - description: Apache Solr search platform, including spring-data-solr - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-solr - - name: Cassandra - id: data-cassandra - description: Cassandra NoSQL Database, including spring-data-cassandra - versionRange: 1.3.0.RC1 - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-cassandra - - name: Reactive Cassandra - id: data-cassandra-reactive - description: Cassandra NoSQL Database, including spring-data-cassandra and the reactive driver - versionRange: 2.0.0.M1 - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-cassandra - - name: Couchbase - id: data-couchbase - description: Couchbase NoSQL database, including spring-data-couchbase - versionRange: 1.4.0.RELEASE - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-couchbase - - name: Reactive Couchbase - id: data-couchbase-reactive - description: Couchbase NoSQL database, including spring-data-couchbase and the reactive driver - versionRange: 2.0.0.M7 - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-couchbase - - name: Neo4j - id: data-neo4j - description: Neo4j NoSQL graph database, including spring-data-neo4j - versionRange: 1.4.0.RELEASE - links: - - rel: guide - href: https://spring.io/guides/gs/accessing-data-neo4j/ - description: Accessing Data with Neo4j - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-neo4j - - name: Gemfire - id: data-gemfire - description: GemFire distributed data store including spring-data-gemfire - versionRange: "[1.1.0.RELEASE,2.0.0.M1)" - links: - - rel: guide - href: https://spring.io/guides/gs/accessing-data-gemfire/ - description: Accessing Data with GemFire - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-gemfire - - name: Integration - content: - - name: Spring Integration - id: integration - description: Common spring-integration modules - weight: 100 - links: - - rel: guide - href: https://spring.io/guides/gs/integration/ - description: Integrating Data - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-integration - - name: RabbitMQ - id: amqp - description: Advanced Message Queuing Protocol via spring-rabbit - weight: 100 - keywords: - - messaging - links: - - rel: guide - href: https://spring.io/guides/gs/messaging-rabbitmq/ - description: Messaging with RabbitMQ - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-amqp - - name: Kafka - id: kafka - weight: 100 - description: Kafka messaging support using Spring Kafka - versionRange: 1.5.0.RC1 - groupId: org.springframework.kafka - artifactId: spring-kafka - starter: false - keywords: - - messaging - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-kafka - - name: Kafka Streams - id: kafka-streams - weight: 90 - description: Support for building stream processing applications with Apache Kafka Streams - versionRange: 2.0.0.RELEASE - groupId: org.apache.kafka - artifactId: kafka-streams - starter: false - links: - - rel: guide - href: https://github.com/spring-cloud/spring-cloud-stream-samples/tree/master/kafka-streams-samples - description: Samples for using Kafka Streams with Spring Cloud stream - - rel: reference - href: https://docs.spring.io/spring-kafka/docs/current/reference/html/_reference.html#kafka-streams - description: Kafka Streams Support in Spring Kafka - - rel: reference - href: https://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/#_kafka_streams_binding_capabilities_of_spring_cloud_stream - description: Kafka Streams Binding Capabilities of Spring Cloud Stream - - name: JMS (ActiveMQ) - id: activemq - description: Java Message Service API via Apache ActiveMQ - versionRange: 1.4.0.RC1 - links: - - rel: guide - href: https://spring.io/guides/gs/messaging-jms/ - description: Messaging with JMS - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-activemq - - name: JMS (Artemis) - id: artemis - description: Java Message Service API via Apache Artemis - versionRange: 1.3.0.RELEASE - links: - - rel: guide - href: https://spring.io/guides/gs/messaging-jms/ - description: Messaging with JMS - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-artemis - - name: Cloud Core - bom: spring-cloud - versionRange: 1.2.3.RELEASE - content: - - name: Cloud Bootstrap - id: cloud-starter - description: spring-cloud-context (e.g. Bootstrap context and @RefreshScope) - groupId: org.springframework.cloud - artifactId: spring-cloud-starter - weight: 100 - - name: Cloud Function - id: cloud-function - groupId: org.springframework.cloud - artifactId: spring-cloud-function-context - description: Functions as Spring Beans - versionRange: 2.0.2.RELEASE - links: - - rel: reference - href: https://cloud.spring.io/spring-cloud-function/ - - rel: sample - href: https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-samples - description: Various sample apps using Spring Cloud Function - - name: Cloud Security - id: cloud-security - description: Secure load balancing and routing with spring-cloud-security - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-security - - name: Cloud OAuth2 - id: cloud-oauth2 - description: OAuth2 and distributed application patterns with spring-cloud-security - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-oauth2 - - name: Cloud Task - id: cloud-task - description: Task result tracking and integration with Spring Batch - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-task - versionRange: "1.3.0.RELEASE" - bom: spring-cloud-task - starter: false - mappings: - - versionRange: "[1.3.0.RELEASE,1.3.x.RELEASE]" - artifactId: spring-cloud-task-starter - - versionRange: "1.4.0.RELEASE" - - name: Cloud Support - content: - - name: Cloud Connectors - id: cloud-connectors - description: Simplifies connecting to services in cloud platforms, including spring-cloud-connector and spring-cloud-cloudfoundry-connector - versionRange: 1.2.0.RELEASE - - name: Open Service Broker - id: open-service-broker - description: Create service brokers that conform to the Open Server Broker API specification - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-open-service-broker-webmvc - versionRange: 2.0.0.RELEASE - version: 2.0.1.RELEASE - links: - - rel: reference - href: https://docs.spring.io/spring-cloud-open-service-broker/docs/current/reference/html5/ - - rel: guide - href: https://github.com/spring-cloud-samples/bookstore-service-broker - description: Using Spring Cloud Open Service Broker - - name: Cloud Config - bom: spring-cloud - versionRange: 1.2.3.RELEASE - content: - - name: Config Client - id: cloud-config-client - description: spring-cloud-config Client - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-config - weight: 100 - - name: Config Server - id: cloud-config-server - description: Central management for configuration via a git or svn backend - groupId: org.springframework.cloud - artifactId: spring-cloud-config-server - links: - - rel: guide - href: https://spring.io/guides/gs/centralized-configuration/ - description: Centralized Configuration - - name: Vault Configuration - id: cloud-starter-vault-config - description: Configuration management with HashiCorp Vault - versionRange: 1.5.3.RELEASE - starter: false - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-vault-config - - name: Zookeeper Configuration - id: cloud-starter-zookeeper-config - description: Configuration management with Zookeeper and spring-cloud-zookeeper-config - versionRange: 1.3.0.RELEASE - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-zookeeper-config - - name: Consul Configuration - id: cloud-starter-consul-config - description: Configuration management with Hashicorp Consul - versionRange: 1.3.0.RELEASE - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-consul-config - - name: Cloud Discovery - bom: spring-cloud - versionRange: 1.2.3.RELEASE - content: - - name: Eureka Discovery - id: cloud-eureka - description: Service discovery using spring-cloud-netflix and Eureka - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-eureka-client - weight: 100 - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-eureka - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Eureka Server - id: cloud-eureka-server - description: spring-cloud-netflix Eureka Server - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-eureka-server - links: - - rel: guide - href: https://spring.io/guides/gs/service-registration-and-discovery/ - description: Service Registration and Discovery - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-eureka-server - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Zookeeper Discovery - id: cloud-starter-zookeeper-discovery - description: Service discovery with Zookeeper and spring-cloud-zookeeper-discovery - versionRange: 1.3.0.RELEASE - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-zookeeper-discovery - - name: Cloud Foundry Discovery - id: cloud-cloudfoundry-discovery - description: Service discovery with Cloud Foundry - versionRange: 1.3.0.RELEASE - groupId: org.springframework.cloud - artifactId: spring-cloud-cloudfoundry-discovery - - name: Consul Discovery - id: cloud-starter-consul-discovery - description: Service discovery with Hashicorp Consul - versionRange: 1.3.0.RELEASE - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-consul-discovery - - name: Cloud Routing - bom: spring-cloud - versionRange: 1.2.3.RELEASE - content: - - name: Zuul - id: cloud-zuul - description: Intelligent and programmable routing with spring-cloud-netflix Zuul - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-zuul - links: - - rel: guide - href: https://spring.io/guides/gs/routing-and-filtering/ - description: Routing and Filtering - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-zuul - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Gateway - id: cloud-gateway - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-gateway - description: Intelligent and programmable routing with the reactive Spring Cloud Gateway - versionRange: 2.0.0.M5 - links: - - rel: guide - href: https://github.com/spring-cloud-samples/spring-cloud-gateway-sample - description: Using Spring Cloud Gateway - - name: Ribbon - id: cloud-ribbon - description: Client side load balancing with spring-cloud-netflix and Ribbon - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-ribbon - links: - - rel: guide - href: https://spring.io/guides/gs/client-side-load-balancing/ - description: Client Side Load Balancing with Ribbon and Spring Cloud - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-ribbon - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Feign - id: cloud-feign - description: Declarative REST clients with spring-cloud-netflix Feign - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-openfeign - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-feign - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Cloud Circuit Breaker - bom: spring-cloud - versionRange: 1.2.3.RELEASE - content: - - name: Hystrix - id: cloud-hystrix - description: Circuit breaker with spring-cloud-netflix Hystrix - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-hystrix - links: - - rel: guide - href: https://spring.io/guides/gs/circuit-breaker/ - description: Circuit Breaker - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-hystrix - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Hystrix Dashboard - id: cloud-hystrix-dashboard - description: Circuit breaker dashboard with spring-cloud-netflix Hystrix - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-hystrix-dashboard - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-hystrix-dashboard - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Turbine - id: cloud-turbine - description: Circuit breaker metric aggregation using spring-cloud-netflix with Turbine and server-sent events - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-turbine - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-turbine - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Turbine Stream - id: cloud-turbine-stream - description: Circuit breaker metric aggregation using spring-cloud-netflix with Turbine and Spring Cloud Stream (requires a binder, e.g. Kafka or RabbitMQ) - versionRange: 1.3.0.RELEASE - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-netflix-turbine-stream - weight: -1 - mappings: - - versionRange: "[1.2.3.RELEASE,1.5.x.RELEASE]" - artifactId: spring-cloud-starter-turbine-stream - - versionRange: "1.5.0.BUILD-SNAPSHOT" - - name: Cloud Tracing - bom: spring-cloud - versionRange: 1.3.0.RELEASE - content: - - name: Sleuth - id: cloud-starter-sleuth - description: Distributed tracing via logs with spring-cloud-sleuth - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-sleuth - - name: Zipkin Client - id: cloud-starter-zipkin - description: Distributed tracing with an existing Zipkin installation and spring-cloud-sleuth-zipkin. Alternatively, consider Sleuth Stream. - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-zipkin - - name: Cloud Messaging - bom: spring-cloud - versionRange: 1.2.3.RELEASE - content: - - name: Cloud Bus - id: cloud-bus - description: A simple control bus using Spring Cloud Stream (requires a binder, e.g. Kafka or RabbitMQ) - groupId: org.springframework.cloud - artifactId: spring-cloud-bus - - name: Cloud Stream - id: cloud-stream - description: Messaging microservices with Spring Cloud Stream (requires a binder, e.g. Kafka or RabbitMQ) - versionRange: 1.3.0.RELEASE - weight: 90 - groupId: org.springframework.cloud - artifactId: spring-cloud-stream - - name: Reactive Cloud Stream - id: reactive-cloud-stream - description: Reactive messaging microservices with Spring Cloud Stream (requires a binder, e.g. Kafka or RabbitMQ) - versionRange: 2.0.0.RC2 - weight: 90 - groupId: org.springframework.cloud - artifactId: spring-cloud-stream-reactive - - name: Cloud AWS - bom: spring-cloud - versionRange: 1.2.3.RELEASE - content: - - name: AWS Core - id: cloud-aws - description: AWS native services from spring-cloud-aws - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-aws - - name: AWS JDBC - id: cloud-aws-jdbc - description: Relational databases on AWS with RDS and spring-cloud-aws-jdbc - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-aws-jdbc - - name: AWS Messaging - id: cloud-aws-messaging - description: Messaging on AWS with SQS and spring-cloud-aws-messaging - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-aws-messaging - - name: Cloud Contract - bom: spring-cloud - versionRange: 1.4.0.RC1 - content: - - name: Cloud Contract Verifier - id: cloud-contract-verifier - description: Test dependencies required for autogenerated tests - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-contract-verifier - scope: test - starter: false - - name: Cloud Contract Stub Runner - id: cloud-contract-stub-runner - description: Stub Runner for HTTP/Messaging based communication. Allows creating WireMock stubs from RestDocs tests - groupId: org.springframework.cloud - artifactId: spring-cloud-starter-contract-stub-runner - scope: test - starter: false - - name: Pivotal Cloud Foundry - bom: spring-cloud-services - versionRange: 1.3.0.RELEASE - content: - - name: Config Client (PCF) - id: scs-config-client - description: Config client on Pivotal Cloud Foundry - groupId: io.pivotal.spring.cloud - artifactId: spring-cloud-services-starter-config-client - - name: Service Registry (PCF) - id: scs-service-registry - description: Eureka service discovery on Pivotal Cloud Foundry - groupId: io.pivotal.spring.cloud - artifactId: spring-cloud-services-starter-service-registry - - name: Circuit Breaker (PCF) - id: scs-circuit-breaker - description: Hystrix circuit breaker on Pivotal Cloud Foundry - groupId: io.pivotal.spring.cloud - artifactId: spring-cloud-services-starter-circuit-breaker - - name: Azure - bom: azure - versionRange: "1.5.4.RELEASE" - content: - - name: Azure Support - id: azure-support - groupId: com.microsoft.azure - artifactId: azure-spring-boot-starter - description: Auto-configuration for Azure Services (service bus, storage, active directory, cosmos DB, key vault and more) - links: - - rel: reference - href: https://github.com/Microsoft/azure-spring-boot/tree/master/azure-spring-boot - description: Reference doc - - name: Azure Active Directory - id: azure-active-directory - groupId: com.microsoft.azure - artifactId: azure-active-directory-spring-boot-starter - description: Spring Security integration with Azure Active Directory for authentication - links: - - rel: guide - href: https://github.com/Microsoft/azure-spring-boot/tree/master/azure-spring-boot-samples/azure-active-directory-spring-boot-sample - description: Using Active Directory - - rel: reference - href: https://github.com/Microsoft/azure-spring-boot/tree/master/azure-spring-boot-starters/azure-active-directory-spring-boot-starter - description: Reference doc - - name: Azure Key Vault - id: azure-keyvault-secrets - groupId: com.microsoft.azure - artifactId: azure-keyvault-secrets-spring-boot-starter - description: Spring value annotation integration with Azure Key Vault Secrets - links: - - rel: guide - href: https://github.com/Microsoft/azure-spring-boot/tree/master/azure-spring-boot-samples/azure-keyvault-secrets-spring-boot-sample - description: Using Key Vault - - rel: reference - href: https://github.com/Microsoft/azure-spring-boot/tree/master/azure-spring-boot-starters/azure-keyvault-secrets-spring-boot-starter - description: Reference doc - - name: Azure Storage - id: azure-storage - groupId: com.microsoft.azure - artifactId: azure-storage-spring-boot-starter - description: Azure Storage service integration - links: - - rel: guide - href: https://github.com/Microsoft/azure-spring-boot/tree/master/azure-spring-boot-samples/azure-storage-spring-boot-sample - description: Using Azure Storage - - rel: reference - href: https://github.com/Microsoft/azure-spring-boot/tree/master/azure-spring-boot-starters/azure-storage-spring-boot-starter - description: Reference doc - - name: Spring Cloud GCP - bom: spring-cloud-gcp - versionRange: 2.0.0.RELEASE - content: - - name: GCP Support - id: cloud-gcp - description: Support for Google Cloud Platform services - groupId: org.springframework.cloud - artifactId: spring-cloud-gcp-starter - links: - - rel: reference - href: https://docs.spring.io/spring-cloud-gcp/docs/${local.gcp.version}/reference/htmlsingle/ - description: Reference doc - - rel: guide - href: https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-samples - description: Samples - - name: GCP Messaging - id: cloud-gcp-pubsub - description: Publish to and subcribe from Google Cloud Pub/Sub topics - groupId: org.springframework.cloud - artifactId: spring-cloud-gcp-starter-pubsub - links: - - rel: reference - href: https://docs.spring.io/spring-cloud-gcp/docs/${local.gcp.version}/reference/htmlsingle/#_spring_cloud_gcp_for_pub_sub - description: Reference doc - - rel: guide - href: https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-samples/spring-cloud-gcp-pubsub-sample - description: Sample - - name: GCP Storage - id: cloud-gcp-storage - description: Access Google Cloud Storage objects - groupId: org.springframework.cloud - artifactId: spring-cloud-gcp-starter-storage - links: - - rel: reference - href: https://docs.spring.io/spring-cloud-gcp/docs/${local.gcp.version}/reference/htmlsingle/#_spring_resources - description: Reference doc - - rel: guide - href: https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-samples/spring-cloud-gcp-storage-resource-sample - description: Sample - - name: I/O - content: - - name: Batch - id: batch - description: Spring Batch support - weight: 100 - links: - - rel: guide - href: https://spring.io/guides/gs/batch-processing/ - description: Creating a Batch Service - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#howto-batch-applications - - name: Mail - id: mail - description: Send email using Java Mail and Spring Framework's JavaMailSender - versionRange: 1.2.0.RC1 - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-email - - name: Apache Camel - id: camel - versionRange: "[1.4.0.RELEASE,2.1.0.M1)" - mappings: - - versionRange: "[1.4.0.RELEASE,1.5.0.RELEASE)" - version: 2.18.5 - - versionRange: "[1.5.0.RELEASE,2.0.0.M1)" - version: 2.21.3 - - versionRange: "2.0.0.M1" - version: 2.22.1 - description: Integration using Apache Camel - groupId: org.apache.camel - artifactId: camel-spring-boot-starter - links: - - rel: guide - href: http://camel.apache.org/spring-boot - description: Using Apache Camel with Spring Boot - - name: LDAP - id: data-ldap - description: LDAP support, including spring-data-ldap - versionRange: 1.5.0.RC1 - links: - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#boot-features-ldap - - name: Quartz Scheduler - id: quartz - versionRange: 2.0.0.M2 - description: Schedule jobs using Quartz - - name: Spring Shell - id: spring-shell - groupId: org.springframework.shell - artifactId: spring-shell-starter - description: Build shell-based clients - version: 2.0.0.RELEASE - versionRange: 1.5.0.RELEASE - repository: spring-milestones - links: - - rel: reference - href: https://docs.spring.io/spring-shell/docs/2.0.0.M2/reference/htmlsingle/ - - name: Statemachine - id: statemachine - groupId: org.springframework.statemachine - artifactId: spring-statemachine-starter - description: Build applications using state machine concepts - versionRange: 2.0.0.RC1 - bom: spring-statemachine - links: - - rel: reference - href: https://docs.spring.io/spring-statemachine/docs/current-SNAPSHOT/reference/htmlsingle/ - - rel: guide - href: https://docs.spring.io/spring-statemachine/docs/current-SNAPSHOT/reference/htmlsingle/#developing-your-first-spring-statemachine-application - description: Developing your first Spring Statemachine application - - name: Ops - content: - - name: Actuator - id: actuator - description: Production ready features to help you monitor and manage your application - links: - - rel: guide - href: https://spring.io/guides/gs/actuator-service/ - description: Building a RESTful Web Service with Spring Boot Actuator - - rel: reference - href: http://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/#production-ready - - name: Spring Boot Admin (Server) - id: codecentric-spring-boot-admin-server - groupId: de.codecentric - artifactId: spring-boot-admin-starter-server - description: An admin interface for Spring Boot applications - versionRange: "1.5.9.RELEASE" - bom: codecentric-spring-boot-admin - links: - - rel: reference - href: http://codecentric.github.io/spring-boot-admin/current/#getting-started - - name: Spring Boot Admin (Client) - id: codecentric-spring-boot-admin-client - groupId: de.codecentric - artifactId: spring-boot-admin-starter-client - description: Register your application with a Spring Boot Admin instance - versionRange: "1.5.9.RELEASE" - bom: codecentric-spring-boot-admin - links: - - rel: reference - href: http://codecentric.github.io/spring-boot-admin/current/#getting-started - - name: Actuator Docs - id: actuator-docs - description: API documentation for the Actuator endpoints - versionRange: "[1.3.0.RELEASE,2.0.0.M1)" - groupId: org.springframework.boot - artifactId: spring-boot-actuator-docs - types: - - name: Maven Project - id: maven-project - description: Generate a Maven based project archive - sts-id: starter.zip - tags: - build: maven - format: project - default: true - action: /starter.zip - - name: Maven POM - id: maven-build - description: Generate a Maven pom.xml - sts-id: pom.xml - tags: - build: maven - format: build - default: false - action: /pom.xml - - name: Gradle Project - id: gradle-project - description: Generate a Gradle based project archive - sts-id: gradle.zip - tags: - build: gradle - format: project - default: false - action: /starter.zip - - name: Gradle Config - id: gradle-build - description: Generate a Gradle build file - sts-id: build.gradle - tags: - build: gradle - format: build - default: false - action: /build.gradle - packagings: - - name: Jar - id: jar - default: true - - name: War - id: war - default: false - javaVersions: - - id: 11 - default: false - - id: 10 - default: false - - id: 1.8 - name: 8 - default: true - languages: - - name: Java - id: java - default: true - - name: Kotlin - id: kotlin - default: false - - name: Groovy - id: groovy - default: false - bootVersions: - - name : Latest SNAPSHOT - id: 1.2.4.BUILD-SNAPSHOT - default: false - - name: 1.2.3 - id: 1.2.3.RELEASE - default: true - - name: 1.1.12 - id: 1.1.12.RELEASE - default: false diff --git a/initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceHttpsTests.java b/initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceHttpsTests.java deleted file mode 100755 index 9d325ef2..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceHttpsTests.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service; - -import java.net.URI; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.core.AutoConfigureCache; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.boot.web.server.LocalServerPort; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Integration tests for {@link InitializrService} that force https. - * - * @author Stephane Nicoll - */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "initializr.env.force-ssl=true") -@AutoConfigureCache -public class InitializrServiceHttpsTests { - - @Autowired - private TestRestTemplate restTemplate; - - @LocalServerPort - private int localPort; - - @Test - public void httpCallRedirectsToHttps() { - RequestEntity request = RequestEntity.get(URI.create("/")) - .accept(MediaType.TEXT_HTML).build(); - ResponseEntity response = this.restTemplate.exchange(request, - String.class); - assertThat(response.getStatusCode()).isEqualTo(HttpStatus.FOUND); - assertThat(response.getHeaders().getLocation()).isEqualTo( - URI.create(String.format("https://localhost:%s/", this.localPort))); - } - - @Test - public void securedProxiedCallDoesNotRedirect() { - RequestEntity request = RequestEntity.get(URI.create("/")) - .header("X-Forwarded-Proto", "https").accept(MediaType.TEXT_HTML).build(); - ResponseEntity response = this.restTemplate.exchange(request, - String.class); - assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceSmokeTests.java b/initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceSmokeTests.java deleted file mode 100755 index 4f709ce2..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/InitializrServiceSmokeTests.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service; - -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; - -import com.fasterxml.jackson.databind.ObjectMapper; -import io.spring.initializr.metadata.InitializrMetadata; -import io.spring.initializr.metadata.InitializrMetadataBuilder; -import io.spring.initializr.metadata.InitializrMetadataProvider; -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.core.AutoConfigureCache; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.core.io.ByteArrayResource; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Basic smoke tests for {@link InitializrService}. - * - * @author Stephane Nicoll - */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) -@AutoConfigureCache -public class InitializrServiceSmokeTests { - - @Autowired - private TestRestTemplate restTemplate; - - @Autowired - private InitializrMetadataProvider metadataProvider; - - @Test - public void metadataCanBeSerialized() throws URISyntaxException, IOException { - RequestEntity request = RequestEntity.get(new URI("/")) - .accept(MediaType.parseMediaType("application/vnd.initializr.v2.1+json")) - .build(); - ResponseEntity response = this.restTemplate.exchange(request, - String.class); - assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); - new ObjectMapper().readTree(response.getBody()); - } - - @Test - public void configurationCanBeSerialized() throws URISyntaxException { - RequestEntity request = RequestEntity.get(new URI("/metadata/config")) - .accept(MediaType.APPLICATION_JSON).build(); - ResponseEntity response = this.restTemplate.exchange(request, - String.class); - assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); - InitializrMetadata actual = InitializrMetadataBuilder.create() - .withInitializrMetadata( - new ByteArrayResource(response.getBody().getBytes())) - .build(); - assertThat(actual).isNotNull(); - InitializrMetadata expected = this.metadataProvider.get(); - assertThat(actual.getDependencies().getAll().size()) - .isEqualTo(expected.getDependencies().getAll().size()); - assertThat(actual.getConfiguration().getEnv().getBoms().size()) - .isEqualTo(expected.getConfiguration().getEnv().getBoms().size()); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/AbstractRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/AbstractRequestPostProcessorTests.java deleted file mode 100755 index 731cfa72..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/AbstractRequestPostProcessorTests.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import java.util.Arrays; - -import io.spring.initializr.generator.ProjectGenerator; -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.generator.ProjectRequestPostProcessor; -import io.spring.initializr.metadata.Dependency; -import io.spring.initializr.metadata.InitializrMetadataProvider; -import io.spring.initializr.test.generator.GradleBuildAssert; -import io.spring.initializr.test.generator.PomAssert; -import org.junit.runner.RunWith; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -/** - * Base test class for {@link ProjectRequestPostProcessor} implementations. - * - * @author Stephane Nicoll - */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest -public abstract class AbstractRequestPostProcessorTests { - - @Autowired - private ProjectGenerator projectGenerator; - - @Autowired - private InitializrMetadataProvider metadataProvider; - - protected Dependency getDependency(String id) { - return this.metadataProvider.get().getDependencies().get(id); - } - - protected PomAssert generateMavenPom(ProjectRequest request) { - request.setType("maven-build"); - String content = new String(this.projectGenerator.generateMavenPom(request)); - return new PomAssert(content); - } - - protected GradleBuildAssert generateGradleBuild(ProjectRequest request) { - request.setType("gradle-build"); - String content = new String(this.projectGenerator.generateGradleBuild(request)); - return new GradleBuildAssert(content); - } - - protected ProjectRequest createProjectRequest(String... styles) { - ProjectRequest request = new ProjectRequest(); - request.initialize(this.metadataProvider.get()); - request.getStyle().addAll(Arrays.asList(styles)); - return request; - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessorTests.java deleted file mode 100755 index b7f87a9d..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/JacksonKotlinRequestPostProcessorTests.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import org.junit.Test; - -/** - * Tests for {@link JacksonKotlinRequestPostProcessor}. - * - * @author Sebastien Deleuze - * @author Stephane Nicoll - */ -public class JacksonKotlinRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void jacksonModuleKotlinIsAdded() { - ProjectRequest request = createProjectRequest("webflux"); - request.setBootVersion("2.0.0.M2"); - request.setLanguage("kotlin"); - generateMavenPom(request).hasSpringBootStarterDependency("webflux") - .hasDependency(JacksonKotlinRequestPostProcessor.JACKSON_KOTLIN) - .hasSpringBootStarterTest() - .hasDependency(ReactorTestRequestPostProcessor.REACTOR_TEST) - .hasDependency("org.jetbrains.kotlin", "kotlin-reflect") - .hasDependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8") - .hasDependenciesCount(6); - } - - @Test - public void jacksonModuleKotlinIsNotAddedWithoutKotlin() { - ProjectRequest request = createProjectRequest("webflux"); - request.setBootVersion("2.0.0.M2"); - generateMavenPom(request).hasSpringBootStarterDependency("webflux") - .hasSpringBootStarterTest() - .hasDependency(ReactorTestRequestPostProcessor.REACTOR_TEST) - .hasDependenciesCount(3); - } - - @Test - public void jacksonModuleKotlinIsNotAddedWithoutJsonFacet() { - ProjectRequest request = createProjectRequest("actuator"); - request.setBootVersion("2.0.0.M2"); - request.setLanguage("kotlin"); - generateMavenPom(request).hasSpringBootStarterDependency("actuator") - .hasSpringBootStarterTest() - .hasDependency("org.jetbrains.kotlin", "kotlin-reflect") - .hasDependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8") - .hasDependenciesCount(4); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessorTests.java deleted file mode 100755 index df62f4b3..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/JavaVersionRequestPostProcessorTests.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import org.junit.Test; - -/** - * Tests for {@link JavaVersionRequestPostProcessor}. - * - * @author Stephane Nicoll - */ -public class JavaVersionRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void java9CannotBeUsedWithSpringBoot1Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("1.5.8.RELEASE"); - request.setJavaVersion("9"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java9CannotBeUsedWithSpringBoot1Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("1.99.99.BUILD-SNAPSHOT"); - request.setJavaVersion("9"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java9CannotBeUsedWithGroovyMaven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.1.RELEASE"); - request.setLanguage("groovy"); - request.setJavaVersion("9"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java9CannotBeUsedWithKotlinMaven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.1.RELEASE"); - request.setLanguage("kotlin"); - request.setJavaVersion("9"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java9CannotBeUsedWithGroovyGradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.1.RELEASE"); - request.setLanguage("groovy"); - request.setJavaVersion("9"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java9CannotBeUsedWithKotlinGradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.1.RELEASE"); - request.setLanguage("kotlin"); - request.setJavaVersion("9"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java9CanBeUsedWithSpringBoot2Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.1.RELEASE"); - request.setJavaVersion("9"); - generateMavenPom(request).hasJavaVersion("9"); - } - - @Test - public void java9CanBeUsedWithSpringBoot2Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.0.M3"); - request.setJavaVersion("9"); - generateGradleBuild(request).hasJavaVersion("9"); - } - - @Test - public void java10CannotBeUsedWithSpringBoot1Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("1.5.8.RELEASE"); - request.setJavaVersion("10"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java10CannotBeUsedWithSpringBoot1Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("1.99.99.BUILD-SNAPSHOT"); - request.setJavaVersion("10"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java10CannotBeUsedWithSpringBoot200Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.0.RELEASE"); - request.setJavaVersion("10"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java10CannotBeUsedWithSpringBoot200Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.0.RELEASE"); - request.setJavaVersion("10"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java10CanBeUsedWithSpringBoot2Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.1.RELEASE"); - request.setJavaVersion("10"); - generateMavenPom(request).hasJavaVersion("10"); - } - - @Test - public void java10CanBeUsedWithSpringBoot2Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.2.RELEASE"); - request.setJavaVersion("10"); - generateGradleBuild(request).hasJavaVersion("10"); - } - - @Test - public void java11CannotBeUsedWithSpringBoot1Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("1.5.8.RELEASE"); - request.setJavaVersion("11"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java11CannotBeUsedWithSpringBoot1Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("1.99.99.BUILD-SNAPSHOT"); - request.setJavaVersion("11"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java11CannotBeUsedWithSpringBoot20Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.5.RELEASE"); - request.setJavaVersion("11"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java11CannotBeUsedWithSpringBoot20Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.5.RELEASE"); - request.setJavaVersion("11"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java11CanBeUsedWithSpringBoot21Maven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.1.0.M1"); - request.setJavaVersion("11"); - generateMavenPom(request).hasJavaVersion("11"); - } - - @Test - public void java11CanBeUsedWithSpringBoot21Gradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.1.1.RELEASE"); - request.setJavaVersion("11"); - generateGradleBuild(request).hasJavaVersion("11"); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessorTests.java deleted file mode 100755 index 34fb34c4..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/ReactorTestRequestPostProcessorTests.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.metadata.Dependency; -import org.junit.Test; - -/** - * Tests for {@link ReactorTestRequestPostProcessor}. - * - * @author Stephane Nicoll - */ -public class ReactorTestRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void reactorTestIsAdded() { - ProjectRequest request = createProjectRequest("webflux"); - request.setBootVersion("2.0.0.M2"); - Dependency reactorTest = Dependency.withId("reactor-test", "io.projectreactor", - "reactor-test"); - reactorTest.setScope(Dependency.SCOPE_TEST); - generateMavenPom(request).hasSpringBootStarterDependency("webflux") - .hasSpringBootStarterTest().hasDependency(reactorTest) - .hasDependenciesCount(3); - } - - @Test - public void reactorTestIsNotAddedWithEarlierVersions() { - ProjectRequest request = createProjectRequest("webflux"); - request.setBootVersion("2.0.0.M1"); - generateMavenPom(request).hasSpringBootStarterDependency("webflux") - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - - @Test - public void reactorTestIsNotAddedWithoutWebFlux() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.0.M2"); - generateMavenPom(request).hasSpringBootStarterDependency("web") - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessorTests.java deleted file mode 100755 index 9dcc39fa..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBatchTestRequestPostProcessorTests.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.metadata.Dependency; -import org.junit.Test; - -/** - * Tests for {@link SpringBatchTestRequestPostProcessor}. - * - * @author Tim Riemer - */ -public class SpringBatchTestRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void batchTestIsAddedWithBatch() { - ProjectRequest request = createProjectRequest("batch"); - generateMavenPom(request).hasSpringBootStarterDependency("batch") - .hasSpringBootStarterTest().hasDependency(springBatchTest()) - .hasDependenciesCount(3); - } - - @Test - public void batchTestIsNotAddedBefore13() { - ProjectRequest request = createProjectRequest("batch"); - request.setBootVersion("1.2.7.RELEASE"); - generateMavenPom(request).hasSpringBootStarterDependency("batch") - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - - @Test - public void batchTestIsNotAddedWithoutSpringBatch() { - ProjectRequest request = createProjectRequest("web"); - generateMavenPom(request).hasSpringBootStarterDependency("web") - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - - private static Dependency springBatchTest() { - Dependency dependency = Dependency.withId("spring-batch-test", - "org.springframework.batch", "spring-batch-test"); - dependency.setScope(Dependency.SCOPE_TEST); - return dependency; - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessorTests.java deleted file mode 100755 index d62a11a8..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringBoot2RequestPostProcessorTests.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import org.junit.Test; - -/** - * Tests for {@link SpringBoot2RequestPostProcessor}. - * - * @author Stephane Nicoll - */ -public class SpringBoot2RequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void java8IsMandatoryMaven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.0.BUILD-SNAPSHOT"); - request.setJavaVersion("1.7"); - generateMavenPom(request).hasJavaVersion("1.8"); - } - - @Test - public void java8IsMandatoryGradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.0.M3"); - request.setJavaVersion("1.7"); - generateGradleBuild(request).hasJavaVersion("1.8"); - } - - @Test - public void java9CanBeUsedMaven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.0.0.BUILD-SNAPSHOT"); - request.setJavaVersion("9"); - generateMavenPom(request).hasJavaVersion("9"); - } - - @Test - public void java9CanBeUsedGradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.0.M3"); - request.setJavaVersion("9"); - generateGradleBuild(request).hasJavaVersion("9"); - } - - @Test - public void java10CanBeUsedMaven() { - ProjectRequest request = createProjectRequest("web"); - request.setBootVersion("2.1.0.BUILD-SNAPSHOT"); - request.setJavaVersion("10"); - generateMavenPom(request).hasJavaVersion("10"); - } - - @Test - public void java10CanBeUsedGradle() { - ProjectRequest request = createProjectRequest("data-jpa"); - request.setBootVersion("2.0.2.RELEASE"); - request.setJavaVersion("10"); - generateGradleBuild(request).hasJavaVersion("10"); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessorTests.java deleted file mode 100644 index ede5050b..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudFunctionRequestPostProcessorTests.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import org.junit.Test; - -/** - * Tests for {@link SpringCloudFunctionRequestPostProcessor}. - * - * @author Dave Syer - * @author Stephane Nicoll - */ -public class SpringCloudFunctionRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void functionOnly() { - ProjectRequest request = createProjectRequest("cloud-function"); - generateMavenPom(request).hasDependency(getDependency("cloud-function")) - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - - @Test - public void springCloudStreamWithRabbit() { - ProjectRequest request = createProjectRequest("cloud-stream", "amqp", - "cloud-function"); - request.setBootVersion("2.0.6.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("cloud-stream")) - .hasDependency(getDependency("amqp")) - .hasDependency(SpringCloudFunctionRequestPostProcessor.SCS_ADAPTER) - .hasDependenciesCount(6); - } - - @Test - public void reactiveSpringCloudStreamWithKafka() { - ProjectRequest request = createProjectRequest("reactive-cloud-stream", "kafka", - "cloud-function"); - request.setBootVersion("2.0.6.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("reactive-cloud-stream")) - .hasDependency(getDependency("kafka")) - .hasDependency(SpringCloudFunctionRequestPostProcessor.SCS_ADAPTER) - .hasDependenciesCount(6); - } - - @Test - public void springCloudStreamWith21() { - ProjectRequest request = createProjectRequest("cloud-stream", "cloud-function"); - request.setBootVersion("2.1.0.RC1"); - generateMavenPom(request).hasDependency(getDependency("cloud-stream")) - .hasDependency(getDependency("cloud-function")).hasDependenciesCount(4); - } - - @Test - public void reactiveSpringCloudStreamWith21() { - ProjectRequest request = createProjectRequest("reactive-cloud-stream", - "cloud-function"); - request.setBootVersion("2.1.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("reactive-cloud-stream")) - .hasDependency(getDependency("cloud-function")).hasDependenciesCount(4); - } - - @Test - public void web() { - ProjectRequest request = createProjectRequest("web", "cloud-function"); - generateMavenPom(request).hasDependency(getDependency("web")) - .hasDependency(SpringCloudFunctionRequestPostProcessor.WEB_ADAPTER) - .hasDependenciesCount(3); - } - - @Test - public void webflux() { - ProjectRequest request = createProjectRequest("webflux", "cloud-function"); - request.setBootVersion("2.1.0.BUILD-SNAPSHOT"); - generateMavenPom(request).hasDependency(getDependency("webflux")) - .hasDependency(SpringCloudFunctionRequestPostProcessor.WEB_ADAPTER) - .hasDependenciesCount(4); - } - - @Test - public void webfluxNotAvailableIn20() { - ProjectRequest request = createProjectRequest("webflux", "cloud-function"); - request.setBootVersion("2.0.5.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("webflux")) - .hasDependency(getDependency("cloud-function")).hasDependenciesCount(4); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessorTests.java deleted file mode 100755 index 88f3bc1a..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringCloudStreamRequestPostProcessorTests.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import org.junit.Test; - -/** - * Tests for {@link SpringCloudStreamRequestPostProcessor}. - * - * @author Stephane Nicoll - */ -public class SpringCloudStreamRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void springCloudStreamWithRabbit() { - ProjectRequest request = createProjectRequest("cloud-stream", "amqp"); - generateMavenPom(request).hasDependency(getDependency("cloud-stream")) - .hasDependency(getDependency("amqp")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(5); - } - - @Test - public void springCloudStreamWithKafka() { - ProjectRequest request = createProjectRequest("cloud-stream", "kafka"); - generateMavenPom(request).hasDependency(getDependency("cloud-stream")) - .hasDependency(getDependency("kafka")) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(5); - } - - @Test - public void springCloudStreamWithKafkaStreams() { - ProjectRequest request = createProjectRequest("cloud-stream", "kafka-streams"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("cloud-stream")) - .hasDependency(getDependency("kafka-streams")) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_STREAMS_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(5); - } - - @Test - public void springCloudStreamWithAllBinders() { - ProjectRequest request = createProjectRequest("cloud-stream", "amqp", "kafka", - "kafka-streams"); - generateMavenPom(request).hasDependency(getDependency("cloud-stream")) - .hasDependency(getDependency("amqp")) - .hasDependency(getDependency("kafka")) - .hasDependency(getDependency("kafka-streams")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_BINDER) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_STREAMS_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(9); - } - - @Test - public void reactiveSpringCloudStreamWithRabbit() { - ProjectRequest request = createProjectRequest("reactive-cloud-stream", "amqp"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("reactive-cloud-stream")) - .hasDependency(getDependency("amqp")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(5); - } - - @Test - public void reactiveSpringCloudStreamWithKafka() { - ProjectRequest request = createProjectRequest("reactive-cloud-stream", "kafka"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("reactive-cloud-stream")) - .hasDependency(getDependency("kafka")) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(5); - } - - @Test - public void reactiveSpringCloudStreamWithKafkaStreams() { - ProjectRequest request = createProjectRequest("reactive-cloud-stream", - "kafka-streams"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("reactive-cloud-stream")) - .hasDependency(getDependency("kafka-streams")) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_STREAMS_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(5); - } - - @Test - public void reactiveSpringCloudStreamWithAllBinders() { - ProjectRequest request = createProjectRequest("reactive-cloud-stream", "amqp", - "kafka", "kafka-streams"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("reactive-cloud-stream")) - .hasDependency(getDependency("amqp")) - .hasDependency(getDependency("kafka")) - .hasDependency(getDependency("kafka-streams")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_BINDER) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_STREAMS_BINDER) - .hasSpringBootStarterTest() - .hasDependency(SpringCloudStreamRequestPostProcessor.SCS_TEST) - .hasDependenciesCount(9); - } - - @Test - public void springCloudBusWithRabbit() { - ProjectRequest request = createProjectRequest("cloud-bus", "amqp"); - generateMavenPom(request).hasDependency(getDependency("cloud-bus")) - .hasDependency(getDependency("amqp")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasSpringBootStarterTest().hasDependenciesCount(4); - } - - @Test - public void springCloudBusWithKafka() { - ProjectRequest request = createProjectRequest("cloud-bus", "amqp"); - generateMavenPom(request).hasDependency(getDependency("cloud-bus")) - .hasDependency(getDependency("amqp")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasSpringBootStarterTest().hasDependenciesCount(4); - } - - @Test - public void springCloudBusWithAllBinders() { - ProjectRequest request = createProjectRequest("cloud-bus", "amqp", "kafka", - "kafka-streams"); - generateMavenPom(request).hasDependency(getDependency("cloud-bus")) - .hasDependency(getDependency("amqp")) - .hasDependency(getDependency("kafka")) - .hasDependency(getDependency("kafka-streams")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_BINDER) - .hasSpringBootStarterTest().hasDependenciesCount(7); - } - - @Test - public void springCloudTurbineStreamWithRabbit() { - ProjectRequest request = createProjectRequest("cloud-turbine-stream", "amqp"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("cloud-turbine-stream")) - .hasDependency(getDependency("amqp")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasSpringBootStarterTest().hasDependenciesCount(4); - } - - @Test - public void springCloudTurbineStreamWithKafka() { - ProjectRequest request = createProjectRequest("cloud-turbine-stream", "kafka"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("cloud-turbine-stream")) - .hasDependency(getDependency("kafka")) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_BINDER) - .hasSpringBootStarterTest().hasDependenciesCount(4); - } - - @Test - public void springCloudTurbineStreamWithAllBinders() { - ProjectRequest request = createProjectRequest("cloud-turbine-stream", "amqp", - "kafka", "kafka-streams"); - request.setBootVersion("2.0.0.RELEASE"); - generateMavenPom(request).hasDependency(getDependency("cloud-turbine-stream")) - .hasDependency(getDependency("amqp")) - .hasDependency(getDependency("kafka")) - .hasDependency(getDependency("kafka-streams")) - .hasDependency(SpringCloudStreamRequestPostProcessor.RABBIT_BINDER) - .hasDependency(SpringCloudStreamRequestPostProcessor.KAFKA_BINDER) - .hasSpringBootStarterTest().hasDependenciesCount(7); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessorTests.java deleted file mode 100755 index d66253ac..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSecurityTestRequestPostProcessorTests.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import io.spring.initializr.metadata.Dependency; -import org.junit.Test; - -/** - * Tests for {@link SpringSecurityTestRequestPostProcessor}. - * - * @author Stephane Nicoll - */ -public class SpringSecurityTestRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void securityTestIsAddedWithSecurity() { - ProjectRequest request = createProjectRequest("security"); - generateMavenPom(request).hasSpringBootStarterDependency("security") - .hasSpringBootStarterTest().hasDependency(springSecurityTest()) - .hasDependenciesCount(3); - } - - @Test - public void securityTestIsNotAddedBefore13() { - ProjectRequest request = createProjectRequest("security"); - request.setBootVersion("1.2.7.RELEASE"); - generateMavenPom(request).hasSpringBootStarterDependency("security") - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - - @Test - public void securityTestIsNotAddedWithoutSpringSecurity() { - ProjectRequest request = createProjectRequest("web"); - generateMavenPom(request).hasSpringBootStarterDependency("web") - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - - private static Dependency springSecurityTest() { - Dependency dependency = Dependency.withId("spring-security-test", - "org.springframework.security", "spring-security-test"); - dependency.setScope(Dependency.SCOPE_TEST); - return dependency; - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessorTests.java deleted file mode 100755 index df378acf..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/extension/SpringSessionRequestPostProcessorTests.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.extension; - -import io.spring.initializr.generator.ProjectRequest; -import org.junit.Test; - -/** - * Tests for {@link SpringSessionRequestPostProcessor}. - * - * @author Stephane Nicoll - */ -public class SpringSessionRequestPostProcessorTests - extends AbstractRequestPostProcessorTests { - - @Test - public void sessionWithSpringBoot15() { - ProjectRequest request = createProjectRequest("session"); - request.setBootVersion("1.5.4.RELEASE"); - generateMavenPom(request) - .hasDependency("org.springframework.session", "spring-session") - .hasSpringBootStarterRootDependency().hasSpringBootStarterTest() - .hasDependenciesCount(3); - } - - @Test - public void sessionWithRedisAndSpringBoot15() { - ProjectRequest request = createProjectRequest("session", "data-redis"); - request.setBootVersion("1.5.4.RELEASE"); - generateMavenPom(request) - .hasDependency("org.springframework.session", "spring-session") - .hasSpringBootStarterDependency("data-redis").hasSpringBootStarterTest() - .hasDependenciesCount(3); - } - - @Test - public void sessionWithJdbcAndSpringBoot15() { - ProjectRequest request = createProjectRequest("session", "jdbc"); - request.setBootVersion("1.5.4.RELEASE"); - generateMavenPom(request) - .hasDependency("org.springframework.session", "spring-session") - .hasSpringBootStarterDependency("jdbc").hasSpringBootStarterTest() - .hasDependenciesCount(3); - } - - @Test - public void sessionWithSpringBoot20M2() { - ProjectRequest request = createProjectRequest("session"); - request.setBootVersion("2.0.0.M2"); - generateMavenPom(request) - .hasDependency("org.springframework.session", "spring-session") - .hasSpringBootStarterRootDependency().hasSpringBootStarterTest() - .hasDependenciesCount(3); - } - - @Test - public void noSessionWithRedis() { - ProjectRequest request = createProjectRequest("data-redis"); - request.setBootVersion("2.0.0.M3"); - generateMavenPom(request).hasSpringBootStarterDependency("data-redis") - .hasSpringBootStarterTest().hasDependenciesCount(2); - } - - @Test - public void sessionWithNoStore() { - ProjectRequest request = createProjectRequest("session", "data-jpa"); - request.setBootVersion("2.0.0.M3"); - generateMavenPom(request) - .hasDependency("org.springframework.session", "spring-session-core") - .hasSpringBootStarterDependency("data-jpa").hasSpringBootStarterTest() - .hasDependenciesCount(3); - } - - @Test - public void sessionWithRedis() { - ProjectRequest request = createProjectRequest("session", "data-redis"); - request.setBootVersion("2.0.0.M3"); - generateMavenPom(request).hasSpringBootStarterDependency("data-redis") - .hasSpringBootStarterTest() - .hasDependency(SpringSessionRequestPostProcessor.REDIS) - .hasDependenciesCount(3); - } - - @Test - public void sessionWithRedisReactive() { - ProjectRequest request = createProjectRequest("session", "data-redis-reactive"); - request.setBootVersion("2.0.0.M7"); - generateMavenPom(request).hasSpringBootStarterDependency("data-redis-reactive") - .hasSpringBootStarterTest() - .hasDependency(SpringSessionRequestPostProcessor.REDIS) - .hasDependenciesCount(3); - } - - @Test - public void sessionWithJdbc() { - ProjectRequest request = createProjectRequest("session", "jdbc"); - request.setBootVersion("2.0.0.M3"); - generateMavenPom(request).hasSpringBootStarterDependency("jdbc") - .hasSpringBootStarterTest() - .hasDependency(SpringSessionRequestPostProcessor.JDBC) - .hasDependenciesCount(3); - } - - @Test - public void sessionWithRedisAndJdbc() { - ProjectRequest request = createProjectRequest("session", "data-redis", "jdbc"); - request.setBootVersion("2.0.0.M3"); - generateMavenPom(request).hasSpringBootStarterDependency("data-redis") - .hasSpringBootStarterDependency("jdbc").hasSpringBootStarterTest() - .hasDependency(SpringSessionRequestPostProcessor.REDIS) - .hasDependency(SpringSessionRequestPostProcessor.JDBC) - .hasDependenciesCount(5); - } - -} diff --git a/initializr-service/src/test/java/io/spring/initializr/service/info/CloudFoundryInfoContributorTests.java b/initializr-service/src/test/java/io/spring/initializr/service/info/CloudFoundryInfoContributorTests.java deleted file mode 100755 index eb3637fc..00000000 --- a/initializr-service/src/test/java/io/spring/initializr/service/info/CloudFoundryInfoContributorTests.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.initializr.service.info; - -import java.util.Map; - -import org.junit.Test; - -import org.springframework.boot.actuate.info.Info; -import org.springframework.core.env.Environment; -import org.springframework.mock.env.MockEnvironment; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.entry; - -/** - * @author Stephane Nicoll - */ -public class CloudFoundryInfoContributorTests { - - private final MockEnvironment environment = new MockEnvironment(); - - @Test - public void noVcap() { - Info info = getInfo(this.environment); - assertThat(info.getDetails()).isEmpty(); - } - - @Test - @SuppressWarnings("unchecked") - public void applicationName() { - this.environment.setProperty("vcap.application.name", "foo-bar"); - Info info = getInfo(this.environment); - assertThat(info.getDetails()).containsOnlyKeys("app"); - Object appDetails = info.getDetails().get("app"); - assertThat(appDetails).isInstanceOf(Map.class); - assertThat((Map) appDetails) - .containsOnly(entry("name", "foo-bar")); - } - - private static Info getInfo(Environment env) { - Info.Builder builder = new Info.Builder(); - new CloudFoundryInfoContributor(env).contribute(builder); - return builder.build(); - } - -} diff --git a/initializr-service/src/test/resources/logback-test.xml b/initializr-service/src/test/resources/logback-test.xml deleted file mode 100644 index ddb1ed6e..00000000 --- a/initializr-service/src/test/resources/logback-test.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/initializr-web/pom.xml b/initializr-web/pom.xml index a1a9506d..884559c6 100644 --- a/initializr-web/pom.xml +++ b/initializr-web/pom.xml @@ -124,7 +124,12 @@ - docs + full + + + full + + diff --git a/pom.xml b/pom.xml index 922b158e..2f05a9a1 100644 --- a/pom.xml +++ b/pom.xml @@ -258,12 +258,6 @@ - - full - - initializr-service - - m2e