Closed ndariass closed 6 years ago
@ndariass,
Thanks for your PR, but it would be interesting to add a flag in the commands to choose the version, eg:
$ spring scaffold -n "User" -p "name:String email:String" -v "2.0.4"
So that the previous versions of some users do not break, understand?
I'll help you with this, please create a separate branch and open a pr to it, which I'll help you with.
@NetoDevel Thanks for your feedback. Adding an option to set the version would imply:
1.x.x
on both libraries (spring-scaffold
and spring-boot-generate
). Although it might work, I think it would be better to use the latest versions on master
branch.I think a simpler approach for that would be creating a release branch with the current state of master
(e.g. release/0.0.1
) and keep working on the latest changes, creating new PRs to master. This way, you could still give support for devs using Spring Boot 1.x.x while working with the latest version of the framework.
Please let me know your thoughts about it.
@ndariass
It's interesting to approach the release, but I still prefer that generate is based on a specific version, as covered in the first item you mentioned.
And I was wrong to put the version in the commands, it is better an attribute in the file scaffold.info:
spring.version: 2.0.4
Why do I prefer this?, just because the user does not have to change the version , he install the last release of the scaffold and changes the version in the scaffold.info file.
We would create a list of supported versions and we would update as new changes in the spring framework.
What do you think?
Sorry, my english is not very well.
and I'm refactoring the code in another repository, to keep the project easier. https://github.com/NetoDevel/generate-core
Can you please create an issue with these specs? This change has currently low priority on my team but I'll do my best to eventually create a PR.
Since you are currently doing a refactor on a different repo, should I keep contributing to this one? When are you planning to integrate these changes?
@ndariass, sorry for the delay to answer you. I will create a issue and create a branch in this repository with the refactoring code that is in the other repository. I do not have a date for these new features ..
Is this pull request preventing you from following your work?
My two cents: I too think it would be better to use the latest versions (2, in this case) on master branch.
@ndariass,
I tested your PR and everything was ok.
Following changes were made in order to make the libraries work with Spring 2.0.4:
findOne
on controller and service changed tofindById
.pom.xml
files.JpaRepository.findById
now returns anOptional
.sample
project was generated with these changes.