• Stars
    star
    212
  • Rank 180,415 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created almost 5 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yeoman based Spring Boot Microservice generator

generator-springboot

A Yeoman generator for generating Microservices with SpringBoot

How to use?

> npm install -g yo
> npm install -g generator-springboot
> yo springboot

Features

  • SpringBoot REST API with jar type packaging
  • CORS configuration
  • Swagger UI Integration
  • Spring Data JPA integration with option to select databases like MySQL, Postgresql, MariaDB etc
  • Flyway or Liquibase data migration support
  • SpringBoot Actuator configuration
  • TestContainers integration
  • JUnit 5
  • Docker configuration for Application, ELK, Prometheus, Grafana
  • Localstack configuration
  • Jenkinsfile
  • GitHub Actions Configuration
  • SonarQube, Google-java-format static analysis tools configuration

Generate SpringBoot Microservice

Microservice Generation Microservice Generation

Generate REST API with CRUD operations

You can generate REST API with CRUD operation using the following command:

🔆 You should run the following command from within the generated project folder.

myservice> yo springboot:controller Customer --base-path /api/customers

This will generate:

  • JPA entity
  • Spring Data JPA Repository
  • Service
  • Spring MVC REST Controller with CRUD operations
  • Unit and Integration Tests for REST Controller
  • Flyway or Liquibase migration to create table

CRUD Generation

Why another generator when you have JHipster?

JHipster is an amazing SpringBoot application generator with lots and lots of cool features. However, there are certain JHipster features that does not fit for my preferences such as:

  1. I like jar packaging
  2. I like to use spring-boot-starter-* than configuring individual libraries
  3. I like to have an option to generate application without spring-security
  4. I prefer Flyway to Liquibase
  5. I like to have only minimum and required configuration ie no AsyncConfiguration, LocaleConfiguration, CacheConfiguration, Logstash Logging etc.
  6. I like .properties over .yml

Local Development Setup

> git clone https://github.com/sivaprasadreddy/generator-springboot.git
> cd generator-springboot
> npm install -g yo
> npm install 
> npm link
> yo springboot

Changelog

Version 0.0.5

  • Added support for generating docker-compose yml files for application, ELK, Prometheus, Grafana

Version 0.0.6

Version 0.0.7

  • Removed support for generation of config-server and service-registry
  • Updated SpringBoot and other libraries version

Version 0.0.8

  • Configured Checkstyle, PMD, SonarQube, google-java-format plugins
  • Added Localstack autoconfiguration support

Version 0.0.10

  • Upgraded SpringBoot to 2.6.7 and library versions
  • Updated Spring Cloud AWS setup to use new https://awspring.io/ based configuration
  • Removed springfox-boot-starter and used springdoc-openapi-ui
  • Added google-java-format support
  • Upgraded plugins versions
  • Removed Checkstyle, PMD plugins

Version 0.1.0

  • Upgraded SpringBoot to 2.7.4 and other library versions
  • Fixed code formatting
  • Fixed Flyway with MySQL and MariaDB issue

