This Rug archive contains editors for Spring Cloud projects. Take a look inside the
.atomist
folder.
The AddHystrix Editor adds Spring Cloud Hystrix support to an existing Spring Boot project.
Before running this Editor, you must have the following prerequisites satisfied.
- A git repository
- The project must contain a Maven
pom.xml
in its root - The project must contain a class annotated with
SpringBootApplication
This Editor has no parameters.
Run it as follows:
$ cd to/your/repo
$ rug edit atomist-rugs:spring-cloud-editors:AddHystrix
This will amend your pom.xml
to include the Spring Cloud Starter Hystrix dependency and, if not already present, the Spring Cloud Dependencies dependency management section. It will also add the EnableCircuitBreaker
annotation to the detected class that is annotated with SpringBootApplication
.
The AddFeign Editor adds Spring Cloud Feign support to an existing Spring Boot project.
Before running this Editor, you must have the following prerequisites satisfied.
- A git repository
- The project must contain a Maven
pom.xml
in its root - The project must contain a class annotated with
SpringBootApplication
This Editor has no parameters.
Run it as follows:
$ cd to/your/repo
$ rug edit atomist-rugs:spring-cloud-editors:AddFeign
This will, if not already present, amend your pom.xml
to include the Spring Cloud Starter Feign dependency and, also if not already present, the Spring Cloud Dependencies dependency management section. It will also add the EnableFeignClients
annotation to the detected class that is annotated with SpringBootApplication
.
The AddFeignClient Editor adds Spring Cloud Feign support to an existing Spring Boot project, including creating a new Feign client interface to consume a microservice.
Before running this Editor, you must have the following prerequisites satisfied.
- A git repository
- The project must contain a Maven
pom.xml
in its root - The project must contain a class annotated with
SpringBootApplication
To run this editor, you must supply the following parameters:
consumed_endpoint_address
: The root address (i.e. http://localhost) or service name (i.e. mymicroservice) of the service being consumedfeign_interface
: The name of the new Feign Java interfaceinvoking_relative_endpoint_url
: The relative URL to the actual endpoint being invoked on the consumed microservice (i.e. /myendpoint)
Run it as follows:
$ cd to/your/repo
$ rug edit atomist-rugs:spring-cloud-editors:AddFeignClient /
consumed_endpoint_address=http://localhost /
feign_interface=com.myorg.MyFeignClient /
invoking_relative_endpoint_url=/myendpoint
This will, if not already present, amend your pom.xml
to include the Spring Cloud Starter Feign dependency and, also if not already present, the Spring Cloud Dependencies dependency management section. It will also add the EnableFeignClients
annotation to the detected class that is annotated with SpringBootApplication
. Finally a new Feign Client Java interface will be generated.
The AddFeignClientWithCircuitBreaker Editor adds Spring Cloud Feign support, including Spring Cloud Hystrix, to an existing Spring Boot project, creating a new Feign client interface to consume a microservice in the process.
Before running this Editor, you must have the following prerequisites satisfied.
- A git repository
- The project must contain a Maven
pom.xml
in its root - The project must contain a class annotated with
SpringBootApplication
To run this editor, you must supply the following parameters:
consumed_endpoint_address
: The root address (i.e. http://localhost) or service name (i.e. mymicroservice) of the service being consumedfeign_interface
: The name of the new Feign Java interfaceinvoking_relative_endpoint_url
: The relative URL to the actual endpoint being invoked on the consumed microservice (i.e. /myendpoint)
Run it as follows:
$ cd to/your/repo
$ rug edit atomist-rugs:spring-cloud-editors:AddFeignClient /
consumed_endpoint_address=http://localhost /
feign_interface=com.myorg.MyFeignClient /
invoking_relative_endpoint_url=/myendpoint
This will, if not already present, amend your pom.xml
to include the Spring Cloud Starter Feign and Spring Cloud Starter Hystrix dependencies and, also if not already present, the Spring Cloud Dependencies dependency management section. It will also add the EnableFeignClients
and EnableCircuitBreaker
annotations to the detected class that is annotated with SpringBootApplication
. Finally a new Feign Client Java interface will be generated that includes an example of a fallback method for when the circuit breaks.
General support questions should be discussed in the #support
channel on our community Slack team
at atomist-community.slack.com.
If you find a problem, please create an issue.
You can build, test, and install the project locally with the Rug CLI.
$ rug test
$ rug install
To create a new release of the project, simply push a tag of the form
M.N.P
where M
, N
, and P
are integers that form the next
appropriate semantic version for release. For example:
$ git tag -a 1.2.3
The Travis CI build (see badge at the top of this page) will automatically create a GitHub release using the tag name for the release and the comment provided on the annotated tag as the contents of the release notes. It will also automatically upload the needed artifacts.
Created by Atomist. Need Help? Join our Slack team