This Rug project contains a generator for a Spring Boot REST service project.
Rugs are typically run using the Atomist Bot in Slack. To run Rugs locally, you must first install the following tools:
Once those tools are installed, you can clone this repository and install its dependencies with the following command.
$ ( cd .atomist && npm install )
The NewSpringBootRestService generator creates a new Spring Boot REST service project.
There are no prerequisites to running this generator.
To run this generator you must supply the following parameters.
Name | Required | Default | Description |
---|---|---|---|
Project Name | Yes | A valid GitHub repository name. It should be 21 characters or less to avoid truncating name when the its Slack channel is created. | |
artifactId |
No | myartifact | Maven artifact ID, e.g., "fiddle-riddle". |
groupId |
No | mygroup | Maven group ID, e.g., "com.pany.project". |
version |
No | 0.1.0-SNAPSHOT | Semantic version of the project. |
description |
No | My new project | A brief description of the project. |
rootPackage |
No | com.myorg | The root package for the generated service class. |
serviceClassName |
No | MyService | Name for the generated service class. |
Run it as follows:
$ cd parent/directory
$ rug generate atomist:spring-rugs:NewSpringBootRestService \
pet-shop-service \
artifactId=pet-shop \
groupId=uk.co.lndn \
version=0.1.0-SNAPSHOT \
description="Spring Boot REST service for selling stuff" \
rootPackage=uk.co.lndn.electronic \
serviceClassName=PetShop
Note the first parameter, the project name, is different in that you
do not need to supply the name of the parameter, just the value. This
is because the project name parameter is required for all generators.
This will create a directory named pet-shop-service
and populate it
with a working Spring Boot REST service. If you are happy with the
change, commit the changes.
$ cd pet-shop-service
$ git init
$ git add .
$ git commit -m 'Initial version generated by Atomist'
See the README in the generated project for further instructions.
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.
If you are interested in contributing to the Atomist open source projects, please see our contributing guidelines and our code of conduct.
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.
This project is driven using Maven. You will need to install Maven locally to build, run, and test this project.
You can run the service locally using the following from the command:
$ mvn spring-boot:run
This service comes with some rudimentary tests as a good starting point for writing your own. Use the following command to execute the tests using Maven:
$ mvn test
Created by Atomist. Need Help? Join our Slack team.