spring-projects / spring-loaded

Java agent that enables class reloading in a running JVM
Apache License 2.0
2.72k stars 515 forks source link

Support adding new @Controller annotated classes #44

Open akinnunen opened 10 years ago

akinnunen commented 10 years ago

Hi. It seems newly created classes are not recognized in the running application. Can we expect such feature in the future? Thanks!

aclement commented 10 years ago

How are you adding the new classes? As in how are you referring to what you are adding: are they new annotations, new enums, new annotation value types, or just regular classes you are new'ing up in new code? Are you using split packages with code from the same package split across a jar and a set of files in directories? The running app should just load them in the normal way and they become reloadable themselves if needs be.

akinnunen commented 10 years ago

I added a new class with a @Controller annotation and mapped one method from it to respond to a certain request path.

aclement commented 10 years ago

Oh I see. Adding a new Controller means that we have to kick Spring to tell it about the new Controller - so the class reloading is fine but the SpringPlugin isn't doing its job. I hope to get some assistance improving that SpringPlugin soon.

uTestMichaelL commented 10 years ago

Definitely interested in this improvement. A related one would be if I have a class, and I add a member variable that is @Autowired , then Hot Swap, that variable is still null if the class tries to use it - Spring isn't injecting it in.

aclement commented 10 years ago

jhipster ( http://jhipster.github.io ) does some of this with their much enhanced plugin for spring loaded.

scottescue commented 9 years ago

@aclement Are you still looking for help improving the SpringPlugin? I just found this project. I'd be glad to help however I can.

dahankzter commented 9 years ago

This is definitely the missing part. Having to restart our really heavy application where everything is injected is a real bummer.