Coder Social home page Coder Social logo

sivaprasadreddy / generator-springboot Goto Github PK

View Code? Open in Web Editor NEW
213.0 213.0 74.0 4.98 MB

Yeoman based Spring Boot Microservice generator

Home Page: https://www.npmjs.com/package/generator-springboot

License: MIT License

JavaScript 39.07% Java 59.71% Dockerfile 0.90% Shell 0.31%
microservices spring-boot yeoman yeoman-generator

generator-springboot's Introduction

Hey there, I'm Siva! ๐Ÿ‘‹

sivalabs's YouTube ย  sivalabs's Twitter ย  Siva's Linkdein ย  Siva's StackOverflow ย 

  • ๐Ÿ’ป Building Software since 2006
  • ๐Ÿ’ฌ Extensively worked on Java, SpringBoot, Docker, Kubernetes or any tech related stuff.
  • ๐ŸŒฑ Interested in learning new technologies.

Twitter follow @sivalabs ย  Linkedin follow @sivalabs ย  Blog

Languages and Tools:

Siva's most used languages Siva's github stats

Key Repositories

generator-springboot's People

Contributors

mend-bolt-for-github[bot] avatar rajadilipkolli avatar renovate[bot] avatar sivaprasadreddy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-springboot's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting end of expression or separator near "labe

Creating Controller with Custom name is not importing packages correctly

I have tried to create Controller with name Order, it has created class files correctly but the import statements in controller and service class are wrong and pointing to customer package.

Expectation : import statements of entities, Service and Respository in controller should be pointing to correct path.

Cannot run command as root user

Installed all the prerequisites and when I try to create a new project using yo springboot command, I get an error

# yo springboot
/usr/lib/node_modules/yo/node_modules/conf/index.js:128
			throw err;
			^

Error: EACCES: permission denied, open '/root/.config/insight-nodejs/insight-yo.json'
    at Object.openSync (fs.js:440:3)
    at Object.readFileSync (fs.js:342:35)
    at Conf.get store [as store] (/usr/lib/node_modules/yo/node_modules/conf/index.js:108:18)
    at Conf.get (/usr/lib/node_modules/yo/node_modules/conf/index.js:47:27)
    at Insight.get optOut [as optOut] (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:52:22)
    at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:205:48)
    at Module._compile (internal/modules/cjs/loader.js:971:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
    at Module.load (internal/modules/cjs/loader.js:822:32)
    at Function.Module._load (internal/modules/cjs/loader.js:730:14) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/root/.config/insight-nodejs/insight-yo.json'
}

Changed the permission to 777 for the file

# chmod 777 /root/.config/insight-nodejs/insight-yo.json
# ls -l /root/.config/insight-nodejs/insight-yo.json
-rwxrwxrwx 1 root root 29 Feb 17 13:29 /root/.config/insight-nodejs/insight-yo.json
# cat /root/.config/insight-nodejs/insight-yo.json
{
	"clientId": 729298861707
}

Cant even run as sudo

# sudo yo springboot
/usr/lib/node_modules/yo/node_modules/conf/index.js:128
			throw err;
			^

Error: EACCES: permission denied, open '/root/.config/insight-nodejs/insight-yo.json'
    at Object.openSync (fs.js:440:3)
    at Object.readFileSync (fs.js:342:35)
    at Conf.get store [as store] (/usr/lib/node_modules/yo/node_modules/conf/index.js:108:18)
    at Conf.get (/usr/lib/node_modules/yo/node_modules/conf/index.js:47:27)
    at Insight.get optOut [as optOut] (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:52:22)
    at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:205:48)
    at Module._compile (internal/modules/cjs/loader.js:971:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
    at Module.load (internal/modules/cjs/loader.js:822:32)
    at Function.Module._load (internal/modules/cjs/loader.js:730:14) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/root/.config/insight-nodejs/insight-yo.json'
}

Enable Github's Discussion

Enabling Github's Discussion will help to chat to the owner of repository , instead of raising Issues for all.

Code Clean up for 0.1.3 version

Considering the new features introduced in Spring Boot 3.1.0, I have the following things that can clean up our code generation process:

  1. Do we need Spring Cloud BOM Configuration?
  2. Remove milestone and snapshot reposiotry configurations
  3. Do we need .editorconfig?
  4. Rename ErrorDetailProblemHandlingControllerAdvice to GlobalExceptionHandler and move into com.mycompany.<service>.config package.
  5. Shall we remove application-heroku.properties, application-local.properties?
  6. Shall we remove generating h2 db migration scripts by default and provide H2 as one of the database option?
  7. When using MySQL database tests are failing with SSL errors.