Version 0.1.1

  • Upgraded SpringBoot to 3.0.0 and other library versions
  • Upgraded AWS to 3.0.0-M3, compatible version with SpringBoot 3 which uses AWS 2.0 API
  • Tweaked code to get All entries from datasource using pagination
  • Supporting developing application in VSCode
  • Enhanced support for logback encoder when elk stack is selected
  • Fixes issue while generating api and tables when tablename contains camelCase(#47)
  • Upgraded liquibase configuration to use Out of the Box format and location

Version 0.1.2

  • Fixes issue with mysql and mariadb when flyway is selected (#58)
  • Support Mariadb Sequences (#59)
  • Support other liquibase formats (#69)
  • Upgraded SpringBoot to 3.0.2 and other library versions

More Repositories

1

spring-boot-microservices-series

Code for SpringBoot MicroServices Blog Series
Java
611
star
2

tomato-architecture

Tomato Architecture - A common sense driven approach to software architecture
431
star
3

Java-Persistence-with-MyBatis3

MyBatis
Java
148
star
4

sivalabs-blog-samples-code

Code samples for my blog posts on https://sivalabs.in
JavaScript
142
star
5

maven-archetype-templates

Maven Archetype Templates
CSS
136
star
6

springboot-learn-by-example

SpringBoot Learn By Example Book
SCSS
75
star
7

spring-boot-tutorials

SpringBoot Tutorials
JavaScript
63
star
8

jcart

JCart is a simple e-commerce application built with Spring.
Java
60
star
9

testcontainers-samples

Sample projects using Testcontainers for Java
HTML
54
star
10

techbuzz

A place for techie to share knowledge, blog posts, tech news etc
Java
37
star
11

spring-boot-application-template

Spring Boot Application Template
Java
31
star
12

intellij-live-templates

Intellij IDEA Live Templates
28
star
13

spring-boot-microservices-course

Spring Boot Microservices Course
Java
28
star
14

springboot-kubernetes-youtube-series

Code for "SpringBoot + Kubernetes Tutorial" YouTube Series
Java
26
star
15

devzone

A sample SpringBoot application
Java
24
star
16

java-testing-made-easy

Java Testing Made Easy YouTube Tutorial Series
Java
21
star
17

primefaces-beginners-guide

PrimeFaces Beginner's Guide Book Source Code
Java
15
star
18

twitter4j-spring-boot-starter

SpringBoot Starter for Twitter4J
Java
12
star
19

spring-boot-opentelemetry-demo

Spring Boot Open Telemetry Demo
Java
12
star
20

spring-boot-tutorials-blog-series

Code for Spring Boot Tutorials Blog Series
Java
11
star
21

sivalabs-dev-notes

My tech notes for quick reference
10
star
22

progen

Project Generator CLI
Go
10
star
23

go-for-spring-boot-developers

Go for Spring Boot Developers
Go
10
star
24

tc-guides-bot

OpenAI demo using LangChain4j and SpringBoot
Java
9
star
25

spring-initializr-extensions

Spring Boot Starter Extensions
Java
9
star
26

spring-boot-3-observability-grafana-stack

SpringBoot 3 Observability using Grafana Stack(Grafana, Prometheus, Loki, Tempo)
Java
8
star
27

modern-spring-boot

Modern Spring Boot features demo
Java
8
star
28

spring-boot-jooq-demo

SpringBoot + JOOQ Demo application demonstrating code generation using Testcontainers with Maven/Gradle and how to load associations
Java
7
star
29

beginning-spring-boot-2

Source code for my Beginning Spring Boot 2 book
Java
6
star
30

spring-security-oauth2-microservices-demo

Spring Security OAuth2 Microservices Demo
Java
6
star
31

spring-boot-jpa-crud-demo

SpringBoot CRUD Demo Using JPA
Java
6
star
32

sivalabs-youtube-code-samples

Sample code for my YouTube video tutorials
Java
6
star
33

must-know-java-libraries

Must Know Java Libraries
Java
6
star
34

spring-boot-todolist

Demo spring-boot application to try out new features.
Java
5
star
35

jblogger

A blogging application using SpringBoot.
CSS
5
star
36

moviebuffs

A movie rental store application
Java
4
star
37

clone-and-run-devexp-using-testcontainers

Clone and Run Developer experience using Testcontainers
Java
4
star
38

config-repo

4
star
39

spring-boot-thymeleaf-alpinejs-demo

A sample application using Spring Boot, Thymeleaf and Alpine.js
HTML
4
star
40

kafka-tutorial

Java
4
star
41

jenkins-shared-library

jenkins-shared-library
Groovy
3
star
42

cloud-native-microservices

Java
3
star
43

spring-boot-testcontainers-devmode

Spring Boot 3.1.0 Testcontainers support demo
Java
3
star
44

spring-boot-kubernetes-demo

Java
3
star
45

spring-boot-aws-kitchensink

Java
3
star
46

todo-list

Todo List Application using SpringBoot
Java
3
star
47

geeknight-cloud-native-apps-springcloud

Code for Cloud Native Applications using Spring Boot, Spring Cloud talk
Shell
3
star
48

java-ai-demos

Java AI Demos
Java
3
star
49

spring-boot-rest-api-antipatterns

A sample repo demonstrating common anti-patteerns in Spring Boot REST APIs
Java
3
star
50

spring-boot-redis-cache-demo

https://github.com/spring-projects/spring-boot/issues/27577
Java
2
star
51

microservices-config-repo

2
star
52

jpa-playground

Java
2
star
53

kubernetes-workshop

Kubernetes Workshop samples
Java
2
star
54

spring-boot-kafka-demo

Java
2
star
55

spring-ai-samples

Spring AI Samples
Java
2
star
56

bangalore-jug-modern-spring-boot

Java
2
star
57

video-library-monolith

Video Library application following monolithic architecture using SpringBoot
Java
1
star
58

vote-service

Vote Service
Java
1
star
59

jte-the-basics-app-gradle

1
star
60

techbuzz-spring-boot-angular

SpringBoot + Angular Application
Java
1
star
61

goquik

CLI for generating Go applications
Go
1
star
62

Learning-FP

Java
1
star
63

spring-boot-cli

Go
1
star
64

bookmarks-api-springboot

Bookmarks APi SpringBoot
Java
1
star
65

sivaprasadreddy

GitHub README
1
star
66

testcontainers-spring-boot-demo

Testcontainers Spring Boot demo application
Java
1
star