spring-loaded icon indicating copy to clipboard operation
spring-loaded copied to clipboard

Support adding new @Controller annotated classes

Open akinnunen opened this issue 11 years ago • 7 comments

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

akinnunen avatar Feb 20 '14 20:02 akinnunen

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.

aclement avatar Feb 20 '14 22:02 aclement

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

akinnunen avatar Feb 20 '14 22:02 akinnunen

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.

aclement avatar Feb 20 '14 23:02 aclement

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.

uTestMichaelL avatar May 14 '14 15:05 uTestMichaelL

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

aclement avatar May 14 '14 15:05 aclement

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

scottescue avatar Nov 19 '14 20:11 scottescue

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

dahankzter avatar Dec 02 '14 09:12 dahankzter