V1.16.0

  • Use fluent JPA setters
  • Moving FindQuery to pojo mapper in service package to util, for re-use purpose
  • provide various mappers(mapstruct/modelmapper,etc) in the lines of liquibase or flyway
  • use loggable annotation in service layer

Add License

You have done cool work.

I would like to fork your project and use that inside our company, but I can not due to missing license.

Github says missing license does not allow me to use your code as a base.

If you willing to let me use the code, add license using this guide.
I'd do it for you, but I have no clue what type of license you would like to have. :)
Thank you!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency maven to v3.9.7
  • chore(deps): update eclipse-temurin docker tag to v17.0.11_9-jre-focal
  • chore(deps): update dependency gradle to v8.8
  • chore(deps): update dependency maven-wrapper to v3.3.2
  • chore(deps): update docker.elastic.co/elasticsearch/elasticsearch docker tag to v8.13.4
  • chore(deps): update docker.elastic.co/kibana/kibana docker tag to v8.13.4
  • chore(deps): update docker.elastic.co/logstash/logstash docker tag to v8.13.4
  • chore(deps): update dependency sinon to v18
  • chore(deps): update grafana/grafana docker tag to v11
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
generators/server/templates/app/docker/docker-compose-elk.yml
  • docker.elastic.co/elasticsearch/elasticsearch 8.12.2
  • docker.elastic.co/logstash/logstash 8.12.2
  • docker.elastic.co/kibana/kibana 8.12.2
generators/server/templates/app/docker/docker-compose-monitoring.yml
  • grafana/grafana 10.2.3
  • prom/prometheus v2.49.1
dockerfile
.gitpod.Dockerfile
generators/server/templates/app/Dockerfile
  • eclipse-temurin 17.0.10_7-jre-focal
  • eclipse-temurin 17.0.10_7-jre-focal
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/docs.yml
  • actions/checkout v4
  • actions/setup-python v4
generators/server/templates/app/.github/workflows/gradle.yml
  • actions/checkout v4
  • actions/setup-java v3
generators/server/templates/app/.github/workflows/maven.yml
  • actions/checkout v4
  • actions/setup-java v3
gradle
generators/server/templates/gradle/gradle.properties
generators/server/templates/gradle/code-quality.gradle
generators/server/templates/gradle/owasp.gradle
generators/server/templates/gradle/settings.gradle
generators/server/templates/gradle/build.gradle
gradle-wrapper
generators/common/files/gradle/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7
maven-wrapper
generators/common/files/maven/.mvn/wrapper/maven-wrapper.properties
  • maven 3.9.6
  • maven-wrapper 3.2.0
npm
package.json
  • chalk 4.1.2
  • lodash 4.17.21
  • shelljs 0.8.5
  • yeoman-environment 3.19.3
  • yeoman-generator 5.10.0
  • chai 4.4.1
  • fs-extra 11.2.0
  • mocha 10.3.0
  • sinon 17.0.1
  • yeoman-assert 3.1.1
  • yeoman-test 6.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

DTO

Do you intend to include the generation of DTO's?

Improper db table names when using CamelCase variable name

When creating entities with CamelCase scheme, the @Table entity is created with an improper naming scheme.
For eg. when issuing
yo springboot:controller ShoppingCart --base-path /api/shoppingcart , then entity class has @Table(name = "shopping carts") which causes an InvalidDataAccessResourceUsageException when running the tests

Local changes to Yeoman Generator

I have used your generator as a base and have made some customization to address to organizational needs. I tested it locally using npm link and it worked as expected.
Committed the changes in my github repo. Now post taking the pull from git and running it i don't see my changes reflecting.
Please help!!

Confusion with pageNumber on Pagination

Affected Branch : 0.1.1

Glad that we now have pagination for entities, but I think the setting the page number on response will lead to confusion as the page number get increment on response.

This may lead to confusion as the we make the request for the first page, with index 0 and is returned the pageNumber 1. this is quite evident in the controller test where we make requires for 0th page and get returned the page with pageNumber 1,

given(<%= entityVarName %>Service.findAll<%= entityName %>s(0, 10, "id", "asc"))
.willReturn(<%= entityVarName %>PagedResult);
this.mockMvc
.perform(get("<%= basePath %>"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.size()", is(<%= entityVarName %>List.size())))
.andExpect(jsonPath("$.totalElements", is(3)))
.andExpect(jsonPath("$.pageNumber", is(1)))

Can we have a look into this?

Run google-java-format after project generation

Formatting the templates as per google java format manually is a painful process especially when rendering something conditionally. So, a better approach could be running google java format goal after project code generation depending on selected build tool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.