Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/palmurugan/loki-spring-generator
Spring boot microservice application generator
https://github.com/palmurugan/loki-spring-generator
generator microservice microservice-framework spring springboot springboot2
Last synced: 22 days ago
JSON representation
Spring boot microservice application generator
- Host: GitHub
- URL: https://github.com/palmurugan/loki-spring-generator
- Owner: palmurugan
- Created: 2019-01-07T09:35:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-21T19:15:12.000Z (almost 6 years ago)
- Last Synced: 2024-10-25T01:37:09.692Z (23 days ago)
- Topics: generator, microservice, microservice-framework, spring, springboot, springboot2
- Language: Java
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Loki - Microservice Generator
[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)]()is a Yeoman generator that creates a SpringBoot Microservice application with JWT / Keycloak SSO authentication.
## Entity Generation
We can create an entity with different types of mappings (OneToMany, ManyToOne, OneToOne, ManyToMany). We can create an entities whith different databases like RDBMS, MongoDB, Casandra etc.
## Table of Contents
- [Quick install guide](#quick-install-guide)
- [Running the app](#running)
- [Docker Integration](#docker)## Quick install guide
You need to have [Node.js](https://nodejs.org) installed.
$ npm install -g yo
$ npm install -g generator-loki
$ yo loki## Running
### Creating an Application
```sh
$ yo loki
```### Creating Entities
```sh
$ yo loki:entityEx: $ yo loki:entity ../metadata/metadata.json
```### Sample Metadata for entity creation
```json
{
"entityDetails": [
{
"entityName": "User",
"attributes": [
{
"name": "userName",
"type": "String",
"unique": true,
"nullable": false,
"minLength": 6,
"maxLength": 30,
"regex": {
"pattern": "[A-Za-z0-9]+",
"errorMessage": "Username should be alphanumeric"
}
},
{
"name": "password",
"type": "String",
"unique": false,
"nullable": false
},
{
"name": "email",
"type": "String",
"unique": true,
"nullable": false
},
{
"name": "age",
"type": "Integer",
"unique": false,
"nullable": false
}
],
"mappings": [
{
"type": "OneToMany",
"entity": "Role",
"placeholder": "roles"
}
]
},
{
"entityName": "Role",
"attributes": [
{
"name": "name",
"type": "String",
"unique": true,
"nullable": false,
"minLength": 4,
"maxLength": 15,
"regex": {
"pattern": "[A-Za-z0-9]+",
"errorMessage": "RoleName should be alphanumeric"
}
}
]
}
]
}
```
# Report Issue
Please feel free to report an issuehttps://github.com/palmurugan/loki-spring-generator/issues
# Author
PalMurugan C