Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dnsang/spring-rest-archetype
Maven Archetype for Spring RESTful Microservice Projects
https://github.com/dnsang/spring-rest-archetype
archetype jetty spring-boot
Last synced: 6 days ago
JSON representation
Maven Archetype for Spring RESTful Microservice Projects
- Host: GitHub
- URL: https://github.com/dnsang/spring-rest-archetype
- Owner: dnsang
- Created: 2024-08-17T05:01:19.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T06:36:03.000Z (2 months ago)
- Last Synced: 2024-09-09T08:03:30.489Z (2 months ago)
- Topics: archetype, jetty, spring-boot
- Language: Java
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Getting Started Guide
#### 1. Generate a New Project
To create a new project from this archetype, execute the following Maven command.
Ensure you replace `groupId`, `artifactId`, and `package` with your specific values:```bash
mvn archetype:generate -B \
-DarchetypeGroupId=dev.sang.archetype \
-DarchetypeArtifactId=spring-rest-archetype \
-DarchetypeVersion=0.1 \
-DgroupId=your.company \
-DartifactId=your-project-name \
-Dpackage=your.company.project \
-DarchetypeCatalog=remote
```#### 2.Build the Project
Navigate to the project directory and build the project using Maven:
```bash
cd your-project-name/
mvn clean compile package
```#### 3. Check Test Coverage
Review the test coverage report by opening the following file in your web browser:```bash
open target/site/jacoco/index.html
```#### 4. Start & Stop
a. **(MacOS) Install coreutils if it is not already installed**
```bash
brew install coreutils
```
b. **Make the `runservice` script executable:**
```bash
chmod +x runservice
```
c. **Start the service in production mode:**
```bash
./runservice start production
```#### 5. Verify Service Operation
Ensure that your service is running by executing the following command:
```bash
curl -X GET localhost:8080/api/v1/health
```
#### 6. Stop the service
```bash
./runservice stop
```#### 7. [DEV GUIDELINE](src/main/resources/archetype-resources/DEV-GUIDELINE.md)
#### 8. [RESPONSE FORMAT](src/main/resources/archetype-resources/RESPONSE-FORMAT.md)