anthonydahanne / spring-cloud-services-starters

Spring Cloud Starters for Spring Cloud Services on Pivotal Cloud Foundry

Home Page:http://docs.pivotal.io/spring-cloud-services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Cloud Services Starters

Spring Cloud Services Starters are a curated set of dependencies for use with Spring Cloud Services in a Pivotal Cloud Foundry environment.

Features

Easily take advantage of the various services by including the BOM and corresponding starter. See the example Maven POM and Gradle build files below.

  • spring-cloud-services-starter-config-client

  • spring-cloud-services-starter-service-registry

Build and Deploy

The release artifacts are available from Maven Central. You may also build and install the starter POMs to your local Maven repository:

./gradlew clean build publishToMavenLocal

Usage

Include the BOM and starter dependencies in your project using Maven or Gradle.

Maven BOM

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.demo</groupId>
    <artifactId>spring-cloud-services-demo</artifactId>
    <version>0.1.0</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>${spring-boot.version}</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>17</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.pivotal.spring.cloud</groupId>
            <artifactId>spring-cloud-services-starter-config-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.pivotal.spring.cloud</groupId>
            <artifactId>spring-cloud-services-starter-service-registry</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.pivotal.spring.cloud</groupId>
                <artifactId>spring-cloud-services-dependencies</artifactId>
                <version>${spring-cloud-services.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Gradle

build.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE")
    }
}

apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "spring-boot"
apply plugin: "io.spring.dependency-management"

jar {
    baseName = "spring-cloud-services-demo"
    version =  "0.1.0"
}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
        mavenBom "io.pivotal.spring.cloud:spring-cloud-services-dependencies:${springCloudServicesVersion}"
    }
}

dependencies {
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-config-client")
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-service-registry")
}

repositories {
    mavenCentral()
}

Compatibility Matrix

SCS Starters Spring Cloud Spring Boot

4.1.x

2023.0.x

3.2.x

4.0.x

2022.0.x

3.0.x & 3.1.x

3.5.x

2021.0.x

2.7.x

3.4.x

2021.0.x

2.6.x

3.3.x

2020.0.x

2.5.x

License

Spring Cloud Services Starters is Open Source software released under the Apache 2.0 license.

About

Spring Cloud Starters for Spring Cloud Services on Pivotal Cloud Foundry

http://docs.pivotal.io/spring-cloud-services

License:Apache License 2.0


Languages

Language:Java 96.6%Language:Shell 2.8%Language:Dockerfile 0.6%