Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atomist-attic/spring-rugs

Atomist project generator for a new Spring Boot Rest Service
https://github.com/atomist-attic/spring-rugs

atomist java rugs spring spring-boot typescript

Last synced: 3 months ago
JSON representation

Atomist project generator for a new Spring Boot Rest Service

Awesome Lists containing this project

README

        

# Atomist 'spring-rugs'

[![Build Status](https://travis-ci.org/atomist/spring-rugs.svg?branch=master)](https://travis-ci.org/atomist/spring-rugs)

This [Rug][rug] project contains a generator for a [Spring Boot][boot]
[REST][rest] service project.

[rug]: http://docs.atomist.com/

## Rugs

Rugs are typically run using the Atomist Bot in Slack. To run Rugs
locally, you must first install the following tools:

- [Rug CLI][rug-cli]
- [Node.js][node]

[rug-cli]: http://docs.atomist.com/user-guide/interfaces/cli/install/
[node]: https://nodejs.org/

Once those tools are installed, you can clone this repository and
install its dependencies with the following command.

```
$ ( cd .atomist && npm install )
```

### NewSpringBootRestService

The NewSpringBootRestService generator creates a new [Spring
Boot][boot] [REST][rest] service project.

[boot]: https://projects.spring.io/spring-boot/
[rest]: https://en.wikipedia.org/wiki/Representational_state_transfer

#### Prerequisites

There are no prerequisites to running this generator.

#### Parameters

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][semver] 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.

[semver]: http://semver.org

#### Running

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.

## Rug Support

General support questions should be discussed in the `#support`
channel on our community Slack team
at [atomist-community.slack.com][slack].

If you find a problem, please create an [issue][].

[issue]: https://github.com/atomist/spring-rugs/issues

## Rug Contributing

If you are interested in contributing to the Atomist open source
projects, please see our [contributing guidelines][contrib] and
our [code of conduct][code].

[contrib]: https://github.com/atomist/welcome/blob/master/CONTRIBUTING.md
[code]: https://github.com/atomist/welcome/blob/master/CODE_OF_CONDUCT.md

## Rug Development

You can build, test, and install the project locally with
the [Rug CLI][cli].

[cli]: https://github.com/atomist/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][semver] for release. For example:

[semver]: http://semver.org

```
$ 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.

## Spring Boot REST Service

[boot]: https://projects.spring.io/spring-boot/
[rest]: https://en.wikipedia.org/wiki/Representational_state_transfer

## Development

This project is driven using [Maven][mvn]. You will need to install
Maven locally to build, run, and test this project.

[mvn]: https://maven.apache.org/

### Run locally

You can run the service locally using the following from the command:

```
$ mvn spring-boot:run
```

### Run tests

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][atomist].
Need Help? [Join our Slack team][slack].

[atomist]: https://www.atomist.com/
[slack]: https://join.atomist.com/