├── samples ├── pom │ ├── .gitignore │ └── pom.xml ├── petclinic │ ├── .travis.yml │ ├── src │ │ ├── main │ │ │ ├── wro │ │ │ │ ├── wro.properties │ │ │ │ └── wro.xml │ │ │ ├── resources │ │ │ │ ├── messages │ │ │ │ │ ├── messages_en.properties │ │ │ │ │ ├── messages_de.properties │ │ │ │ │ └── messages.properties │ │ │ │ ├── static │ │ │ │ │ └── resources │ │ │ │ │ │ ├── images │ │ │ │ │ │ ├── pets.png │ │ │ │ │ │ ├── favicon.png │ │ │ │ │ │ ├── platform-bg.png │ │ │ │ │ │ ├── spring-logo-dataflow.png │ │ │ │ │ │ ├── spring-pivotal-logo.png │ │ │ │ │ │ └── spring-logo-dataflow-mobile.png │ │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── montserrat-webfont.eot │ │ │ │ │ │ ├── montserrat-webfont.ttf │ │ │ │ │ │ ├── montserrat-webfont.woff │ │ │ │ │ │ ├── varela_round-webfont.eot │ │ │ │ │ │ ├── varela_round-webfont.ttf │ │ │ │ │ │ └── varela_round-webfont.woff │ │ │ │ ├── templates │ │ │ │ │ ├── error.html │ │ │ │ │ ├── welcome.html │ │ │ │ │ ├── vets │ │ │ │ │ │ └── vetList.html │ │ │ │ │ ├── fragments │ │ │ │ │ │ ├── inputField.html │ │ │ │ │ │ └── selectField.html │ │ │ │ │ ├── owners │ │ │ │ │ │ ├── ownersList.html │ │ │ │ │ │ ├── createOrUpdateOwnerForm.html │ │ │ │ │ │ └── findOwners.html │ │ │ │ │ └── pets │ │ │ │ │ │ ├── createOrUpdatePetForm.html │ │ │ │ │ │ └── createOrUpdateVisitForm.html │ │ │ │ ├── application.properties │ │ │ │ ├── banner.txt │ │ │ │ └── db │ │ │ │ │ ├── mysql │ │ │ │ │ ├── petclinic_db_setup_mysql.txt │ │ │ │ │ └── schema.sql │ │ │ │ │ └── hsqldb │ │ │ │ │ └── schema.sql │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── springframework │ │ │ │ │ └── samples │ │ │ │ │ └── petclinic │ │ │ │ │ ├── model │ │ │ │ │ ├── package-info.java │ │ │ │ │ ├── NamedEntity.java │ │ │ │ │ ├── BaseEntity.java │ │ │ │ │ └── Person.java │ │ │ │ │ ├── system │ │ │ │ │ ├── WelcomeController.java │ │ │ │ │ ├── CacheConfig.java │ │ │ │ │ └── CrashController.java │ │ │ │ │ ├── owner │ │ │ │ │ ├── PetType.java │ │ │ │ │ ├── PetRepository.java │ │ │ │ │ ├── PetTypeFormatter.java │ │ │ │ │ └── PetValidator.java │ │ │ │ │ ├── vet │ │ │ │ │ ├── Specialty.java │ │ │ │ │ ├── Vets.java │ │ │ │ │ ├── VetRepository.java │ │ │ │ │ └── VetController.java │ │ │ │ │ ├── PetClinicApplication.java │ │ │ │ │ └── visit │ │ │ │ │ └── VisitRepository.java │ │ │ └── less │ │ │ │ ├── responsive.less │ │ │ │ ├── header.less │ │ │ │ └── typography.less │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── samples │ │ │ └── petclinic │ │ │ ├── model │ │ │ └── ValidatorTests.java │ │ │ ├── system │ │ │ └── CrashControllerTests.java │ │ │ └── service │ │ │ └── EntityUtils.java │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── .editorconfig │ └── sonar-project.properties ├── tests │ ├── src │ │ ├── it │ │ │ ├── cloud │ │ │ │ ├── src │ │ │ │ │ ├── main │ │ │ │ │ │ ├── resources │ │ │ │ │ │ │ ├── application.properties │ │ │ │ │ │ │ └── META-INF │ │ │ │ │ │ │ │ └── thin.properties │ │ │ │ │ │ └── java │ │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── demo │ │ │ │ │ │ │ └── DemoApplication.java │ │ │ │ │ └── test │ │ │ │ │ │ └── java │ │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── demo │ │ │ │ │ │ └── DemoApplicationTests.java │ │ │ │ ├── .gitignore │ │ │ │ └── pom.xml │ │ │ ├── empty │ │ │ │ ├── src │ │ │ │ │ ├── main │ │ │ │ │ │ ├── resources │ │ │ │ │ │ │ ├── application.properties │ │ │ │ │ │ │ └── META-INF │ │ │ │ │ │ │ │ └── thin.properties │ │ │ │ │ │ └── java │ │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── demo │ │ │ │ │ │ │ └── DemoApplication.java │ │ │ │ │ └── test │ │ │ │ │ │ └── java │ │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── demo │ │ │ │ │ │ └── DemoApplicationTests.java │ │ │ │ ├── .gitignore │ │ │ │ └── pom.xml │ │ │ ├── fat │ │ │ │ ├── src │ │ │ │ │ ├── main │ │ │ │ │ │ ├── resources │ │ │ │ │ │ │ └── application.properties │ │ │ │ │ │ └── java │ │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── demo │ │ │ │ │ │ │ └── DemoApplication.java │ │ │ │ │ └── test │ │ │ │ │ │ └── java │ │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── demo │ │ │ │ │ │ └── DemoApplicationTests.java │ │ │ │ └── .gitignore │ │ │ └── settings.xml │ │ └── test │ │ │ ├── resources │ │ │ ├── local │ │ │ │ └── thin.properties │ │ │ ├── basic │ │ │ │ └── thin.properties │ │ │ └── app │ │ │ │ ├── app.properties │ │ │ │ └── thin.properties │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ ├── Utils.java │ │ │ └── LocalRepositoryTests.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ └── build.gradle ├── app │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── application.properties │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── LauncherApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── LauncherApplicationTests.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ └── build.gradle ├── fat │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── application.properties │ │ │ │ └── META-INF │ │ │ │ │ └── thin-actr.properties │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── LauncherApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── LauncherApplicationTests.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ └── build.gradle ├── other │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── application.properties │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── LauncherApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── LauncherApplicationTests.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── Dockerfile │ ├── settings.gradle │ └── build.gradle ├── shadow │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── application.properties │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── LauncherApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── LauncherApplicationTests.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ └── build.gradle ├── main │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── main │ │ └── Main.java ├── simple │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── application.properties │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── LauncherApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── LauncherApplicationTests.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── multi │ ├── application │ │ ├── src │ │ │ ├── main │ │ │ │ ├── resources │ │ │ │ │ └── application.properties │ │ │ │ └── java │ │ │ │ │ └── hello │ │ │ │ │ └── app │ │ │ │ │ └── DemoApplication.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── hello │ │ │ │ └── app │ │ │ │ └── DemoApplicationTest.java │ │ ├── build.gradle │ │ └── pom.xml │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── library │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── hello │ │ │ │ │ └── service │ │ │ │ │ ├── ServiceProperties.java │ │ │ │ │ └── MyService.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── hello │ │ │ │ └── service │ │ │ │ └── MyServiceTest.java │ │ ├── build.gradle │ │ └── pom.xml │ ├── settings.gradle │ └── pom.xml └── pom.xml ├── gradle-plugin ├── .gitignore ├── src │ └── main │ │ └── resources │ │ └── META-INF │ │ └── gradle-plugins │ │ └── org.springframework.boot.experimental.thin-launcher.properties └── README.md ├── .dockerignore ├── launcher └── src │ ├── test │ ├── resources │ │ ├── apps │ │ │ ├── source │ │ │ │ ├── target │ │ │ │ │ ├── classes │ │ │ │ │ │ └── .empty │ │ │ │ │ └── test-classes │ │ │ │ │ │ └── .empty │ │ │ │ └── pom.xml │ │ │ ├── boot │ │ │ │ ├── BOOT-INF │ │ │ │ │ └── classes │ │ │ │ │ │ └── application.properties │ │ │ │ └── pom.xml │ │ │ ├── inclusions │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── test │ │ │ │ ├── META-INF │ │ │ │ │ └── thin.properties │ │ │ │ └── pom.xml │ │ │ ├── excluded │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── provided │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── preresolved │ │ │ │ └── META-INF │ │ │ │ │ └── thin-added.properties │ │ │ ├── child │ │ │ │ ├── META-INF │ │ │ │ │ └── thin-child.properties │ │ │ │ └── pom.xml │ │ │ ├── exclude-include │ │ │ │ └── META-INF │ │ │ │ │ ├── thin.properties │ │ │ │ │ └── thin-actr.properties │ │ │ ├── exclusions │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── launcher │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── preresolved-classifier │ │ │ │ ├── META-INF │ │ │ │ │ └── thin.properties │ │ │ │ └── pom.xml │ │ │ ├── missingthin │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── beanvalidation-snapshot │ │ │ │ ├── readme.txt │ │ │ │ └── pom.xml │ │ │ ├── db │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── inline │ │ │ │ ├── META-INF │ │ │ │ │ └── thin.properties │ │ │ │ └── pom.xml │ │ │ ├── excludelast │ │ │ │ └── META-INF │ │ │ │ │ └── thin.properties │ │ │ ├── eureka │ │ │ │ └── META-INF │ │ │ │ │ ├── thin.properties │ │ │ │ │ └── thin-extra.properties │ │ │ ├── fake.jar │ │ │ │ └── META-INF │ │ │ │ │ └── maven │ │ │ │ │ └── com.example │ │ │ │ │ └── fake │ │ │ │ │ └── pom.xml │ │ │ ├── authentication │ │ │ │ └── pom.xml │ │ │ ├── jitpack │ │ │ │ └── pom.xml │ │ │ ├── classifier │ │ │ │ └── pom.xml │ │ │ ├── projectvariables │ │ │ │ └── pom.xml │ │ │ ├── same-artifact-names │ │ │ │ └── pom.xml │ │ │ ├── placeholders │ │ │ │ └── pom.xml │ │ │ ├── parent-properties-override │ │ │ │ └── pom.xml │ │ │ ├── parent-properties │ │ │ │ └── pom.xml │ │ │ ├── cloud │ │ │ │ └── pom.xml │ │ │ ├── basic │ │ │ │ └── pom.xml │ │ │ └── snapshots │ │ │ │ └── pom.xml │ │ ├── repo │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── maven │ │ │ │ └── maven-simple │ │ │ │ ├── 1.0 │ │ │ │ ├── maven-simple-1.0.jar.sha1 │ │ │ │ ├── maven-simple-1.0.pom.sha1 │ │ │ │ ├── maven-simple-1.0.jar │ │ │ │ └── maven-simple-1.0.pom │ │ │ │ └── maven-metadata.xml │ │ ├── app-with-web-and-cloud-config.jar │ │ ├── app-with-web-in-lib-properties.jar │ │ └── settings │ │ │ ├── offline │ │ │ └── .m2 │ │ │ │ └── settings.xml │ │ │ ├── local │ │ │ └── .m2 │ │ │ │ └── settings.xml │ │ │ ├── repo │ │ │ └── .m2 │ │ │ │ └── settings.xml │ │ │ ├── profile │ │ │ └── .m2 │ │ │ │ └── settings.xml │ │ │ ├── snapshots │ │ │ ├── defaultWithNoSnapshotsElement │ │ │ │ └── .m2 │ │ │ │ │ └── settings.xml │ │ │ ├── enabled │ │ │ │ └── .m2 │ │ │ │ │ └── settings.xml │ │ │ ├── disabled │ │ │ │ └── .m2 │ │ │ │ │ └── settings.xml │ │ │ └── defaultWithSnapshotsElement │ │ │ │ └── .m2 │ │ │ │ └── settings.xml │ │ │ └── proxy │ │ │ └── .m2 │ │ │ └── settings.xml │ └── java │ │ └── org │ │ └── springframework │ │ └── boot │ │ └── loader │ │ └── thin │ │ └── AdhocTestSuite.java │ └── main │ ├── java │ └── org │ │ └── springframework │ │ └── boot │ │ └── loader │ │ └── thin │ │ ├── CompositeProxySelector.java │ │ ├── LogUtils.java │ │ └── UrlArchive.java │ └── resources │ └── META-INF │ └── thin │ └── empty-pom.xml ├── .mvn ├── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties └── settings.xml ├── deployer ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── test │ │ ├── resources │ │ │ ├── apps │ │ │ │ ├── app │ │ │ │ │ ├── com │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── LauncherApplication.class │ │ │ │ │ ├── META-INF │ │ │ │ │ │ └── MANIFEST.MF │ │ │ │ │ └── pom.xml │ │ │ │ └── props │ │ │ │ │ ├── com │ │ │ │ │ └── example │ │ │ │ │ │ └── LauncherApplication.class │ │ │ │ │ └── META-INF │ │ │ │ │ ├── maven │ │ │ │ │ └── com.example │ │ │ │ │ │ └── other │ │ │ │ │ │ └── pom.properties │ │ │ │ │ ├── thin.properties │ │ │ │ │ └── MANIFEST.MF │ │ │ └── logback-test.xml │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── deployer │ │ │ └── thin │ │ │ └── ThinJarAppDeployerBeanTests.java │ └── main │ │ ├── resources │ │ └── META-INF │ │ │ └── spring.factories │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── deployer │ │ └── thin │ │ ├── ThinJarAppDeployerAutoConfiguration.java │ │ └── ThinJarTaskLauncher.java └── README.adoc ├── locator ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties └── build.gradle ├── layout └── src │ └── main │ ├── resources │ └── META-INF │ │ └── spring.factories │ └── java │ └── org │ └── springframework │ └── boot │ └── loader │ └── thin │ ├── ThinLayoutFactory.java │ └── ThinLayout.java ├── wrapper ├── src │ └── test │ │ └── resources │ │ └── repository │ │ └── com │ │ └── example │ │ └── main │ │ └── 0.0.1-SNAPSHOT │ │ ├── main-0.0.1-SNAPSHOT.jar │ │ └── main-0.0.1-SNAPSHOT.pom └── pom.xml ├── maven-plugin └── src │ ├── test │ └── resources │ │ └── repository │ │ └── com │ │ └── example │ │ └── main │ │ └── 0.0.1-SNAPSHOT │ │ ├── main-0.0.1-SNAPSHOT.jar │ │ └── main-0.0.1-SNAPSHOT.pom │ └── main │ └── resources │ └── META-INF │ └── m2e │ └── lifecycle-mapping-metadata.xml ├── .gitignore ├── .github └── workflows │ ├── basic.yaml │ └── deploy.yaml ├── tools ├── pom.xml └── converter │ ├── src │ ├── test │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── boot │ │ │ └── loader │ │ │ └── thin │ │ │ └── converter │ │ │ └── PatternTests.java │ └── main │ │ └── java │ │ └── org │ │ └── springframework │ │ └── boot │ │ └── loader │ │ └── thin │ │ └── converter │ │ └── PathLibraries.java │ └── pom.xml └── pipeline.yml /samples/pom/.gitignore: -------------------------------------------------------------------------------- 1 | src/ 2 | -------------------------------------------------------------------------------- /gradle-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | !launcher/src/** -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/source/target/classes/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/source/target/test-classes/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/petclinic/.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: oraclejdk8 3 | -------------------------------------------------------------------------------- /samples/tests/src/it/cloud/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/tests/src/it/empty/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/tests/src/it/fat/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/app/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=app -------------------------------------------------------------------------------- /samples/fat/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=simple -------------------------------------------------------------------------------- /samples/other/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=app -------------------------------------------------------------------------------- /samples/shadow/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=app -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/boot/BOOT-INF/classes/application.properties: -------------------------------------------------------------------------------- 1 | foo=bar -------------------------------------------------------------------------------- /samples/main/README.md: -------------------------------------------------------------------------------- 1 | Just a really basic main method for testing. No dependencies. 2 | -------------------------------------------------------------------------------- /samples/simple/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=simple -------------------------------------------------------------------------------- /samples/multi/application/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | service.message=Hello World -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /launcher/src/test/resources/repo/com/example/maven/maven-simple/1.0/maven-simple-1.0.jar.sha1: -------------------------------------------------------------------------------- 1 | d7c90f3ab0e6eb25b552c3585c0572a04dc300dc 2 | -------------------------------------------------------------------------------- /launcher/src/test/resources/repo/com/example/maven/maven-simple/1.0/maven-simple-1.0.pom.sha1: -------------------------------------------------------------------------------- 1 | 96aab6c54cff89cd8fd457c20b2d9798cdbbf21c 2 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/inclusions/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | dependencies.json: org.springframework.boot:spring-boot-starter-json 2 | -------------------------------------------------------------------------------- /deployer/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/deployer/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip 2 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/test/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 2 | -------------------------------------------------------------------------------- /locator/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/locator/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/petclinic/src/main/wro/wro.properties: -------------------------------------------------------------------------------- 1 | #List of preProcessors 2 | preProcessors=lessCssImport 3 | #List of postProcessors 4 | postProcessors=less4j -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/excluded/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | exclusions.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 2 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/provided/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 2 | -------------------------------------------------------------------------------- /samples/app/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/app/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/fat/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/fat/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/multi/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/multi/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /deployer/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip 2 | -------------------------------------------------------------------------------- /layout/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.loader.tools.LayoutFactory=\ 2 | org.springframework.boot.loader.thin.ThinLayoutFactory -------------------------------------------------------------------------------- /samples/fat/src/main/resources/META-INF/thin-actr.properties: -------------------------------------------------------------------------------- 1 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 2 | -------------------------------------------------------------------------------- /samples/multi/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/multi/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/other/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/other/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/petclinic/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /samples/shadow/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/shadow/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/simple/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/simple/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/tests/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/tests/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/preresolved/META-INF/thin-added.properties: -------------------------------------------------------------------------------- 1 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 2 | -------------------------------------------------------------------------------- /samples/multi/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/child/META-INF/thin-child.properties: -------------------------------------------------------------------------------- 1 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 2 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/exclude-include/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | exclusions.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 2 | -------------------------------------------------------------------------------- /samples/petclinic/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip 2 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/messages/messages_en.properties: -------------------------------------------------------------------------------- 1 | # This file is intentionally empty. Message look-ups will fall back to the default "messages.properties" file. -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/exclude-include/META-INF/thin-actr.properties: -------------------------------------------------------------------------------- 1 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 2 | -------------------------------------------------------------------------------- /launcher/src/test/resources/app-with-web-and-cloud-config.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/launcher/src/test/resources/app-with-web-and-cloud-config.jar -------------------------------------------------------------------------------- /launcher/src/test/resources/app-with-web-in-lib-properties.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/launcher/src/test/resources/app-with-web-in-lib-properties.jar -------------------------------------------------------------------------------- /gradle-plugin/src/main/resources/META-INF/gradle-plugins/org.springframework.boot.experimental.thin-launcher.properties: -------------------------------------------------------------------------------- 1 | implementation-class=org.springframework.boot.experimental.gradle.ThinLauncherPlugin -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/messages/messages_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/messages/messages_de.properties -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/images/pets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/images/pets.png -------------------------------------------------------------------------------- /samples/tests/src/test/resources/local/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:1.5.3.RELEASE 2 | dependencies.app: com.example:app:0.0.1-SNAPSHOT 3 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/images/favicon.png -------------------------------------------------------------------------------- /deployer/src/test/resources/apps/app/com/example/LauncherApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/deployer/src/test/resources/apps/app/com/example/LauncherApplication.class -------------------------------------------------------------------------------- /deployer/src/test/resources/apps/props/com/example/LauncherApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/deployer/src/test/resources/apps/props/com/example/LauncherApplication.class -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/images/platform-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/images/platform-bg.png -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/fonts/montserrat-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/fonts/montserrat-webfont.eot -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/fonts/montserrat-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/fonts/montserrat-webfont.ttf -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/fonts/montserrat-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/fonts/montserrat-webfont.woff -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/fonts/varela_round-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/fonts/varela_round-webfont.eot -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/fonts/varela_round-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/fonts/varela_round-webfont.ttf -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/fonts/varela_round-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/fonts/varela_round-webfont.woff -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/images/spring-logo-dataflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/images/spring-logo-dataflow.png -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/images/spring-pivotal-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/images/spring-pivotal-logo.png -------------------------------------------------------------------------------- /launcher/src/test/resources/repo/com/example/maven/maven-simple/1.0/maven-simple-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/launcher/src/test/resources/repo/com/example/maven/maven-simple/1.0/maven-simple-1.0.jar -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/model/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The classes in this package represent utilities used by the domain. 3 | */ 4 | package org.springframework.samples.petclinic.model; 5 | 6 | -------------------------------------------------------------------------------- /samples/tests/src/test/resources/basic/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:1.5.3.RELEASE 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/static/resources/images/spring-logo-dataflow-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/samples/petclinic/src/main/resources/static/resources/images/spring-logo-dataflow-mobile.png -------------------------------------------------------------------------------- /wrapper/src/test/resources/repository/com/example/main/0.0.1-SNAPSHOT/main-0.0.1-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/wrapper/src/test/resources/repository/com/example/main/0.0.1-SNAPSHOT/main-0.0.1-SNAPSHOT.jar -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/exclusions/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | exclusions.spring-boot-starter-tomcat: org.springframework.boot:spring-boot-starter-tomcat 2 | dependencies.spring-boot-starter-jetty: org.springframework.boot:spring-boot-starter-jetty 3 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/launcher/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | exclusions.spring-cloud-deployer-local: org.springframework.cloud:spring-cloud-deployer-local 2 | dependencies.spring-cloud-deployer-thin: org.springframework.cloud:spring-cloud-deployer-thin 3 | -------------------------------------------------------------------------------- /maven-plugin/src/test/resources/repository/com/example/main/0.0.1-SNAPSHOT/main-0.0.1-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyer/spring-boot-thin-launcher/HEAD/maven-plugin/src/test/resources/repository/com/example/main/0.0.1-SNAPSHOT/main-0.0.1-SNAPSHOT.jar -------------------------------------------------------------------------------- /deployer/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /locator/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip 6 | -------------------------------------------------------------------------------- /samples/app/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip 6 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/wro/wro.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | classpath:META-INF/resources/webjars/bootstrap/3.3.6/less/bootstrap.less 4 | /petclinic.less 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/fat/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 6 | -------------------------------------------------------------------------------- /samples/multi/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip 6 | -------------------------------------------------------------------------------- /samples/other/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip 6 | -------------------------------------------------------------------------------- /samples/shadow/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip 6 | -------------------------------------------------------------------------------- /samples/simple/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 6 | -------------------------------------------------------------------------------- /samples/tests/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip 6 | -------------------------------------------------------------------------------- /deployer/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | org.springframework.cloud.deployer.thin.ThinJarAppDeployerAutoConfiguration,\ 3 | org.springframework.cloud.deployer.thin.ThinJarTomcatAutoConfiguration 4 | -------------------------------------------------------------------------------- /samples/petclinic/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | 10 | [*.{java,xml}] 11 | indent_size = 4 12 | trim_trailing_whitespace = true 13 | -------------------------------------------------------------------------------- /samples/other/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk-alpine 2 | 3 | ADD target/thin/root/repository m2/repository 4 | ADD target/other-0.0.1-SNAPSHOT.jar app.jar 5 | 6 | ENTRYPOINT [ "sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -jar app.jar --thin.root=/m2" ] 7 | 8 | EXPOSE 8080 9 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/preresolved-classifier/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | computed=true 2 | dependencies.spring-boot-test=org.springframework.boot:spring-boot-test:2.1.0.RELEASE 3 | dependencies.spring-boot-test.tests=org.springframework.boot:spring-boot-test:jar:tests:2.1.0.RELEASE 4 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/missingthin/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:1.3.8.RELEASE 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | dependencies.app: com.example:nonexistent:0.0.1-SNAPSHOT 4 | -------------------------------------------------------------------------------- /deployer/src/test/resources/apps/props/META-INF/maven/com.example/other/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Tue Nov 14 16:35:07 GMT 2017 3 | version=0.0.1-SNAPSHOT 4 | groupId=com.example 5 | m2e.projectName=other 6 | m2e.projectLocation=/home/dsyer/dev/thin/launcher/samples/other 7 | artifactId=other 8 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/offline/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | true 6 | -------------------------------------------------------------------------------- /samples/tests/src/test/resources/app/app.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:2.0.1.RELEASE 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 4 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/messages/messages.properties: -------------------------------------------------------------------------------- 1 | welcome=Welcome 2 | required=is required 3 | notFound=has not been found 4 | duplicate=is already in use 5 | nonNumeric=must be all numeric 6 | duplicateFormSubmission=Duplicate form submission is not allowed 7 | typeMismatch.date=invalid date 8 | typeMismatch.birthDate=invalid date 9 | -------------------------------------------------------------------------------- /samples/shadow/src/main/resources/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:2.0.1.RELEASE 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 4 | -------------------------------------------------------------------------------- /samples/tests/src/it/fat/src/test/java/com/example/demo/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class DemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /samples/fat/src/test/java/com/example/LauncherApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | 7 | @SpringBootTest 8 | public class LauncherApplicationTests { 9 | 10 | @Test 11 | public void contextLoads() { 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /samples/tests/src/it/cloud/src/test/java/com/example/demo/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class DemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /samples/tests/src/it/empty/src/test/java/com/example/demo/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class DemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /samples/simple/src/test/java/com/example/LauncherApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | 7 | @SpringBootTest 8 | public class LauncherApplicationTests { 9 | 10 | @Test 11 | public void contextLoads() { 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/local/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | target/thin/test/repository 6 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/beanvalidation-snapshot/readme.txt: -------------------------------------------------------------------------------- 1 | The main purpose of this test app is to use some sanpshot dependency that is NOT availabe in the spring-snapshot repository which is added by default. 2 | (See "https://repo.spring.io/libs-snapshot" in DependencyResolver.) 3 | So, it is possible to test the configuration of such a snapshot repository in settings.xml. -------------------------------------------------------------------------------- /launcher/src/test/resources/repo/com/example/maven/maven-simple/maven-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | com.example.maven 3 | maven-simple 4 | 5 | 1.0 6 | 1.0 7 | 8 | 1.0 9 | 10 | 20190416201550 11 | 12 | -------------------------------------------------------------------------------- /samples/tests/src/it/empty/src/main/resources/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 2 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 3 | dependencies.spring-boot-starter-jdbc: org.springframework.boot:spring-boot-starter-jdbc 4 | dependencies.h2: com.h2database:h2 5 | -------------------------------------------------------------------------------- /samples/main/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | com.example 4 | main 5 | 0.0.1-SNAPSHOT 6 | 7 | -------------------------------------------------------------------------------- /samples/other/src/main/resources/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:2.4.3 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 4 | # JDK 11: 5 | dependencies.jaxb: javax.xml.bind:jaxb-api:2.3.0 -------------------------------------------------------------------------------- /deployer/src/test/resources/apps/props/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:2.2.2.RELEASE 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 4 | # JDK 11: 5 | dependencies.jaxb: javax.xml.bind:jaxb-api:2.3.0 -------------------------------------------------------------------------------- /deployer/src/test/resources/apps/props/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Implementation-Title: other 3 | Implementation-Version: 0.0.1-SNAPSHOT 4 | Built-By: dsyer 5 | Implementation-Vendor-Id: com.example 6 | Build-Jdk: 1.8.0_131 7 | Implementation-URL: https://projects.spring.io/spring-boot 8 | Created-By: Maven Integration for Eclipse 9 | Implementation-Vendor: Pivotal Software, Inc. 10 | 11 | -------------------------------------------------------------------------------- /samples/simple/src/main/java/com/example/LauncherApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class LauncherApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(LauncherApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/petclinic/sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Required metadata 2 | sonar.projectKey=java-sonar-runner-simple 3 | sonar.projectName=Simple Java project analyzed with the SonarQube Runner 4 | sonar.projectVersion=1.0 5 | 6 | # Comma-separated paths to directories with sources (required) 7 | sonar.sources=src 8 | 9 | # Language 10 | sonar.language=java 11 | 12 | # Encoding of the source files 13 | sonar.sourceEncoding=UTF-8 -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Something happened...

8 |

Exception message

9 | 10 | 11 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/db/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:1.3.8.RELEASE 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 4 | dependencies.spring-boot-starter-jdbc: org.springframework.boot:spring-boot-starter-jdbc 5 | -------------------------------------------------------------------------------- /samples/tests/src/it/empty/src/main/java/com/example/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class DemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(DemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.system; 2 | 3 | 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | 7 | @Controller 8 | class WelcomeController { 9 | 10 | @RequestMapping("/") 11 | public String welcome() { 12 | return "welcome"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/tests/src/it/cloud/src/main/resources/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-cloud-dependencies: org.springframework.cloud:spring-cloud-dependencies:Hoxton.RELEASE 2 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 3 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 4 | dependencies.spring-cloud-starter-config: org.springframework.cloud:spring-cloud-starter-config 5 | -------------------------------------------------------------------------------- /wrapper/src/test/resources/repository/com/example/main/0.0.1-SNAPSHOT/main-0.0.1-SNAPSHOT.pom: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | com.example 4 | main 5 | 0.0.1-SNAPSHOT 6 | -------------------------------------------------------------------------------- /maven-plugin/src/test/resources/repository/com/example/main/0.0.1-SNAPSHOT/main-0.0.1-SNAPSHOT.pom: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | com.example 4 | main 5 | 0.0.1-SNAPSHOT 6 | -------------------------------------------------------------------------------- /samples/app/src/test/java/com/example/LauncherApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class LauncherApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /deployer/src/test/resources/apps/app/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Implementation-Title: other 3 | Implementation-Version: 0.0.1-SNAPSHOT 4 | Built-By: dsyer 5 | Implementation-Vendor-Id: com.example 6 | Build-Jdk: 1.8.0_131 7 | Implementation-URL: https://projects.spring.io/spring-boot 8 | Created-By: Maven Integration for Eclipse 9 | Implementation-Vendor: Pivotal Software, Inc. 10 | Start-Class: com.example.LauncherApplication 11 | 12 | -------------------------------------------------------------------------------- /samples/other/src/test/java/com/example/LauncherApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class LauncherApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /samples/shadow/src/test/java/com/example/LauncherApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class LauncherApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/inline/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | spring-boot.version: 1.3.8.RELEASE 2 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:${spring-boot.version} 3 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 4 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 5 | dependencies.spring-boot-starter-jdbc: org.springframework.boot:spring-boot-starter-jdbc 6 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/system/CacheConfig.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.system; 2 | 3 | import org.springframework.cache.annotation.EnableCaching; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.Profile; 6 | 7 | /** 8 | * Cache could be disable in unit test. 9 | */ 10 | @Configuration 11 | @EnableCaching 12 | @Profile("production") 13 | class CacheConfig { 14 | } 15 | -------------------------------------------------------------------------------- /samples/tests/src/it/cloud/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /samples/tests/src/it/empty/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /samples/tests/src/it/fat/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Welcome

8 |
9 |
10 | 11 |
12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/excludelast/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-cloud-dependencies: org.springframework.cloud:spring-cloud-dependencies:Finchley.M8 2 | exclusions.spring-cloud-function-web: org.springframework.cloud:spring-cloud-starter-function-web 3 | exclusions.rabbit-http-client: com.rabbitmq:http-client 4 | dependencies.spring-cloud-function-stream: org.springframework.cloud:spring-cloud-function-stream 5 | dependencies.spring-cloud-stream-rabbit: org.springframework.cloud:spring-cloud-starter-stream-rabbit -------------------------------------------------------------------------------- /samples/other/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenLocal() 4 | maven { url 'https://repo.spring.io/milestone' } 5 | maven { url 'https://repo.spring.io/snapshot' } 6 | gradlePluginPortal() 7 | } 8 | resolutionStrategy { 9 | eachPlugin { 10 | if (requested.id.id == 'org.springframework.boot.experimental.thin-launcher') { 11 | useModule("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${requested.version}") 12 | } 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /samples/app/src/main/resources/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:2.0.6.RELEASE 2 | boms.spring-cloud-dependencies: org.springframework.cloud:spring-cloud-dependencies:Finchley.SR2 3 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 4 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 5 | dependencies.spring-cloud-starter-config: org.springframework.cloud:spring-cloud-starter-config 6 | -------------------------------------------------------------------------------- /samples/simple/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenLocal() 4 | maven { url 'https://repo.spring.io/milestone' } 5 | maven { url 'https://repo.spring.io/snapshot' } 6 | gradlePluginPortal() 7 | } 8 | resolutionStrategy { 9 | eachPlugin { 10 | if (requested.id.id == 'org.springframework.boot.experimental.thin-launcher') { 11 | useModule("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${requested.version}") 12 | } 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /samples/tests/src/test/resources/app/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:2.0.4.RELEASE 2 | boms.spring-cloud-dependencies: org.springframework.cloud:spring-cloud-dependencies:Finchley.RELEASE 3 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 4 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 5 | dependencies.spring-cloud-starter-config: org.springframework.cloud:spring-cloud-starter-config 6 | -------------------------------------------------------------------------------- /maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | assemble 7 | 8 | 9 | 10 | 11 | false 12 | false 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/eureka/META-INF/thin.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:1.3.8.RELEASE 2 | boms.spring-cloud-dependencies: org.springframework.cloud:spring-cloud-dependencies:Brixton.SR6 3 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 4 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 5 | dependencies.spring-cloud-starter-eureka: org.springframework.cloud:spring-cloud-starter-eureka 6 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/eureka/META-INF/thin-extra.properties: -------------------------------------------------------------------------------- 1 | boms.spring-boot-dependencies: org.springframework.boot:spring-boot-dependencies:1.4.1.RELEASE 2 | boms.spring-cloud-dependencies: org.springframework.cloud:spring-cloud-dependencies:Camden.SR2 3 | dependencies.spring-boot-starter-web: org.springframework.boot:spring-boot-starter-web 4 | dependencies.spring-boot-starter-actuator: org.springframework.boot:spring-boot-starter-actuator 5 | dependencies.spring-cloud-starter-eureka: org.springframework.cloud:spring-cloud-starter-eureka 6 | -------------------------------------------------------------------------------- /launcher/src/test/resources/repo/com/example/maven/maven-simple/1.0/maven-simple-1.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example.maven 7 | maven-simple 8 | 1.0 9 | jar 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/multi/library/src/main/java/hello/service/ServiceProperties.java: -------------------------------------------------------------------------------- 1 | package hello.service; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | 5 | @ConfigurationProperties("service") 6 | public class ServiceProperties { 7 | 8 | /** 9 | * A message for the service. 10 | */ 11 | private String message; 12 | 13 | public String getMessage() { 14 | return message; 15 | } 16 | 17 | public void setMessage(String message) { 18 | this.message = message; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *# 2 | .#* 3 | *~ 4 | 5 | bin/ 6 | .gradle/ 7 | target/ 8 | .m2/ 9 | !.mvn/wrapper/maven-wrapper.jar 10 | 11 | dependency-reduced-pom.xml 12 | .flattened-pom.xml 13 | 14 | ### STS ### 15 | .classpath 16 | .factorypath 17 | .project 18 | .settings 19 | .springBeans 20 | .sts4-cache/ 21 | .attach_pid* 22 | 23 | ### IntelliJ IDEA ### 24 | .idea 25 | *.iws 26 | *.iml 27 | *.ipr 28 | 29 | ### NetBeans ### 30 | nbproject/private/ 31 | build/ 32 | nbbuild/ 33 | dist/ 34 | nbdist/ 35 | .nb-gradle/ 36 | 37 | ### VS Code ### 38 | .vscode/ 39 | credentials.yml 40 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/inline/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/workflows/basic.yaml: -------------------------------------------------------------------------------- 1 | name: pr 2 | 3 | on: [pull_request, check_run] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: Set up JDK 1.8 12 | uses: actions/setup-java@v1 13 | with: 14 | java-version: 1.8 15 | - name: Cache Maven packages 16 | uses: actions/cache@v2 17 | with: 18 | path: ~/.m2 19 | key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} 20 | restore-keys: ${{ runner.os }}-m2 21 | - name: Build with Maven 22 | run: ./mvnw -B install -------------------------------------------------------------------------------- /samples/multi/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenLocal() 4 | maven { url 'https://repo.spring.io/milestone' } 5 | maven { url 'https://repo.spring.io/snapshot' } 6 | gradlePluginPortal() 7 | } 8 | resolutionStrategy { 9 | eachPlugin { 10 | if (requested.id.id == 'org.springframework.boot.experimental.thin-launcher') { 11 | useModule("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${requested.version}") 12 | } 13 | } 14 | } 15 | } 16 | 17 | rootProject.name = 'multi' 18 | 19 | include 'library' 20 | include 'application' 21 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/fake.jar/META-INF/maven/com.example/fake/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/repo/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | default 8 | 9 | true 10 | 11 | 12 | 13 | local.io 14 | ${repo.url} 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/profile/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | default 8 | 9 | true 10 | 11 | 12 | 13 | jitpack.io 14 | https://jitpack.io 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/multi/library/src/main/java/hello/service/MyService.java: -------------------------------------------------------------------------------- 1 | package hello.service; 2 | 3 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 4 | import org.springframework.stereotype.Service; 5 | 6 | @Service 7 | @EnableConfigurationProperties(ServiceProperties.class) 8 | public class MyService { 9 | 10 | private final ServiceProperties serviceProperties; 11 | 12 | public MyService(ServiceProperties serviceProperties) { 13 | this.serviceProperties = serviceProperties; 14 | } 15 | 16 | public String message() { 17 | return this.serviceProperties.getMessage(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # database init, supports mysql too 2 | database=hsqldb 3 | spring.datasource.schema=classpath*:db/${database}/schema.sql 4 | spring.datasource.data=classpath*:db/${database}/data.sql 5 | 6 | # Web 7 | spring.thymeleaf.mode=HTML 8 | 9 | # JPA 10 | spring.jpa.hibernate.ddl-auto=none 11 | 12 | # Internationalization 13 | spring.messages.basename=messages/messages 14 | 15 | # Actuator / Management 16 | management.contextPath=/manage 17 | 18 | # Logging 19 | # logging.level.org.springframework.context.annotation=TRACE 20 | 21 | # Active Spring profiles 22 | spring.profiles.active=production 23 | spring.cache.cache-names=vets -------------------------------------------------------------------------------- /tools/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | org.springframework.boot.experimental 7 | spring-boot-thin-launcher-parent 8 | 1.0.27.BUILD-SNAPSHOT 9 | 10 | 11 | spring-boot-thin-tools 12 | pom 13 | Tools Parent 14 | 15 | 16 | converter 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /samples/app/src/main/java/com/example/LauncherApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.springframework.boot.ApplicationRunner; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.context.annotation.Bean; 7 | 8 | @SpringBootApplication 9 | public class LauncherApplication { 10 | 11 | @Bean 12 | public ApplicationRunner runner() { 13 | return app -> { 14 | if (app.containsOption("fail")) { 15 | throw new RuntimeException("Planned!"); 16 | } 17 | }; 18 | } 19 | 20 | public static void main(String[] args) { 21 | SpringApplication.run(LauncherApplication.class, args); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/other/src/main/java/com/example/LauncherApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.springframework.boot.ApplicationRunner; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.context.annotation.Bean; 7 | 8 | @SpringBootApplication 9 | public class LauncherApplication { 10 | 11 | @Bean 12 | public ApplicationRunner runner() { 13 | return app -> { 14 | if (app.containsOption("fail")) { 15 | throw new RuntimeException("Planned!"); 16 | } 17 | }; 18 | } 19 | 20 | public static void main(String[] args) { 21 | SpringApplication.run(LauncherApplication.class, args); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/shadow/src/main/java/com/example/LauncherApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.springframework.boot.ApplicationRunner; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.context.annotation.Bean; 7 | 8 | @SpringBootApplication 9 | public class LauncherApplication { 10 | 11 | @Bean 12 | public ApplicationRunner runner() { 13 | return app -> { 14 | if (app.containsOption("fail")) { 15 | throw new RuntimeException("Planned!"); 16 | } 17 | }; 18 | } 19 | 20 | public static void main(String[] args) { 21 | SpringApplication.run(LauncherApplication.class, args); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/snapshots/defaultWithNoSnapshotsElement/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | default 8 | 9 | true 10 | 11 | 12 | 13 | jboss-snapshots 14 | https://repository.jboss.org/nexus/content/repositories/snapshots 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/tests/src/it/fat/src/main/java/com/example/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.ApplicationRunner; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.context.annotation.Bean; 7 | 8 | @SpringBootApplication 9 | public class DemoApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(DemoApplication.class, args); 13 | } 14 | 15 | @Bean 16 | public ApplicationRunner runner() { 17 | return app -> { 18 | if (app.containsOption("fail")) { 19 | throw new RuntimeException("Planned!"); 20 | } 21 | }; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /samples/tests/src/it/cloud/src/main/java/com/example/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.ApplicationRunner; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.context.annotation.Bean; 7 | 8 | @SpringBootApplication 9 | public class DemoApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(DemoApplication.class, args); 13 | } 14 | 15 | @Bean 16 | public ApplicationRunner runner() { 17 | return app -> { 18 | if (app.containsOption("fail")) { 19 | throw new RuntimeException("Planned!"); 20 | } 21 | }; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /samples/multi/application/src/test/java/hello/app/DemoApplicationTest.java: -------------------------------------------------------------------------------- 1 | package hello.app; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | 11 | import hello.service.MyService; 12 | 13 | @RunWith(SpringRunner.class) 14 | @SpringBootTest 15 | public class DemoApplicationTest { 16 | 17 | @Autowired 18 | private MyService myService; 19 | 20 | @Test 21 | public void contextLoads() { 22 | assertThat(myService).isNotNull(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/snapshots/enabled/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | default 8 | 9 | true 10 | 11 | 12 | 13 | jboss-snapshots 14 | https://repository.jboss.org/nexus/content/repositories/snapshots 15 | 16 | true 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/snapshots/disabled/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | default 8 | 9 | true 10 | 11 | 12 | 13 | jboss-snapshots 14 | https://repository.jboss.org/nexus/content/repositories/snapshots 15 | 16 | false 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/fat/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.2.4.RELEASE' 3 | id 'io.spring.dependency-management' version '1.0.9.RELEASE' 4 | id 'java' 5 | id 'maven' 6 | } 7 | 8 | group = 'com.example' 9 | version = '0.0.1-SNAPSHOT' 10 | sourceCompatibility = '1.8' 11 | 12 | repositories { 13 | mavenLocal() 14 | mavenCentral() 15 | maven { url "https://repo.spring.io/snapshot" } 16 | maven { url "https://repo.spring.io/milestone" } 17 | } 18 | 19 | dependencies { 20 | implementation('org.springframework.boot:spring-boot-starter-webflux') 21 | testImplementation('org.springframework.boot:spring-boot-starter-test') { 22 | exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' 23 | } 24 | } 25 | 26 | test { 27 | useJUnitPlatform() 28 | } 29 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | |\ _,,,--,,_ 4 | /,`.-'`' ._ \-;;,_ 5 | _______ __|,4- ) )_ .;.(__`'-'__ ___ __ _ ___ _______ 6 | | | '---''(_/._)-'(_\_) | | | | | | | | | 7 | | _ | ___|_ _| | | | | |_| | | | __ _ _ 8 | | |_| | |___ | | | | | | | | | | \ \ \ \ 9 | | ___| ___| | | | _| |___| | _ | | _| \ \ \ \ 10 | | | | |___ | | | |_| | | | | | | |_ ) ) ) ) 11 | |___| |_______| |___| |_______|_______|___|_| |__|___|_______| / / / / 12 | ==================================================================/_/_/_/ 13 | 14 | :: Built with Spring Boot :: ${spring-boot.version} 15 | 16 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/snapshots/defaultWithSnapshotsElement/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | default 8 | 9 | true 10 | 11 | 12 | 13 | jboss-snapshots 14 | https://repository.jboss.org/nexus/content/repositories/snapshots 15 | 16 | always 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/multi/library/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'maven' 4 | } 5 | 6 | plugins { id "io.spring.dependency-management" version "1.0.4.RELEASE" } 7 | 8 | ext { springBootVersion = '1.5.10.RELEASE' } 9 | 10 | apply plugin: 'java' 11 | apply plugin: 'eclipse' 12 | apply plugin: 'maven' 13 | 14 | group = 'com.example' 15 | version = '0.0.1-SNAPSHOT' 16 | jar { 17 | baseName = 'library' 18 | version = '0.0.1-SNAPSHOT' 19 | } 20 | sourceCompatibility = 1.8 21 | 22 | repositories { mavenCentral() } 23 | 24 | dependencies { 25 | compile('org.springframework.boot:spring-boot-starter') 26 | testCompile('org.springframework.boot:spring-boot-starter-test') 27 | } 28 | 29 | dependencyManagement { 30 | imports { mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}") } 31 | } 32 | -------------------------------------------------------------------------------- /samples/multi/library/src/test/java/hello/service/MyServiceTest.java: -------------------------------------------------------------------------------- 1 | package hello.service; 2 | 3 | import static org.assertj.core.api.Assertions.*; 4 | 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.autoconfigure.SpringBootApplication; 9 | import org.springframework.boot.test.context.SpringBootTest; 10 | import org.springframework.test.context.junit4.SpringRunner; 11 | 12 | @RunWith(SpringRunner.class) 13 | @SpringBootTest("service.message=Hello") 14 | public class MyServiceTest { 15 | 16 | @Autowired 17 | private MyService myService; 18 | 19 | @Test 20 | public void contextLoads() { 21 | assertThat(myService.message()).isNotNull(); 22 | } 23 | 24 | @SpringBootApplication 25 | static class TestConfiguration { 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/less/responsive.less: -------------------------------------------------------------------------------- 1 | @media (max-width: 768px) { 2 | .navbar-toggle { 3 | position:absolute; 4 | z-index: 9999; 5 | left:0px; 6 | top:0px; 7 | } 8 | 9 | .navbar a.navbar-brand { 10 | display: block; 11 | margin: 0 auto 0 auto; 12 | width: 148px; 13 | height: 50px; 14 | float: none; 15 | background: url("../images/spring-logo-dataflow-mobile.png") 0 center no-repeat; 16 | } 17 | 18 | .homepage-billboard .homepage-subtitle { 19 | font-size: 21px; 20 | line-height: 21px; 21 | } 22 | 23 | .navbar a.navbar-brand span { 24 | display: none; 25 | } 26 | 27 | .navbar { 28 | border-top-width: 0; 29 | } 30 | 31 | .xd-container { 32 | margin-top: 20px; 33 | margin-bottom: 30px; 34 | } 35 | 36 | .index-page--subtitle { 37 | margin-top: 10px; 38 | margin-bottom: 30px; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /samples/multi/application/src/main/java/hello/app/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package hello.app; 2 | 3 | import hello.service.MyService; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | @SpringBootApplication(scanBasePackages = "hello") 10 | @RestController 11 | public class DemoApplication { 12 | 13 | private final MyService myService; 14 | 15 | public DemoApplication(MyService myService) { 16 | this.myService = myService; 17 | } 18 | 19 | @GetMapping("/") 20 | public String home() { 21 | return myService.message(); 22 | } 23 | 24 | public static void main(String[] args) { 25 | SpringApplication.run(DemoApplication.class, args); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /gradle-plugin/README.md: -------------------------------------------------------------------------------- 1 | The Spring Boot Thin Gradle Plugin can be built and published from here. To send a release to Maven Central: 2 | 3 | ``` 4 | $ ../mvnw deploy 5 | ``` 6 | 7 | To send it to Bintray: 8 | 9 | ``` 10 | $ ../mvnw deploy -P bintray 11 | ``` 12 | 13 | To sync with Gradle Plugin Registry you also need to POST some JSON to Bintray 14 | 15 | ``` 16 | $ curl -H "Content-Type: application/json" -u : https://api.bintray.com/packages/spring/jars/spring-boot-thin/versions//attributes \ 17 | -d '[{"name":"gradle-plugin","type":"string","values":["org.springframework.boot.experimental.thin-launcher:org.springframework.boot.experimental:spring-boot-thin-gradle-plugin"]}]' 18 | ``` 19 | 20 | where `` is the current (RELEASE) version, and `:` can be found in the Bintray UI. You need the same username and token to do the `mvn deploy` anyway (in `settings.xml`). 21 | -------------------------------------------------------------------------------- /launcher/src/test/resources/settings/proxy/.m2/settings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | central-mirror 9 | https://central-mirror.example.com/maven2 10 | central 11 | 12 | 13 | 14 | 15 | 16 | central-mirror 17 | user 18 | password 19 | 20 | 21 | 22 | 23 | 24 | true 25 | http 26 | proxy.example.com 27 | 3128 28 | user 29 | password 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /samples/tests/src/it/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | it-repo 6 | 7 | true 8 | 9 | 10 | 11 | local.central 12 | @localRepositoryUrl@ 13 | 14 | true 15 | 16 | 17 | true 18 | 19 | 20 | 21 | 22 | 23 | local.central 24 | @localRepositoryUrl@ 25 | 26 | true 27 | 28 | 29 | true 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt: -------------------------------------------------------------------------------- 1 | ================================================================================ 2 | === Spring PetClinic sample application - MySQL Configuration === 3 | ================================================================================ 4 | 5 | @author Sam Brannen 6 | @author Costin Leau 7 | @author Dave Syer 8 | 9 | -------------------------------------------------------------------------------- 10 | 11 | 1) Download and install the MySQL database (e.g., MySQL Community Server 5.1.x), 12 | which can be found here: https://dev.mysql.com/downloads/ 13 | 14 | 2) Add the MySQL JDBC driver to your classpath. 15 | 16 | 3) Set "database=mysql" in "application.properties" 17 | 18 | 4) Create the PetClinic database and user by executing the "db/mysql/{schema,data}.sql" 19 | scripts (or set "spring.datasource.initialize=true" the first time you run the app. 20 | -------------------------------------------------------------------------------- /samples/multi/application/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.3.9.RELEASE' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | id 'maven' 6 | id 'org.springframework.boot.experimental.thin-launcher' version '1.0.27.BUILD-SNAPSHOT' 7 | } 8 | 9 | // Shouldn't need this... 10 | jar { 11 | manifest { 12 | attributes( 13 | 'Start-Class': 'hello.app.DemoApplication' 14 | ) 15 | } 16 | } 17 | 18 | jar { 19 | baseName = 'application' 20 | version = '0.0.1-SNAPSHOT' 21 | } 22 | group = 'com.example' 23 | version = '0.0.1-SNAPSHOT' 24 | sourceCompatibility = 1.8 25 | 26 | repositories { mavenCentral() } 27 | 28 | dependencies { 29 | compile('org.springframework.boot:spring-boot-starter-actuator') 30 | compile('org.springframework.boot:spring-boot-starter-web') 31 | compile project(':library') 32 | testCompile('org.springframework.boot:spring-boot-starter-test') 33 | } 34 | 35 | -------------------------------------------------------------------------------- /samples/main/src/main/java/main/Main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package main; 18 | 19 | /** 20 | * @author Dave Syer 21 | * 22 | */ 23 | public class Main { 24 | 25 | public static void main(String[] args) { 26 | System.out.println("Main Running"); 27 | System.out.println(System.getProperties()); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /samples/other/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.3.7.RELEASE' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | id 'maven' 6 | id 'org.springframework.boot.experimental.thin-launcher' version '1.0.27.BUILD-SNAPSHOT' 7 | } 8 | 9 | group = 'com.example' 10 | version = '0.0.1-SNAPSHOT' 11 | sourceCompatibility = 1.8 12 | targetCompatibility = 1.8 13 | 14 | // Shouldn't need this... 15 | jar { 16 | manifest { 17 | attributes( 18 | 'Start-Class': 'com.example.LauncherApplication' 19 | ) 20 | } 21 | } 22 | 23 | thinResolvePrepare { 24 | into new File("${buildDir}/thin/deploy") 25 | } 26 | 27 | repositories { 28 | mavenLocal() 29 | mavenCentral() 30 | maven { url "https://repo.spring.io/snapshot" } 31 | maven { url "https://repo.spring.io/milestone" } 32 | } 33 | 34 | dependencies { 35 | compile('org.springframework.boot:spring-boot-starter') 36 | testCompile('org.springframework.boot:spring-boot-starter-test') 37 | } 38 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/authentication/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | UTF-8 16 | UTF-8 17 | 18 | 19 | 20 | 21 | com.example 22 | app 23 | 0.0.1-SNAPSHOT 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /samples/fat/src/main/java/com/example/LauncherApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.web.reactive.function.server.RouterFunction; 7 | 8 | import static org.springframework.web.reactive.function.server.RequestPredicates.GET; 9 | import static org.springframework.web.reactive.function.server.RouterFunctions.route; 10 | import static org.springframework.web.reactive.function.server.ServerResponse.ok; 11 | 12 | import reactor.core.publisher.Mono; 13 | 14 | @SpringBootApplication 15 | public class LauncherApplication { 16 | 17 | @Bean 18 | public RouterFunction endpoints() { 19 | return route(GET("/"), 20 | request -> ok().body(Mono.just("Hello"), String.class)); 21 | } 22 | 23 | public static void main(String[] args) { 24 | SpringApplication.run(LauncherApplication.class, args); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/vets/vetList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 |

Veterinarians

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 |
NameSpecialties
none
26 | 27 | 28 | 29 | 31 | 32 | 33 |
View 30 | as XMLView as JSON
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/fragments/inputField.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
8 | 9 |
10 | 12 | 15 | 16 | 19 | Error 20 | 21 |
22 |
23 |
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /samples/multi/library/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | library 7 | jar 8 | 9 | 10 | com.example 11 | multi 12 | 0.0.1-SNAPSHOT 13 | 14 | 15 | 16 | UTF-8 17 | 1.8 18 | 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-test 28 | test 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yaml: -------------------------------------------------------------------------------- 1 | name: deploy 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | if: "!contains(github.event.head_commit.message, 'ci skip')" 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: Set up JDK 1.8 16 | uses: actions/setup-java@v1 17 | with: 18 | java-version: 1.8 19 | - name: Cache Maven packages 20 | uses: actions/cache@v2 21 | with: 22 | path: ~/.m2 23 | key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} 24 | restore-keys: ${{ runner.os }}-m2 25 | - name: Build with Maven 26 | env: 27 | spring_username: ${{ secrets.BUILD_USER }} 28 | spring_password: ${{ secrets.BUILD_PASSWORD }} 29 | run: ./mvnw -B install -s .mvn/settings.xml 30 | - name: Deploy 31 | env: 32 | spring_username: ${{ secrets.BUILD_USER }} 33 | spring_password: ${{ secrets.BUILD_PASSWORD }} 34 | run: ./mvnw -B deploy -s .mvn/settings.xml -DskipTests -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/owner/PetType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.owner; 17 | 18 | import javax.persistence.Entity; 19 | import javax.persistence.Table; 20 | 21 | import org.springframework.samples.petclinic.model.NamedEntity; 22 | 23 | /** 24 | * @author Juergen Hoeller 25 | * Can be Cat, Dog, Hamster... 26 | */ 27 | @Entity 28 | @Table(name = "types") 29 | public class PetType extends NamedEntity { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/fragments/selectField.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
8 | 9 | 10 |
11 | 15 | 18 | 19 | 22 | Error 23 | 24 |
25 |
26 |
27 |
28 | 29 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/owners/ownersList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Owners

8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 28 | 29 | 30 |
NameAddressCityTelephonePets
22 | 23 | 25 | 26 | 27 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /layout/src/main/java/org/springframework/boot/loader/thin/ThinLayoutFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.boot.loader.thin; 18 | 19 | import java.io.File; 20 | 21 | import org.springframework.boot.loader.tools.Layout; 22 | import org.springframework.boot.loader.tools.LayoutFactory; 23 | 24 | /** 25 | * @author Dave Syer 26 | * 27 | */ 28 | public class ThinLayoutFactory implements LayoutFactory { 29 | 30 | @Override 31 | public Layout getLayout(File source) { 32 | return new ThinLayout(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /deployer/src/main/java/org/springframework/cloud/deployer/thin/ThinJarAppDeployerAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package org.springframework.cloud.deployer.thin; 2 | 3 | import org.springframework.boot.autoconfigure.AutoConfigureOrder; 4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 5 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; 6 | import org.springframework.cloud.deployer.spi.app.AppDeployer; 7 | import org.springframework.cloud.deployer.spi.task.TaskLauncher; 8 | import org.springframework.context.annotation.Bean; 9 | import org.springframework.context.annotation.Configuration; 10 | import org.springframework.core.Ordered; 11 | 12 | @Configuration(proxyBeanMethods = false) 13 | @ConditionalOnClass(ThinJarAppDeployer.class) 14 | @AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE) 15 | public class ThinJarAppDeployerAutoConfiguration { 16 | 17 | @Bean 18 | @ConditionalOnMissingBean(AppDeployer.class) 19 | public AppDeployer appDeployer() { 20 | return new ThinJarAppDeployer(); 21 | } 22 | 23 | @Bean 24 | @ConditionalOnMissingBean(TaskLauncher.class) 25 | public TaskLauncher taskLauncher() { 26 | return new ThinJarTaskLauncher(); 27 | } 28 | } -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/vet/Specialty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.vet; 17 | 18 | import javax.persistence.Entity; 19 | import javax.persistence.Table; 20 | 21 | import org.springframework.samples.petclinic.model.NamedEntity; 22 | 23 | /** 24 | * Models a {@link Vet Vet's} specialty (for example, dentistry). 25 | * 26 | * @author Juergen Hoeller 27 | */ 28 | @Entity 29 | @Table(name = "specialties") 30 | public class Specialty extends NamedEntity { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /launcher/src/test/java/org/springframework/boot/loader/thin/AdhocTestSuite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.boot.loader.thin; 18 | 19 | import org.junit.jupiter.api.Disabled; 20 | import org.junit.platform.suite.api.SelectClasses; 21 | import org.junit.platform.suite.api.Suite; 22 | 23 | /** 24 | * A test suite for probing weird ordering problems in the tests. 25 | * 26 | * @author Dave Syer 27 | */ 28 | @Suite 29 | @SelectClasses({ DependencyResolverSettingsTests.class, ThinJarLauncherTests.class }) 30 | @Disabled 31 | public class AdhocTestSuite { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/owners/createOrUpdateOwnerForm.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 |

Owner

7 |
8 |
9 | 11 | 13 | 15 | 17 | 19 |
20 |
21 |
22 | 26 |
27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/owners/findOwners.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 |

Find Owners

7 | 8 |
10 |
11 |
12 | 13 |
14 |
17 |

Error

18 |
19 |
20 |
21 |
22 |
23 |
24 | 26 |
27 |
28 | 29 |
30 | 31 |
32 | Add Owner 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /deployer/README.adoc: -------------------------------------------------------------------------------- 1 | This project contains an implementation of the Spring Cloud `AppDeployer` SPI, which launches an executable thin jar as a Spring Application in the current JVM, but with an isolated class loader. It is roughly 4 times faster than the canonical "local" `AppDeployer` that launches the same jars as separate processes. (There are integration tests that you can run to verify this.) 2 | 3 | Usage: 4 | 5 | * Create a https://github.com/dsyer/spring-boot-thin-launcher[thin jar] with a `Start-Class` or unique main class (a class with a main method that is a `@SpringBootApplication`). 6 | 7 | * Create a `ThinJarAppDeployer` and use it to deploy the jar. 8 | 9 | Example: 10 | 11 | ```java 12 | ThinJarAppDeployer deployer = new ThinJarAppDeployer(); 13 | Resource resource = new FileSystemResource("/mythin.jar" + jarName); 14 | AppDefinition definition = new AppDefinition("mythin", Collections.emptyMap()); 15 | AppDeploymentRequest request = new AppDeploymentRequest(definition, resource, 16 | Collections.emptyMap(), Collections.emptyList()); 17 | String id = deployer.deploy(request); 18 | ``` 19 | 20 | == License 21 | This project is Open Source software released under the 22 | https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license]. 23 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/jitpack/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | jitpack 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | demo 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.4.3.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | com.example.maven 30 | maven-simple 31 | 1.0 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2014 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * PetClinic Spring Boot Application. 24 | * 25 | * @author Dave Syer 26 | * 27 | */ 28 | @SpringBootApplication 29 | public class PetClinicApplication { 30 | 31 | public static void main(String[] args) throws Exception { 32 | SpringApplication.run(PetClinicApplication.class, args); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/beanvalidation-snapshot/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | beanvalidation-snapshot 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | demo 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.4.3.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | javax.validation 30 | validation-api 31 | 2.0.2-SNAPSHOT 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /locator/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | springBootVersion = '1.5.1.RELEASE' 4 | wrapperVersion = '1.0.27.BUILD-SNAPSHOT' 5 | } 6 | repositories { 7 | mavenLocal() 8 | mavenCentral() 9 | maven { url "https://repo.spring.io/snapshot" } 10 | maven { url "https://repo.spring.io/milestone" } 11 | } 12 | dependencies { 13 | classpath("org.springframework.boot.experimental:spring-boot-thin-layout:${wrapperVersion}") 14 | classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 15 | } 16 | } 17 | 18 | apply plugin: 'java' 19 | apply plugin: 'maven' 20 | apply plugin: 'eclipse' 21 | apply plugin: 'org.springframework.boot' 22 | 23 | task createPom { 24 | doLast { 25 | pom { 26 | withXml(dependencyManagement.pomConfigurer) 27 | }.writeTo("build/resources/main/META-INF/maven/${project.group}/${project.name}/pom.xml") 28 | } 29 | } 30 | 31 | group = 'com.example' 32 | version = '0.0.1-SNAPSHOT' 33 | sourceCompatibility = 1.8 34 | targetCompatibility = 1.8 35 | 36 | repositories { 37 | mavenLocal() 38 | mavenCentral() 39 | maven { url "https://repo.spring.io/snapshot" } 40 | maven { url "https://repo.spring.io/milestone" } 41 | } 42 | 43 | dependencies { 44 | compile('org.springframework.boot:spring-boot-starter') 45 | testCompile('org.springframework.boot:spring-boot-starter-test') 46 | } 47 | 48 | jar.dependsOn = [createPom] -------------------------------------------------------------------------------- /deployer/src/test/resources/apps/app/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | other 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | other 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.2.2.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-starter-test 34 | test 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/pets/createOrUpdatePetForm.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 |

7 | New 8 | Pet 9 |

10 |
11 | 12 |
13 |
14 | 15 |
16 | 17 |
18 |
19 | 21 | 23 | 25 |
26 |
27 |
28 | 32 |
33 |
34 |
35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /.mvn/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | release 6 | 7 | true 8 | 9 | 10 | ${env.passphrase} 11 | 12 | 13 | 14 | 15 | 16 | sonatype-nexus-staging 17 | ${env.sonatype_username} 18 | ${env.sonatype_password} 19 | 20 | 21 | repo.spring.io 22 | ${env.spring_username} 23 | ${env.spring_password} 24 | 25 | 26 | spring-libs-milestones 27 | ${env.spring_username} 28 | ${env.spring_password} 29 | 30 | 31 | spring-libs-snapshots 32 | ${env.spring_username} 33 | ${env.spring_password} 34 | 35 | 36 | spring-libs-releases 37 | ${env.spring_username} 38 | ${env.spring_password} 39 | 40 | 41 | spring-libs-plugins 42 | ${env.spring_username} 43 | ${env.spring_password} 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /samples/multi/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | multi 8 | 0.0.1-SNAPSHOT 9 | pom 10 | 11 | 12 | org.springframework.boot 13 | spring-boot-starter-parent 14 | 2.3.9.RELEASE 15 | 16 | 17 | 18 | 19 | UTF-8 20 | 1.8 21 | 3.1.0 22 | 1.0.27.BUILD-SNAPSHOT 23 | 24 | 25 | 26 | library 27 | application 28 | 29 | 30 | 31 | 32 | 33 | org.apache.maven.plugins 34 | maven-deploy-plugin 35 | 36 | true 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/vet/Vets.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.vet; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import javax.xml.bind.annotation.XmlElement; 22 | import javax.xml.bind.annotation.XmlRootElement; 23 | 24 | /** 25 | * Simple domain object representing a list of veterinarians. Mostly here to be used for the 'vets' {@link 26 | * org.springframework.web.servlet.view.xml.MarshallingView}. 27 | * 28 | * @author Arjen Poutsma 29 | */ 30 | @XmlRootElement 31 | public class Vets { 32 | 33 | private List vets; 34 | 35 | @XmlElement 36 | public List getVetList() { 37 | if (vets == null) { 38 | vets = new ArrayList<>(); 39 | } 40 | return vets; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/classifier/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | classifier 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.1.0.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 1.0.27.BUILD-SNAPSHOT 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-test 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-test 36 | tests 37 | ${project.parent.version} 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /samples/simple/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.2.4.RELEASE' 3 | id 'io.spring.dependency-management' version '1.0.9.RELEASE' 4 | id 'java' 5 | id 'maven' 6 | id 'org.springframework.boot.experimental.thin-launcher' version '1.0.27.BUILD-SNAPSHOT' 7 | } 8 | 9 | group = 'com.example' 10 | version = '0.0.1-SNAPSHOT' 11 | sourceCompatibility = '1.8' 12 | 13 | // Shouldn't need this... 14 | jar { 15 | manifest { 16 | attributes( 17 | 'Start-Class': 'com.example.LauncherApplication' 18 | ) 19 | } 20 | } 21 | 22 | repositories { 23 | mavenLocal() 24 | mavenCentral() 25 | maven { url "https://repo.spring.io/snapshot" } 26 | maven { url "https://repo.spring.io/milestone" } 27 | } 28 | 29 | ext { 30 | set('springCloudVersion', "Hoxton.SR1") 31 | } 32 | 33 | configurations { implementation.exclude module: 'spring-boot-starter-tomcat' } 34 | 35 | dependencies { 36 | implementation('org.springframework.cloud:spring-cloud-starter-config') 37 | implementation('org.springframework.boot:spring-boot-starter-web') 38 | implementation('org.springframework.boot:spring-boot-starter-jetty') 39 | implementation('org.springframework.boot:spring-boot-starter-actuator') 40 | testImplementation('org.springframework.boot:spring-boot-starter-test') { 41 | exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' 42 | } 43 | } 44 | dependencyManagement { 45 | imports { 46 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" 47 | } 48 | } 49 | 50 | test { 51 | useJUnitPlatform() 52 | } 53 | -------------------------------------------------------------------------------- /samples/pom/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | pom 8 | 0.1.0 9 | pom 10 | 11 | 12 | UTF-8 13 | 1.8 14 | 1.0.27.BUILD-SNAPSHOT 15 | 16 | 17 | 18 | 19 | 20 | 21 | org.springframework.boot.experimental 22 | spring-boot-thin-maven-plugin 23 | ${wrapper.version} 24 | 25 | 26 | properties 27 | 28 | properties 29 | 30 | false 31 | 32 | 33 | 34 | 35 | org.apache.maven.plugins 36 | maven-deploy-plugin 37 | 2.8.2 38 | 39 | true 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/preresolved-classifier/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | classifier 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.1.0.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 1.0.27.BUILD-SNAPSHOT 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-test 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-test 36 | tests 37 | ${project.parent.version} 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/projectvariables/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 1.3.8.RELEASE 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | UTF-8 16 | UTF-8 17 | 1.8 18 | 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-web 24 | ${project.version} 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-test 29 | ${project.version} 30 | test 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.apache.maven.plugins 38 | maven-deploy-plugin 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/same-artifact-names/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | same-artifact-names 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.1.0.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 1.0.27.BUILD-SNAPSHOT 26 | 27 | 28 | 29 | 30 | org.glassfish.jersey.core 31 | jersey-client 32 | 33 | 34 | com.sun.jersey 35 | jersey-client 36 | 1.19.1 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/model/NamedEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.model; 17 | 18 | import javax.persistence.Column; 19 | import javax.persistence.MappedSuperclass; 20 | 21 | 22 | /** 23 | * Simple JavaBean domain object adds a name property to BaseEntity. Used as a base class for objects 24 | * needing these properties. 25 | * 26 | * @author Ken Krebs 27 | * @author Juergen Hoeller 28 | */ 29 | @MappedSuperclass 30 | public class NamedEntity extends BaseEntity { 31 | 32 | @Column(name = "name") 33 | private String name; 34 | 35 | public String getName() { 36 | return this.name; 37 | } 38 | 39 | public void setName(String name) { 40 | this.name = name; 41 | } 42 | 43 | @Override 44 | public String toString() { 45 | return this.getName(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/system/CrashController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.system; 17 | 18 | import org.springframework.stereotype.Controller; 19 | import org.springframework.web.bind.annotation.RequestMapping; 20 | import org.springframework.web.bind.annotation.RequestMethod; 21 | 22 | /** 23 | * Controller used to showcase what happens when an exception is thrown 24 | * 25 | * @author Michael Isvy 26 | *

27 | * Also see how a view that resolves to "error" has been added ("error.html"). 28 | */ 29 | @Controller 30 | class CrashController { 31 | 32 | @RequestMapping(value = "/oups", method = RequestMethod.GET) 33 | public String triggerException() { 34 | throw new RuntimeException( 35 | "Expected: controller used to showcase what " + "happens when an exception is thrown"); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/model/BaseEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.model; 17 | 18 | import javax.persistence.GeneratedValue; 19 | import javax.persistence.GenerationType; 20 | import javax.persistence.Id; 21 | import javax.persistence.MappedSuperclass; 22 | 23 | /** 24 | * Simple JavaBean domain object with an id property. Used as a base class for objects needing this property. 25 | * 26 | * @author Ken Krebs 27 | * @author Juergen Hoeller 28 | */ 29 | @MappedSuperclass 30 | public class BaseEntity { 31 | @Id 32 | @GeneratedValue(strategy = GenerationType.IDENTITY) 33 | protected Integer id; 34 | 35 | public Integer getId() { 36 | return id; 37 | } 38 | 39 | public void setId(Integer id) { 40 | this.id = id; 41 | } 42 | 43 | public boolean isNew() { 44 | return this.id == null; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /samples/tests/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | springBootVersion = '1.5.3.RELEASE' 4 | wrapperVersion = '1.0.27.BUILD-SNAPSHOT' 5 | } 6 | repositories { 7 | mavenLocal() 8 | mavenCentral() 9 | maven { url "https://repo.spring.io/snapshot" } 10 | maven { url "https://repo.spring.io/milestone" } 11 | } 12 | dependencies { 13 | classpath("org.springframework.boot.experimental:spring-boot-thin-layout:${wrapperVersion}") 14 | classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 15 | } 16 | } 17 | 18 | apply plugin: 'java' 19 | apply plugin: 'eclipse' 20 | apply plugin: 'org.springframework.boot' 21 | 22 | task libs << { 23 | def file = new File('build/resources/main/META-INF/thin.properties') 24 | file.text='' 25 | configurations.runtime.dependencies.each { def version = it.version ? ":${it.version}" : ""; file << "dependencies.${it.name}=${it.group}:${it.name}${version}\n" } 26 | configurations.compile.dependencies.each { def version = it.version ? ":${it.version}" : "";file << "dependencies.${it.name}=${it.group}:${it.name}${version}\n" } 27 | } 28 | 29 | jar { 30 | baseName = 'app' 31 | version = '0.0.1-SNAPSHOT' 32 | } 33 | sourceCompatibility = 1.8 34 | targetCompatibility = 1.8 35 | 36 | repositories { 37 | mavenLocal() 38 | mavenCentral() 39 | maven { url "https://repo.spring.io/snapshot" } 40 | maven { url "https://repo.spring.io/milestone" } 41 | } 42 | 43 | dependencies { 44 | compile('org.springframework.boot:spring-boot-starter') 45 | testCompile('org.springframework.boot:spring-boot-starter-test') 46 | } 47 | 48 | jar.dependsOn = [libs] -------------------------------------------------------------------------------- /tools/converter/src/test/java/org/springframework/boot/loader/thin/converter/PatternTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.boot.loader.thin.converter; 18 | 19 | import java.nio.file.Path; 20 | import java.nio.file.Paths; 21 | 22 | import org.junit.jupiter.api.Test; 23 | 24 | import static org.assertj.core.api.Assertions.assertThat; 25 | 26 | /** 27 | * @author Dave Syer 28 | * 29 | */ 30 | public class PatternTests { 31 | 32 | @Test 33 | public void test() { 34 | Path path = Paths.get("spring-cloud-function-context/1.0.0.BUILD-SNAPSHOT/", 35 | "spring-cloud-function-context-1.0.0.BUILD-20180521.090752-196.jar"); 36 | assertThat(isDuplicate(path)).isTrue(); 37 | } 38 | 39 | private boolean isDuplicate(Path file) { 40 | String name = file.getFileName().toString(); 41 | String alt = name.replaceAll("[0-9]*\\.[0-9]*-[0-9]*", "SNAPSHOT"); 42 | if (!name.equals(alt)) { 43 | return true; 44 | } 45 | return false; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tools/converter/src/main/java/org/springframework/boot/loader/thin/converter/PathLibraries.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.boot.loader.thin.converter; 17 | 18 | import java.io.IOException; 19 | import java.nio.file.Path; 20 | import java.util.Set; 21 | 22 | import org.springframework.boot.loader.tools.Libraries; 23 | import org.springframework.boot.loader.tools.Library; 24 | import org.springframework.boot.loader.tools.LibraryCallback; 25 | import org.springframework.boot.loader.tools.LibraryScope; 26 | 27 | /** 28 | * @author Dave Syer 29 | * 30 | */ 31 | public class PathLibraries implements Libraries { 32 | 33 | private Set paths; 34 | 35 | public PathLibraries(Set paths) { 36 | this.paths = paths; 37 | } 38 | 39 | @Override 40 | public void doWithLibraries(LibraryCallback callback) throws IOException { 41 | for (Path path : paths) { 42 | callback.library(new Library(path.toFile(), LibraryScope.RUNTIME)); 43 | } 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/placeholders/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | UTF-8 16 | UTF-8 17 | 1.8 18 | 1.3.8.RELEASE 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-web 25 | ${spring-boot.version} 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-test 30 | ${spring-boot.version} 31 | test 32 | 33 | 34 | 35 | 36 | 37 | 38 | org.apache.maven.plugins 39 | maven-deploy-plugin 40 | 41 | true 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /samples/tests/src/test/java/com/example/Utils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.example; 17 | 18 | import java.io.File; 19 | 20 | /** 21 | * @author Dave Syer 22 | * 23 | */ 24 | public class Utils { 25 | 26 | public static String javaCommand() { 27 | String javaHome = System.getProperty("java.home"); 28 | if (javaHome == null) { 29 | return "java"; // Hope it's in PATH 30 | } 31 | File javaExecutable = new File(javaHome, "bin/java"); 32 | if (javaExecutable.exists() && javaExecutable.canExecute()) { 33 | return javaExecutable.getAbsolutePath(); 34 | } 35 | return "java"; 36 | } 37 | 38 | public static String jarCommand() { 39 | String javaHome = System.getProperty("java.home"); 40 | if (javaHome == null) { 41 | return "jar"; // Hope it's in PATH 42 | } 43 | File javaExecutable = new File(javaHome, "bin/jar"); 44 | if (javaExecutable.exists() && javaExecutable.canExecute()) { 45 | return javaExecutable.getAbsolutePath(); 46 | } 47 | return "jar"; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.5.3.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 0.0.1.BUILD-SNAPSHOT 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-web 36 | test 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-starter-test 41 | test 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /launcher/src/main/java/org/springframework/boot/loader/thin/CompositeProxySelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.boot.loader.thin; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import org.eclipse.aether.repository.Proxy; 22 | import org.eclipse.aether.repository.ProxySelector; 23 | import org.eclipse.aether.repository.RemoteRepository; 24 | 25 | /** 26 | * Composite {@link ProxySelector}. 27 | * 28 | * @author Dave Syer 29 | * @since 1.1.0 30 | */ 31 | public class CompositeProxySelector implements ProxySelector { 32 | 33 | private List selectors = new ArrayList(); 34 | 35 | public CompositeProxySelector(List selectors) { 36 | this.selectors = selectors; 37 | } 38 | 39 | @Override 40 | public Proxy getProxy(RemoteRepository repository) { 41 | for (ProxySelector selector : this.selectors) { 42 | Proxy proxy = selector.getProxy(repository); 43 | if (proxy != null) { 44 | return proxy; 45 | } 46 | } 47 | return null; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /samples/app/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | springBootVersion = '2.0.2.RELEASE' 4 | wrapperVersion = '1.0.27.BUILD-SNAPSHOT' 5 | } 6 | repositories { 7 | mavenLocal() 8 | mavenCentral() 9 | maven { url "https://repo.spring.io/snapshot" } 10 | maven { url "https://repo.spring.io/milestone" } 11 | } 12 | dependencies { 13 | classpath("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${wrapperVersion}") 14 | classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 15 | } 16 | } 17 | 18 | apply plugin: 'java' 19 | apply plugin: 'maven-publish' 20 | apply plugin: 'eclipse' 21 | apply plugin: 'io.spring.dependency-management' 22 | apply plugin: 'org.springframework.boot' 23 | apply plugin: 'org.springframework.boot.experimental.thin-launcher' 24 | 25 | group = 'com.example' 26 | version = '0.0.1-SNAPSHOT' 27 | sourceCompatibility = 1.8 28 | targetCompatibility = 1.8 29 | 30 | repositories { 31 | mavenLocal() 32 | mavenCentral() 33 | maven { name "spring-snapshot"; url "https://repo.spring.io/snapshot" } 34 | maven { name "spring-milestone"; url "https://repo.spring.io/milestone" } 35 | } 36 | 37 | dependencies { 38 | implementation('org.springframework.boot:spring-boot-starter') 39 | testImplementation('org.springframework.boot:spring-boot-starter-test') 40 | } 41 | 42 | // Optional manipulation of the jar file 43 | bootJar { 44 | classifier = 'boot' // creates a fat jar as well 45 | manifest { 46 | attributes 'Marker': 'Boot' // adds an attribute to the manifest 47 | } 48 | } 49 | 50 | // This is necessary in order to generate a pom.xml 51 | publishing { 52 | publications { 53 | mavenJava(MavenPublication) { 54 | from components.java 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /samples/multi/application/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | application 7 | jar 8 | 9 | 10 | com.example 11 | multi 12 | 0.0.1-SNAPSHOT 13 | 14 | 15 | 16 | 17 | org.springframework.boot 18 | spring-boot-starter-actuator 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-web 23 | 24 | 25 | com.example 26 | library 27 | ${project.version} 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-test 33 | test 34 | 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-maven-plugin 42 | 43 | 44 | org.springframework.boot.experimental 45 | spring-boot-thin-layout 46 | ${wrapper.version} 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /samples/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | org.springframework.boot.experimental 6 | spring-boot-thin-launcher-samples 7 | 0.0.1.BUILD-SNAPSHOT 8 | pom 9 | Thin Launcher Samples 10 | 11 | 12 | org.springframework.boot 13 | spring-boot-starter-parent 14 | 2.4.3 15 | 16 | 17 | 18 | 19 | app 20 | other 21 | shadow 22 | simple 23 | fat 24 | petclinic 25 | multi 26 | pom 27 | tests 28 | 29 | 30 | 31 | 32 | 33 | org.apache.maven.plugins 34 | maven-deploy-plugin 35 | 36 | true 37 | 38 | 39 | 40 | org.apache.maven.plugins 41 | maven-clean-plugin 42 | 3.0.0 43 | 44 | 45 | 46 | build 47 | 48 | 49 | target 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/less/header.less: -------------------------------------------------------------------------------- 1 | .navbar { 2 | border-top: 4px solid #6db33f; 3 | background-color: #34302d; 4 | margin-bottom: 0px; 5 | border-bottom: 0; 6 | border-left: 0; 7 | border-right: 0; 8 | } 9 | 10 | .navbar a.navbar-brand { 11 | background: url("../images/spring-logo-dataflow.png") -1px -1px no-repeat; 12 | margin: 12px 0 6px; 13 | width: 229px; 14 | height: 46px; 15 | display: inline-block; 16 | text-decoration: none; 17 | padding: 0; 18 | } 19 | 20 | .navbar a.navbar-brand span { 21 | display: block; 22 | width: 229px; 23 | height: 46px; 24 | background: url("../images/spring-logo-dataflow.png") -1px -48px no-repeat; 25 | opacity: 0; 26 | -moz-transition: opacity 0.12s ease-in-out; 27 | -webkit-transition: opacity 0.12s ease-in-out; 28 | -o-transition: opacity 0.12s ease-in-out; 29 | } 30 | 31 | .navbar a:hover.navbar-brand span { 32 | opacity: 1; 33 | } 34 | 35 | .navbar li > a, .navbar-text { 36 | font-family: "montserratregular", sans-serif; 37 | text-shadow: none; 38 | font-size: 14px; 39 | 40 | /* line-height: 14px; */ 41 | padding: 28px 20px; 42 | transition: all 0.15s; 43 | -webkit-transition: all 0.15s; 44 | -moz-transition: all 0.15s; 45 | -o-transition: all 0.15s; 46 | -ms-transition: all 0.15s; 47 | } 48 | 49 | .navbar li > a { 50 | text-transform: uppercase; 51 | } 52 | 53 | .navbar .navbar-text { 54 | margin-top: 0; 55 | margin-bottom: 0; 56 | } 57 | .navbar li:hover > a { 58 | color: #eeeeee; 59 | background-color: #6db33f; 60 | } 61 | 62 | .navbar-toggle { 63 | border-width: 0; 64 | 65 | .icon-bar + .icon-bar { 66 | margin-top: 3px; 67 | } 68 | .icon-bar { 69 | width: 19px; 70 | height: 3px; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/model/Person.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.model; 17 | 18 | import javax.persistence.Column; 19 | import javax.persistence.MappedSuperclass; 20 | 21 | import org.hibernate.validator.constraints.NotEmpty; 22 | 23 | /** 24 | * Simple JavaBean domain object representing an person. 25 | * 26 | * @author Ken Krebs 27 | */ 28 | @MappedSuperclass 29 | public class Person extends BaseEntity { 30 | 31 | @Column(name = "first_name") 32 | @NotEmpty 33 | protected String firstName; 34 | 35 | @Column(name = "last_name") 36 | @NotEmpty 37 | protected String lastName; 38 | 39 | public String getFirstName() { 40 | return this.firstName; 41 | } 42 | 43 | public void setFirstName(String firstName) { 44 | this.firstName = firstName; 45 | } 46 | 47 | public String getLastName() { 48 | return this.lastName; 49 | } 50 | 51 | public void setLastName(String lastName) { 52 | this.lastName = lastName; 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/less/typography.less: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'varela_roundregular'; 3 | 4 | src: url('../fonts/varela_round-webfont.eot'); 5 | src: url('../fonts/varela_round-webfont.eot?#iefix') format('embedded-opentype'), 6 | url('../fonts/varela_round-webfont.woff') format('woff'), 7 | url('../fonts/varela_round-webfont.ttf') format('truetype'), 8 | url('../fonts/varela_round-webfont.svg#varela_roundregular') format('svg'); 9 | font-weight: normal; 10 | font-style: normal; 11 | } 12 | 13 | @font-face { 14 | font-family: 'montserratregular'; 15 | src: url('../fonts/montserrat-webfont.eot'); 16 | src: url('../fonts/montserrat-webfont.eot?#iefix') format('embedded-opentype'), 17 | url('../fonts/montserrat-webfont.woff') format('woff'), 18 | url('../fonts/montserrat-webfont.ttf') format('truetype'), 19 | url('../fonts/montserrat-webfont.svg#montserratregular') format('svg'); 20 | font-weight: normal; 21 | font-style: normal; 22 | } 23 | 24 | body, h1, h2, h3, p, input { 25 | margin: 0; 26 | font-weight: 400; 27 | font-family: "varela_roundregular", sans-serif; 28 | color: #34302d; 29 | } 30 | 31 | h1 { 32 | font-size: 24px; 33 | line-height: 30px; 34 | font-family: "montserratregular", sans-serif; 35 | } 36 | 37 | h2 { 38 | font-size: 18px; 39 | font-weight: 700; 40 | line-height: 24px; 41 | margin-bottom: 10px; 42 | font-family: "montserratregular", sans-serif; 43 | } 44 | 45 | h3 { 46 | font-size: 16px; 47 | line-height: 24px; 48 | margin-bottom: 10px; 49 | font-weight: 700; 50 | } 51 | 52 | p { 53 | //font-size: 15px; 54 | //line-height: 24px; 55 | } 56 | 57 | strong { 58 | font-weight: 700; 59 | font-family: "montserratregular", sans-serif; 60 | } 61 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/parent-properties-override/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.4.1.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 4.3.5.RELEASE 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-test 36 | test 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.apache.maven.plugins 44 | maven-deploy-plugin 45 | 46 | true 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/visit/VisitRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.visit; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.dao.DataAccessException; 21 | import org.springframework.data.repository.Repository; 22 | import org.springframework.samples.petclinic.model.BaseEntity; 23 | 24 | /** 25 | * Repository class for Visit domain objects All method names are compliant 26 | * with Spring Data naming conventions so this interface can easily be extended for Spring 27 | * Data 28 | * 29 | * @author Ken Krebs 30 | * @author Juergen Hoeller 31 | * @author Sam Brannen 32 | * @author Michael Isvy 33 | */ 34 | public interface VisitRepository extends Repository { 35 | 36 | /** 37 | * Save a Visit to the data store, either inserting or updating it. 38 | * 39 | * @param visit the Visit to save 40 | * @see BaseEntity#isNew 41 | */ 42 | void save(Visit visit) throws DataAccessException; 43 | 44 | List findByPetId(Integer petId); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/vet/VetRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.vet; 17 | 18 | import java.util.Collection; 19 | 20 | import org.springframework.cache.annotation.Cacheable; 21 | import org.springframework.dao.DataAccessException; 22 | import org.springframework.data.repository.Repository; 23 | import org.springframework.transaction.annotation.Transactional; 24 | 25 | /** 26 | * Repository class for Vet domain objects All method names are compliant 27 | * with Spring Data naming conventions so this interface can easily be extended for Spring 28 | * Data 29 | * 30 | * @author Ken Krebs 31 | * @author Juergen Hoeller 32 | * @author Sam Brannen 33 | * @author Michael Isvy 34 | */ 35 | public interface VetRepository extends Repository { 36 | 37 | /** 38 | * Retrieve all Vets from the data store. 39 | * 40 | * @return a Collection of Vets 41 | */ 42 | @Transactional(readOnly = true) 43 | @Cacheable("vets") 44 | Collection findAll() throws DataAccessException; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /samples/petclinic/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.model; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import java.util.Locale; 6 | import java.util.Set; 7 | 8 | import javax.validation.ConstraintViolation; 9 | import javax.validation.Validator; 10 | 11 | import org.junit.Test; 12 | import org.springframework.context.i18n.LocaleContextHolder; 13 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; 14 | 15 | /** 16 | * @author Michael Isvy 17 | * Simple test to make sure that Bean Validation is working 18 | * (useful when upgrading to a new version of Hibernate Validator/ Bean Validation) 19 | */ 20 | public class ValidatorTests { 21 | 22 | private Validator createValidator() { 23 | LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean(); 24 | localValidatorFactoryBean.afterPropertiesSet(); 25 | return localValidatorFactoryBean; 26 | } 27 | 28 | @Test 29 | public void shouldNotValidateWhenFirstNameEmpty() { 30 | 31 | LocaleContextHolder.setLocale(Locale.ENGLISH); 32 | Person person = new Person(); 33 | person.setFirstName(""); 34 | person.setLastName("smith"); 35 | 36 | Validator validator = createValidator(); 37 | Set> constraintViolations = validator.validate(person); 38 | 39 | assertThat(constraintViolations.size()).isEqualTo(1); 40 | ConstraintViolation violation = constraintViolations.iterator().next(); 41 | assertThat(violation.getPropertyPath().toString()).isEqualTo("firstName"); 42 | assertThat(violation.getMessage()).isEqualTo("may not be empty"); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/parent-properties/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.4.1.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | org.springframework 30 | spring-core 31 | ${spring-security.version} 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-starter-test 40 | test 41 | 42 | 43 | 44 | 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-deploy-plugin 49 | 50 | true 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/templates/pets/createOrUpdateVisitForm.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 |

7 | New 8 | Visit 9 |

10 | 11 | Pet 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 28 | 29 |
NameBirth DateTypeOwner
30 | 31 |
32 |
33 | 35 | 37 |
38 | 39 |
40 |
41 | 42 | 43 |
44 |
45 |
46 | 47 |
48 | Previous Visits 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
DateDescription
59 | 60 | 61 | -------------------------------------------------------------------------------- /samples/tests/src/it/cloud/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.2.RELEASE 9 | 10 | 11 | com.example 12 | cloud 13 | 0.0.1-SNAPSHOT 14 | demo 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 1.0.27.BUILD-SNAPSHOT 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-test 31 | test 32 | 33 | 34 | org.junit.vintage 35 | junit-vintage-engine 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-maven-plugin 46 | 47 | 48 | org.springframework.boot.experimental 49 | spring-boot-thin-layout 50 | ${wrapper.version} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /samples/tests/src/it/empty/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.2.RELEASE 9 | 10 | 11 | com.example 12 | empty 13 | 0.0.1-SNAPSHOT 14 | demo 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 1.0.27.BUILD-SNAPSHOT 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-test 31 | test 32 | 33 | 34 | org.junit.vintage 35 | junit-vintage-engine 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-maven-plugin 46 | 47 | 48 | org.springframework.boot.experimental 49 | spring-boot-thin-layout 50 | ${wrapper.version} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /launcher/src/main/java/org/springframework/boot/loader/thin/LogUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.boot.loader.thin; 17 | 18 | import java.util.logging.Logger; 19 | 20 | /** 21 | * @author Dave Syer 22 | * 23 | */ 24 | class LogUtils { 25 | 26 | public static final String ROOT_LOGGER_NAME = ""; 27 | 28 | public static void setLogLevel(Level level) { 29 | setLogLevel(ROOT_LOGGER_NAME, level); 30 | } 31 | 32 | private static void setLogLevel(String loggerName, Level level) { 33 | Logger logger = getLogger(loggerName); 34 | if (logger != null) { 35 | logger.setLevel(convert(level)); 36 | } 37 | } 38 | 39 | private static java.util.logging.Level convert(Level level) { 40 | switch (level) { 41 | case OFF: 42 | return java.util.logging.Level.OFF; 43 | case ERROR: 44 | return java.util.logging.Level.SEVERE; 45 | case WARN: 46 | return java.util.logging.Level.WARNING; 47 | case DEBUG: 48 | return java.util.logging.Level.FINE; 49 | case TRACE: 50 | return java.util.logging.Level.FINEST; 51 | default: 52 | return java.util.logging.Level.INFO; 53 | } 54 | } 55 | 56 | private static Logger getLogger(String name) { 57 | return Logger.getLogger(name); 58 | } 59 | 60 | } 61 | 62 | enum Level { 63 | OFF, ERROR, WARN, INFO, DEBUG, TRACE; 64 | } 65 | -------------------------------------------------------------------------------- /wrapper/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.springframework.boot.experimental 7 | spring-boot-thin-launcher-parent 8 | 1.0.27.BUILD-SNAPSHOT 9 | 10 | 11 | spring-boot-thin-wrapper 12 | jar 13 | 14 | Thin Wrapper 15 | Bootstrap wrapper for launching a thin Boot jar 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 1.8 21 | 22 | 23 | 24 | 25 | junit 26 | junit 27 | test 28 | 29 | 30 | org.springframework 31 | spring-test 32 | test 33 | 34 | 35 | 36 | 37 | 38 | 39 | org.apache.maven.plugins 40 | maven-jar-plugin 41 | 42 | 43 | 44 | org.springframework.boot.loader.wrapper.ThinJarWrapper 45 | 46 | 47 | 48 | 49 | 50 | org.apache.maven.plugins 51 | maven-surefire-plugin 52 | 53 | 54 | ${project.version} 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /samples/petclinic/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.system; 2 | 3 | import org.junit.Before; 4 | import org.junit.Ignore; 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.samples.petclinic.PetClinicApplication; 10 | import org.springframework.samples.petclinic.system.CrashController; 11 | import org.springframework.test.context.junit4.SpringRunner; 12 | import org.springframework.test.context.web.WebAppConfiguration; 13 | import org.springframework.test.web.servlet.MockMvc; 14 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 15 | 16 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; 17 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; 18 | 19 | /** 20 | * Test class for {@link CrashController} 21 | * 22 | * @author Colin But 23 | */ 24 | @RunWith(SpringRunner.class) 25 | @SpringBootTest(classes = PetClinicApplication.class) 26 | @WebAppConfiguration 27 | // Waiting https://github.com/spring-projects/spring-boot/issues/5574 28 | @Ignore 29 | public class CrashControllerTests { 30 | 31 | @Autowired 32 | private CrashController crashController; 33 | 34 | private MockMvc mockMvc; 35 | 36 | @Before 37 | public void setup() { 38 | this.mockMvc = MockMvcBuilders 39 | .standaloneSetup(crashController) 40 | //.setHandlerExceptionResolvers(new SimpleMappingExceptionResolver()) 41 | .build(); 42 | } 43 | 44 | @Test 45 | public void testTriggerException() throws Exception { 46 | mockMvc.perform(get("/oups")) 47 | .andExpect(view().name("exception")) 48 | .andExpect(model().attributeExists("exception")) 49 | .andExpect(forwardedUrl("exception")) 50 | .andExpect(status().isOk()); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /deployer/src/main/java/org/springframework/cloud/deployer/thin/ThinJarTaskLauncher.java: -------------------------------------------------------------------------------- 1 | package org.springframework.cloud.deployer.thin; 2 | 3 | import java.util.Collections; 4 | 5 | import org.springframework.cloud.deployer.spi.core.AppDeploymentRequest; 6 | import org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo; 7 | import org.springframework.cloud.deployer.spi.task.LaunchState; 8 | import org.springframework.cloud.deployer.spi.task.TaskLauncher; 9 | import org.springframework.cloud.deployer.spi.task.TaskStatus; 10 | 11 | public class ThinJarTaskLauncher extends AbstractThinJarSupport implements TaskLauncher { 12 | 13 | public ThinJarTaskLauncher() { 14 | this("thin"); 15 | } 16 | 17 | public ThinJarTaskLauncher(String name, String... profiles) { 18 | super(name, profiles); 19 | } 20 | 21 | @Override 22 | public String launch(AppDeploymentRequest request) { 23 | String id = super.deploy(request); 24 | ThinJarAppWrapper wrapper = super.getWrapper(id); 25 | wrapper.status(new TaskStatus(id, LaunchState.launching, request.getDeploymentProperties())); 26 | return id; 27 | } 28 | 29 | @Override 30 | public void cancel(String id) { 31 | super.cancel(id); 32 | } 33 | 34 | @Override 35 | public TaskStatus status(String id) { 36 | ThinJarAppWrapper wrapper = super.getWrapper(id); 37 | if (wrapper != null) { 38 | return new TaskStatus(id, wrapper.getState(), Collections.emptyMap()); 39 | } 40 | return null; 41 | } 42 | 43 | @Override 44 | public void cleanup(String id) { 45 | } 46 | 47 | @Override 48 | public void destroy(String appName) { 49 | super.getWrapper(appName).cancel(); 50 | } 51 | 52 | @Override 53 | public RuntimeEnvironmentInfo environmentInfo() { 54 | return new RuntimeEnvironmentInfo.Builder().spiClass(RuntimeEnvironmentInfo.class).implementationName("thin") 55 | .implementationVersion("1.0.27.BUILD-SNAPSHOT").platformApiVersion("N/A").platformApiVersion("N/A") 56 | .platformClientVersion("1.0.27.BUILD-SNAPSHOT").platformHostVersion("N/A").platformType("local") 57 | .build(); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/db/mysql/schema.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE IF NOT EXISTS petclinic; 2 | 3 | ALTER DATABASE petclinic 4 | DEFAULT CHARACTER SET utf8 5 | DEFAULT COLLATE utf8_general_ci; 6 | 7 | GRANT ALL PRIVILEGES ON petclinic.* TO pc@localhost IDENTIFIED BY 'pc'; 8 | 9 | USE petclinic; 10 | 11 | CREATE TABLE IF NOT EXISTS vets ( 12 | id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 13 | first_name VARCHAR(30), 14 | last_name VARCHAR(30), 15 | INDEX(last_name) 16 | ) engine=InnoDB; 17 | 18 | CREATE TABLE IF NOT EXISTS specialties ( 19 | id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 20 | name VARCHAR(80), 21 | INDEX(name) 22 | ) engine=InnoDB; 23 | 24 | CREATE TABLE IF NOT EXISTS vet_specialties ( 25 | vet_id INT(4) UNSIGNED NOT NULL, 26 | specialty_id INT(4) UNSIGNED NOT NULL, 27 | FOREIGN KEY (vet_id) REFERENCES vets(id), 28 | FOREIGN KEY (specialty_id) REFERENCES specialties(id), 29 | UNIQUE (vet_id,specialty_id) 30 | ) engine=InnoDB; 31 | 32 | CREATE TABLE IF NOT EXISTS types ( 33 | id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 34 | name VARCHAR(80), 35 | INDEX(name) 36 | ) engine=InnoDB; 37 | 38 | CREATE TABLE IF NOT EXISTS owners ( 39 | id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 40 | first_name VARCHAR(30), 41 | last_name VARCHAR(30), 42 | address VARCHAR(255), 43 | city VARCHAR(80), 44 | telephone VARCHAR(20), 45 | INDEX(last_name) 46 | ) engine=InnoDB; 47 | 48 | CREATE TABLE IF NOT EXISTS pets ( 49 | id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 50 | name VARCHAR(30), 51 | birth_date DATE, 52 | type_id INT(4) UNSIGNED NOT NULL, 53 | owner_id INT(4) UNSIGNED NOT NULL, 54 | INDEX(name), 55 | FOREIGN KEY (owner_id) REFERENCES owners(id), 56 | FOREIGN KEY (type_id) REFERENCES types(id) 57 | ) engine=InnoDB; 58 | 59 | CREATE TABLE IF NOT EXISTS visits ( 60 | id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 61 | pet_id INT(4) UNSIGNED NOT NULL, 62 | visit_date DATE, 63 | description VARCHAR(255), 64 | FOREIGN KEY (pet_id) REFERENCES pets(id) 65 | ) engine=InnoDB; 66 | -------------------------------------------------------------------------------- /layout/src/main/java/org/springframework/boot/loader/thin/ThinLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.boot.loader.thin; 18 | 19 | import java.io.ByteArrayInputStream; 20 | import java.io.IOException; 21 | 22 | import org.springframework.boot.loader.tools.CustomLoaderLayout; 23 | import org.springframework.boot.loader.tools.Layout; 24 | import org.springframework.boot.loader.tools.LibraryScope; 25 | import org.springframework.boot.loader.tools.LoaderClassesWriter; 26 | 27 | /** 28 | * @author Dave Syer 29 | * 30 | */ 31 | public class ThinLayout implements Layout, CustomLoaderLayout { 32 | 33 | @Override 34 | public String getLauncherClassName() { 35 | return "org.springframework.boot.loader.wrapper.ThinJarWrapper"; 36 | } 37 | 38 | @Override 39 | public String getLibraryLocation(String libraryName, LibraryScope scope) { 40 | return null; 41 | } 42 | 43 | public String getLibraryDestination(String libraryName, LibraryScope scope) { 44 | return null; 45 | } 46 | 47 | @Override 48 | public String getClassesLocation() { 49 | return ""; 50 | } 51 | 52 | @Override 53 | public boolean isExecutable() { 54 | return true; 55 | } 56 | 57 | @Override 58 | public void writeLoadedClasses(LoaderClassesWriter writer) throws IOException { 59 | writer.writeLoaderClasses("META-INF/loader/spring-boot-thin-wrapper.jar"); 60 | writer.writeEntry("lib/.empty", new ByteArrayInputStream(new byte[0])); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /pipeline.yml: -------------------------------------------------------------------------------- 1 | # fly --target spring login --concourse-url https://ci.spring.io --team-name "Spring Team" 2 | # fly --target spring set-pipeline --config pipeline.yml --pipeline spring-boot-thin-launcher --load-vars-from credentials.yml 3 | --- 4 | resource_types: 5 | - name: slack-notification 6 | type: registry-image 7 | source: 8 | repository: nebhale/slack-notification-resource 9 | 10 | resources: 11 | - name: source 12 | type: git 13 | source: 14 | uri: https://github.com/spring-projects-experimental/spring-boot-thin-launcher.git 15 | - name: slack 16 | type: slack-notification 17 | source: 18 | url: {{slack-url}} 19 | 20 | slack-failure: &slack-failure 21 | put: slack 22 | params: 23 | attachments: 24 | - color: danger 25 | fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME " 26 | text: " Build has failed" 27 | title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME" 28 | title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME 29 | 30 | jobs: 31 | - name: build 32 | public: true 33 | plan: 34 | - get: source 35 | trigger: true 36 | - task: maven 37 | config: 38 | platform: linux 39 | image_resource: 40 | type: registry-image 41 | source: 42 | repository: adoptopenjdk/openjdk8 43 | tag: jdk8u192-b12 44 | inputs: 45 | - name: source 46 | caches: 47 | - path: source/.m2 48 | - path: source/.gradle 49 | run: 50 | dir: source 51 | path: sh 52 | args: 53 | - -c 54 | - | 55 | rm -rf ~/.m2 ~/.gradle 56 | ln -s $(pwd)/.m2 ~/.m2 57 | ln -s $(pwd)/.gradle ~/.gradle 58 | ./mvnw deploy -s .mvn/settings.xml 59 | params: 60 | TERM: -dumb 61 | passphrase: {{passphrase}} 62 | sonatype_username: {{sonatype-username}} 63 | sonatype_password: {{sonatype-password}} 64 | spring_username: {{spring-username}} 65 | spring_password: {{spring-password}} 66 | on_failure: *slack-failure 67 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/cloud/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | cloud 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | demo 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.4.3.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | org.springframework.cloud 30 | spring-cloud-starter-config 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-web 35 | 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-starter-test 40 | test 41 | 42 | 43 | 44 | 45 | 46 | 47 | org.springframework.cloud 48 | spring-cloud-dependencies 49 | Camden.SR5 50 | pom 51 | import 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | org.springframework.boot 60 | spring-boot-maven-plugin 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /samples/shadow/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | springBootVersion = '2.0.5.RELEASE' 4 | wrapperVersion = '1.0.27.BUILD-SNAPSHOT' 5 | shadowVersion = '2.0.1' 6 | } 7 | repositories { 8 | jcenter() 9 | mavenLocal() 10 | mavenCentral() 11 | maven { url "https://repo.spring.io/snapshot" } 12 | maven { url "https://repo.spring.io/milestone" } 13 | } 14 | dependencies { 15 | classpath "com.github.jengelman.gradle.plugins:shadow:${shadowVersion}" 16 | classpath("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${wrapperVersion}") 17 | classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 18 | } 19 | } 20 | 21 | apply plugin: 'java' 22 | apply plugin: 'maven' 23 | apply plugin: 'eclipse' 24 | apply plugin: 'io.spring.dependency-management' 25 | apply plugin: 'com.github.johnrengelman.shadow' 26 | apply plugin: 'org.springframework.boot.experimental.thin-launcher' 27 | 28 | group = 'com.example' 29 | version = '0.0.1-SNAPSHOT' 30 | sourceCompatibility = 1.8 31 | targetCompatibility = 1.8 32 | 33 | assemble.dependsOn = [shadowJar, thinJar] 34 | 35 | import com.github.jengelman.gradle.plugins.shadow.transformers.* 36 | 37 | dependencyManagement { 38 | imports { 39 | mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES 40 | } 41 | } 42 | 43 | jar { 44 | manifest { 45 | attributes 'Main-Class': 'com.example.LauncherApplication' 46 | } 47 | } 48 | 49 | shadowJar { 50 | // Required for Spring 51 | mergeServiceFiles() 52 | append 'META-INF/spring.handlers' 53 | append 'META-INF/spring.schemas' 54 | append 'META-INF/spring.tooling' 55 | transform(PropertiesFileTransformer) { 56 | paths = ['META-INF/spring.factories' ] 57 | mergeStrategy = "append" 58 | } 59 | } 60 | repositories { 61 | mavenLocal() 62 | mavenCentral() 63 | maven { url "https://repo.spring.io/snapshot" } 64 | maven { url "https://repo.spring.io/milestone" } 65 | } 66 | 67 | configurations { 68 | testCompile.extendsFrom(compileOnly) 69 | } 70 | 71 | dependencies { 72 | compile('org.springframework.boot:spring-boot-starter') 73 | testCompile('org.springframework.boot:spring-boot-starter-test') 74 | } 75 | -------------------------------------------------------------------------------- /launcher/src/main/java/org/springframework/boot/loader/thin/UrlArchive.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.boot.loader.thin; 18 | 19 | import java.io.IOException; 20 | import java.net.MalformedURLException; 21 | import java.net.URL; 22 | import java.util.Iterator; 23 | import java.util.List; 24 | import java.util.jar.Manifest; 25 | 26 | import org.springframework.boot.loader.archive.Archive; 27 | 28 | /** 29 | * @author Dave Syer 30 | * 31 | */ 32 | public class UrlArchive implements Archive { 33 | 34 | private URL url; 35 | 36 | public UrlArchive(URL url) { 37 | this.url = url; 38 | } 39 | 40 | public UrlArchive(Archive url) { 41 | try { 42 | this.url = url.getUrl(); 43 | } 44 | catch (MalformedURLException e) { 45 | throw new IllegalStateException("Bad URL", e); 46 | } 47 | } 48 | 49 | @Override 50 | public Iterator iterator() { 51 | throw new UnsupportedOperationException(); 52 | } 53 | 54 | @Override 55 | public URL getUrl() throws MalformedURLException { 56 | return this.url; 57 | } 58 | 59 | @Override 60 | public Manifest getManifest() throws IOException { 61 | throw new UnsupportedOperationException(); 62 | } 63 | 64 | @Override 65 | public List getNestedArchives(EntryFilter filter) throws IOException { 66 | throw new UnsupportedOperationException(); 67 | } 68 | 69 | @Override 70 | public String toString() { 71 | try { 72 | return getUrl().toString(); 73 | } 74 | catch (Exception ex) { 75 | return "jar archive"; 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /tools/converter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | org.springframework.boot.experimental 8 | spring-boot-thin-tools 9 | 1.0.27.BUILD-SNAPSHOT 10 | 11 | 12 | spring-boot-thin-tools-converter 13 | jar 14 | 15 | spring-boot-thin-tools-converter 16 | Converts thin jars to fat jars 17 | 18 | 19 | 20 | org.springframework.boot 21 | spring-boot-loader-tools 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-test 27 | test 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-logging 32 | test 33 | 34 | 35 | 36 | 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-maven-plugin 41 | 42 | 43 | build 44 | package 45 | 46 | repackage 47 | 48 | false 49 | 50 | org.springframework.boot.loader.thin.converter.ThinConverterApplication 51 | 52 | 53 | 54 | 55 | 56 | org.springframework.boot.experimental 57 | spring-boot-thin-layout 58 | ${project.version} 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/boot/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.0.5.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 1.0.27.BUILD-SNAPSHOT 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-web 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-test 36 | test 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.apache.maven.plugins 44 | maven-deploy-plugin 45 | 46 | true 47 | 48 | 49 | 50 | org.springframework.boot 51 | spring-boot-maven-plugin 52 | 53 | 54 | org.springframework.boot.experimental 55 | spring-boot-thin-layout 56 | ${wrapper.version} 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/owner/PetRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.owner; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.data.jpa.repository.Query; 21 | import org.springframework.data.repository.Repository; 22 | import org.springframework.transaction.annotation.Transactional; 23 | 24 | /** 25 | * Repository class for Pet domain objects All method names are compliant 26 | * with Spring Data naming conventions so this interface can easily be extended for Spring 27 | * Data 28 | * 29 | * @author Ken Krebs 30 | * @author Juergen Hoeller 31 | * @author Sam Brannen 32 | * @author Michael Isvy 33 | */ 34 | public interface PetRepository extends Repository { 35 | 36 | /** 37 | * Retrieve all {@link PetType}s from the data store. 38 | * @return a Collection of {@link PetType}s. 39 | */ 40 | @Query("SELECT ptype FROM PetType ptype ORDER BY ptype.name") 41 | @Transactional(readOnly = true) 42 | List findPetTypes(); 43 | 44 | /** 45 | * Retrieve a {@link Pet} from the data store by id. 46 | * @param id the id to search for 47 | * @return the {@link Pet} if found 48 | */ 49 | @Transactional(readOnly = true) 50 | Pet findById(Integer id); 51 | 52 | /** 53 | * Save a {@link Pet} to the data store, either inserting or updating it. 54 | * @param pet the {@link Pet} to save 55 | */ 56 | void save(Pet pet); 57 | 58 | } 59 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.2.0.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 1.0.27.BUILD-SNAPSHOT 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-webflux 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-test 36 | test 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.apache.maven.plugins 44 | maven-deploy-plugin 45 | 46 | true 47 | 48 | 49 | 50 | org.springframework.boot 51 | spring-boot-maven-plugin 52 | 53 | 54 | org.springframework.boot.experimental 55 | spring-boot-thin-layout 56 | ${wrapper.version} 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/resources/db/hsqldb/schema.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE vet_specialties IF EXISTS; 2 | DROP TABLE vets IF EXISTS; 3 | DROP TABLE specialties IF EXISTS; 4 | DROP TABLE visits IF EXISTS; 5 | DROP TABLE pets IF EXISTS; 6 | DROP TABLE types IF EXISTS; 7 | DROP TABLE owners IF EXISTS; 8 | 9 | 10 | CREATE TABLE vets ( 11 | id INTEGER IDENTITY PRIMARY KEY, 12 | first_name VARCHAR(30), 13 | last_name VARCHAR(30) 14 | ); 15 | CREATE INDEX vets_last_name ON vets (last_name); 16 | 17 | CREATE TABLE specialties ( 18 | id INTEGER IDENTITY PRIMARY KEY, 19 | name VARCHAR(80) 20 | ); 21 | CREATE INDEX specialties_name ON specialties (name); 22 | 23 | CREATE TABLE vet_specialties ( 24 | vet_id INTEGER NOT NULL, 25 | specialty_id INTEGER NOT NULL 26 | ); 27 | ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_vets FOREIGN KEY (vet_id) REFERENCES vets (id); 28 | ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_specialties FOREIGN KEY (specialty_id) REFERENCES specialties (id); 29 | 30 | CREATE TABLE types ( 31 | id INTEGER IDENTITY PRIMARY KEY, 32 | name VARCHAR(80) 33 | ); 34 | CREATE INDEX types_name ON types (name); 35 | 36 | CREATE TABLE owners ( 37 | id INTEGER IDENTITY PRIMARY KEY, 38 | first_name VARCHAR(30), 39 | last_name VARCHAR_IGNORECASE(30), 40 | address VARCHAR(255), 41 | city VARCHAR(80), 42 | telephone VARCHAR(20) 43 | ); 44 | CREATE INDEX owners_last_name ON owners (last_name); 45 | 46 | CREATE TABLE pets ( 47 | id INTEGER IDENTITY PRIMARY KEY, 48 | name VARCHAR(30), 49 | birth_date DATE, 50 | type_id INTEGER NOT NULL, 51 | owner_id INTEGER NOT NULL 52 | ); 53 | ALTER TABLE pets ADD CONSTRAINT fk_pets_owners FOREIGN KEY (owner_id) REFERENCES owners (id); 54 | ALTER TABLE pets ADD CONSTRAINT fk_pets_types FOREIGN KEY (type_id) REFERENCES types (id); 55 | CREATE INDEX pets_name ON pets (name); 56 | 57 | CREATE TABLE visits ( 58 | id INTEGER IDENTITY PRIMARY KEY, 59 | pet_id INTEGER NOT NULL, 60 | visit_date DATE, 61 | description VARCHAR(255) 62 | ); 63 | ALTER TABLE visits ADD CONSTRAINT fk_visits_pets FOREIGN KEY (pet_id) REFERENCES pets (id); 64 | CREATE INDEX visits_pet_id ON visits (pet_id); 65 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/owner/PetTypeFormatter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.owner; 17 | 18 | import java.text.ParseException; 19 | import java.util.Collection; 20 | import java.util.Locale; 21 | 22 | import org.springframework.beans.factory.annotation.Autowired; 23 | import org.springframework.format.Formatter; 24 | import org.springframework.stereotype.Component; 25 | 26 | /** 27 | * Instructs Spring MVC on how to parse and print elements of type 'PetType'. Starting 28 | * from Spring 3.0, Formatters have come as an improvement in comparison to legacy 29 | * PropertyEditors. 30 | *

31 | * 32 | * @author Mark Fisher 33 | * @author Juergen Hoeller 34 | * @author Michael Isvy 35 | */ 36 | @Component 37 | public class PetTypeFormatter implements Formatter { 38 | 39 | private final PetRepository pets; 40 | 41 | @Autowired 42 | public PetTypeFormatter(PetRepository pets) { 43 | this.pets = pets; 44 | } 45 | 46 | @Override 47 | public String print(PetType petType, Locale locale) { 48 | return petType.getName(); 49 | } 50 | 51 | @Override 52 | public PetType parse(String text, Locale locale) throws ParseException { 53 | Collection findPetTypes = this.pets.findPetTypes(); 54 | for (PetType type : findPetTypes) { 55 | if (type.getName().equals(text)) { 56 | return type; 57 | } 58 | } 59 | throw new ParseException("type not found: " + text, 0); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /samples/petclinic/src/test/java/org/springframework/samples/petclinic/service/EntityUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.service; 18 | 19 | import java.util.Collection; 20 | 21 | import org.springframework.orm.ObjectRetrievalFailureException; 22 | import org.springframework.samples.petclinic.model.BaseEntity; 23 | 24 | /** 25 | * Utility methods for handling entities. Separate from the BaseEntity class mainly because of dependency on the 26 | * ORM-associated ObjectRetrievalFailureException. 27 | * 28 | * @author Juergen Hoeller 29 | * @author Sam Brannen 30 | * @see org.springframework.samples.petclinic.model.BaseEntity 31 | * @since 29.10.2003 32 | */ 33 | public abstract class EntityUtils { 34 | 35 | /** 36 | * Look up the entity of the given class with the given id in the given collection. 37 | * 38 | * @param entities the collection to search 39 | * @param entityClass the entity class to look up 40 | * @param entityId the entity id to look up 41 | * @return the found entity 42 | * @throws ObjectRetrievalFailureException if the entity was not found 43 | */ 44 | public static T getById(Collection entities, Class entityClass, int entityId) 45 | throws ObjectRetrievalFailureException { 46 | for (T entity : entities) { 47 | if (entity.getId() == entityId && entityClass.isInstance(entity)) { 48 | return entity; 49 | } 50 | } 51 | throw new ObjectRetrievalFailureException(entityClass, entityId); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/owner/PetValidator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.owner; 17 | 18 | import org.springframework.util.StringUtils; 19 | import org.springframework.validation.Errors; 20 | import org.springframework.validation.Validator; 21 | 22 | /** 23 | * Validator for Pet forms. 24 | *

25 | * We're not using Bean Validation annotations here because it is easier to define such validation rule in Java. 26 | *

27 | * 28 | * @author Ken Krebs 29 | * @author Juergen Hoeller 30 | */ 31 | public class PetValidator implements Validator { 32 | 33 | private static final String REQUIRED = "required"; 34 | 35 | @Override 36 | public void validate(Object obj, Errors errors) { 37 | Pet pet = (Pet) obj; 38 | String name = pet.getName(); 39 | // name validation 40 | if (!StringUtils.hasLength(name)) { 41 | errors.rejectValue("name", REQUIRED, REQUIRED); 42 | } 43 | 44 | // type validation 45 | if (pet.isNew() && pet.getType() == null) { 46 | errors.rejectValue("type", REQUIRED, REQUIRED); 47 | } 48 | 49 | // birth date validation 50 | if (pet.getBirthDate() == null) { 51 | errors.rejectValue("birthDate", REQUIRED, REQUIRED); 52 | } 53 | } 54 | 55 | /** 56 | * This Validator validates *just* Pet instances 57 | */ 58 | @Override 59 | public boolean supports(Class clazz) { 60 | return Pet.class.isAssignableFrom(clazz); 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/basic/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.3.1.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 2.3.1.RELEASE 26 | 1.0.27.BUILD-SNAPSHOT 27 | 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-web 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.apache.maven.plugins 45 | maven-deploy-plugin 46 | 47 | true 48 | 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-maven-plugin 53 | ${spring-boot.version} 54 | 55 | 56 | org.springframework.boot.experimental 57 | spring-boot-thin-layout 58 | ${wrapper.version} 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/source/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.4.1.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 1.5.3.RELEASE 26 | 1.0.27.BUILD-SNAPSHOT 27 | 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-web 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.apache.maven.plugins 45 | maven-deploy-plugin 46 | 47 | true 48 | 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-maven-plugin 53 | ${spring-boot.version} 54 | 55 | 56 | org.springframework.boot.experimental 57 | spring-boot-thin-layout 58 | ${wrapper.version} 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /launcher/src/test/resources/apps/snapshots/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | simple 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | simple 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.0.1.BUILD-SNAPSHOT 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 2.0.6.RELEASE 26 | 1.0.27.BUILD-SNAPSHOT 27 | 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-web 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.apache.maven.plugins 45 | maven-deploy-plugin 46 | 47 | true 48 | 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-maven-plugin 53 | ${spring-boot.version} 54 | 55 | 56 | org.springframework.boot.experimental 57 | spring-boot-thin-layout 58 | ${wrapper.version} 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /samples/petclinic/src/main/java/org/springframework/samples/petclinic/vet/VetController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.vet; 17 | 18 | import java.util.Map; 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.stereotype.Controller; 22 | import org.springframework.web.bind.annotation.RequestMapping; 23 | import org.springframework.web.bind.annotation.ResponseBody; 24 | 25 | /** 26 | * @author Juergen Hoeller 27 | * @author Mark Fisher 28 | * @author Ken Krebs 29 | * @author Arjen Poutsma 30 | */ 31 | @Controller 32 | class VetController { 33 | 34 | private final VetRepository vets; 35 | 36 | @Autowired 37 | public VetController(VetRepository clinicService) { 38 | this.vets = clinicService; 39 | } 40 | 41 | @RequestMapping(value = { "/vets.html" }) 42 | public String showVetList(Map model) { 43 | // Here we are returning an object of type 'Vets' rather than a collection of Vet 44 | // objects so it is simpler for Object-Xml mapping 45 | Vets vets = new Vets(); 46 | vets.getVetList().addAll(this.vets.findAll()); 47 | model.put("vets", vets); 48 | return "vets/vetList"; 49 | } 50 | 51 | @RequestMapping(value = { "/vets.json", "/vets.xml" }) 52 | public @ResponseBody Vets showResourcesVetList() { 53 | // Here we are returning an object of type 'Vets' rather than a collection of Vet 54 | // objects so it is simpler for JSon/Object mapping 55 | Vets vets = new Vets(); 56 | vets.getVetList().addAll(this.vets.findAll()); 57 | return vets; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /launcher/src/main/resources/META-INF/thin/empty-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | empty 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | empty 12 | Empty POM 13 | 14 | 15 | UTF-8 16 | UTF-8 17 | 1.8 18 | 1.5.1.RELEASE 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-dependencies 29 | ${spring-boot.version} 30 | pom 31 | import 32 | 33 | 34 | 35 | 36 | 37 | 38 | spring-snapshots 39 | Spring Snapshots 40 | https://repo.spring.io/snapshot 41 | 42 | true 43 | 44 | 45 | 46 | spring-milestones 47 | Spring Milestones 48 | https://repo.spring.io/milestone 49 | 50 | false 51 | 52 | 53 | 54 | 55 | 56 | spring-snapshots 57 | Spring Snapshots 58 | https://repo.spring.io/snapshot 59 | 60 | true 61 | 62 | 63 | 64 | spring-milestones 65 | Spring Milestones 66 | https://repo.spring.io/milestone 67 | 68 | false 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /deployer/src/test/java/org/springframework/cloud/deployer/thin/ThinJarAppDeployerBeanTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.deployer.thin; 18 | 19 | import java.util.Arrays; 20 | import java.util.Collections; 21 | 22 | import javax.sql.DataSource; 23 | 24 | import org.junit.jupiter.api.Test; 25 | 26 | import org.springframework.cloud.deployer.spi.core.AppDefinition; 27 | import org.springframework.cloud.deployer.spi.core.AppDeploymentRequest; 28 | import org.springframework.core.io.FileSystemResource; 29 | import org.springframework.core.io.Resource; 30 | 31 | import static org.assertj.core.api.Assertions.assertThat; 32 | 33 | /** 34 | * @author Dave Syer 35 | * 36 | */ 37 | public class ThinJarAppDeployerBeanTests { 38 | 39 | private static ThinJarAppDeployer deployer = new ThinJarAppDeployer(); 40 | 41 | @Test 42 | public void getBeans() throws Exception { 43 | String deployed = deploy("empty"); 44 | assertThat(deployer.getBeansOfType(deployed, DataSource.class)).isNotEmpty(); 45 | deployer.undeploy(deployed); 46 | } 47 | 48 | @Test 49 | public void getBean() throws Exception { 50 | String deployed = deploy("empty"); 51 | assertThat(deployer.getBean(deployed, DataSource.class)).isNotNull(); 52 | deployer.undeploy(deployed); 53 | } 54 | 55 | String deploy(String jarName, String... args) { 56 | Resource resource = new FileSystemResource("../samples/tests/target/it/" + jarName 57 | + "/target/" + jarName + "-0.0.1-SNAPSHOT.jar"); 58 | AppDefinition definition = new AppDefinition(jarName, 59 | Collections.emptyMap()); 60 | AppDeploymentRequest request = new AppDeploymentRequest(definition, resource, 61 | Collections.emptyMap(), Arrays.asList(args)); 62 | String deployed = deployer.deploy(request); 63 | return deployed; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /samples/tests/src/test/java/com/example/LocalRepositoryTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.example; 17 | 18 | import java.io.File; 19 | 20 | import org.junit.jupiter.api.RepeatedTest; 21 | import org.junit.jupiter.api.Test; 22 | 23 | import org.springframework.boot.loader.thin.ThinJarLauncher; 24 | import org.springframework.util.FileSystemUtils; 25 | 26 | import static org.assertj.core.api.Assertions.assertThat; 27 | 28 | /** 29 | * @author Dave Syer 30 | * 31 | */ 32 | public class LocalRepositoryTests { 33 | 34 | // Counter for performance testing 35 | private final static int COUNT = 1; 36 | 37 | @Test 38 | @RepeatedTest(COUNT) 39 | public void dryrunSpringCore() throws Exception { 40 | FileSystemUtils.deleteRecursively(new File("target/thin/test/repository")); 41 | String[] args = new String[] { "--thin.root=target/thin/test", 42 | "--thin.dryrun=true", "--thin.archive=src/test/resources/basic", 43 | "--debug" }; 44 | ThinJarLauncher.main(args); 45 | assertThat(new File( 46 | "target/thin/test/repository/org/springframework/spring-core/4.3.8.RELEASE/spring-core-4.3.8.RELEASE.jar")) 47 | .exists(); 48 | } 49 | 50 | @Test 51 | @RepeatedTest(COUNT) 52 | public void dryrunLocalApp() throws Exception { 53 | FileSystemUtils.deleteRecursively(new File("target/thin/test/repository")); 54 | String[] args = new String[] { "--thin.root=target/thin/test", 55 | "--thin.dryrun=true", "--thin.archive=src/test/resources/local", 56 | "--debug" }; 57 | ThinJarLauncher.main(args); 58 | assertThat(new File( 59 | "target/thin/test/repository/com/example/app/0.0.1-SNAPSHOT/app-0.0.1-SNAPSHOT.jar")) 60 | .exists(); 61 | assertThat(new File( 62 | "target/thin/test/repository/org/springframework/spring-beans/4.3.8.RELEASE/spring-beans-4.3.8.RELEASE.jar")) 63 | .exists(); 64 | } 65 | 66 | } 67 | --------------------------------------------------------------------------------