Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create spring boot example #919

Open
ravening opened this issue Feb 10, 2020 · 9 comments
Open

Create spring boot example #919

ravening opened this issue Feb 10, 2020 · 9 comments

Comments

@ravening
Copy link

@ravening ravening commented Feb 10, 2020

Is your feature request related to a problem?
I have a simple Java Spring boot application which displays greeting message on navigating to localhost:8080/hello but devspace is unable to serve the port forward nor able to reload the code changed dynamically

Which solution do you suggest?
When I change the Java code, devspace dev should automatically reload the code and build the changes similar to other supported languages

Which alternative solutions exist?

Additional context

/kind feature

@FabianKramm
Copy link
Member

@FabianKramm FabianKramm commented Feb 10, 2020

@ravening thanks for opening this issue! Yes currently we are missing an example for spring boot, I think we should create one! However, generally speaking its just a matter of the right DevSpace configuration, I don't see any problem why DevSpace shouldn't work with spring boot applications. Is there any error during devspace dev or in the logs (.devspace/logs)?

@FabianKramm FabianKramm changed the title Devspace support for spring boot applications Create spring boot example Feb 10, 2020
@ravening
Copy link
Author

@ravening ravening commented Feb 12, 2020

@FabianKramm Even I was thinking the same.. its just a plain hello world java application which should be same as other projects but didnt find any errors in the logs as well.

I did devspace deploy to deploy on the cluster and then devspace dev to start working on it.
If I make any changes to source code, I didnt see the package being compiled automatically.
The end point returned the same message

@LukasGentele LukasGentele self-assigned this Feb 12, 2020
@LukasGentele
Copy link
Member

@LukasGentele LukasGentele commented Feb 14, 2020

@ravening I will take a look at this and write a blog post about how to configure DevSpace for spring boot with hot reloading. We might add that as a java quick start guide as well.

@LukasGentele
Copy link
Member

@LukasGentele LukasGentele commented Apr 8, 2020

Alright. I did not find the time to create a blog post about DevSpace and spring boot but with the latest release, we now have a java quickstart project. It shows with a very simple example how to solve java container hot reloading with DevSpace.

@ravening Is that what you were looking for? Feel free to check it out here: https://devspace.sh/cli/docs/getting-started/initialize-project

@heroyin
Copy link
Contributor

@heroyin heroyin commented Apr 8, 2020

This java quickstart is very simple, sync java file and rebuild in remote container. For java spring , it's too slow. If I got time , will post a hot reload sample, like https://github.com/HotswapProjects/HotswapAgent

@LukasGentele
Copy link
Member

@LukasGentele LukasGentele commented Apr 8, 2020

That looks awesome! Can't wait for you to contribute the next Java project. Thanks, @heroyin

@heroyin
Copy link
Contributor

@heroyin heroyin commented Apr 9, 2020

https://github.com/heroyin/quickstart-spring-java Spring java quickstart is coming! @LukasGentele

@Romeh
Copy link

@Romeh Romeh commented Jul 16, 2020

@heroyin @LukasGentele
How it works with multii module spring boot application ? as other the main module which has *.classes pushed to the docker container , the other modules will be packaged as JAR in the libs folder of the main application .

is pushing new jar for one of the sub modules will trigger the hot code reload ?

@LukasGentele
Copy link
Member

@LukasGentele LukasGentele commented Sep 7, 2020

@Romeh Sorry for the late reply. I don't know how to make it work for multi-module spring boot applications but in case you figured it out, feel free to share your solution with us :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.