• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

spring with XML configuration = ugly

it's been years since i did spring with manual XML instead of the automated annotations

just had to slog through it tonight, and oh my gosh

someone shoot me!
 
i've never had to set up spring before, every project i've been on, it's already set up. and i've been using groovy, and if you add a new file in the "services" directory structure and just end the class/file name with "Service" it automatically makes it injectable.
 
yeahhh i should really see if i can rewrite this whole thing in grails

at the very least i'm gonna change it to annotation-driven DI, so i don't hurt myself
 
I've moved to Java configuration with annotations. it's so much cleaner. The best part is that it's easier for the tools to show you usages of things. IntelliJ did a decent job understanding Spring XML but other code searching tools did not.
 
i finally got this thing set up to at least allow new beans to be wired with @Component

too much of a pain to convert all the old stuff from XML to annotations, but maybe someday when i'm really bored
 
Dagger 2 is really nice. I'm loving it (we just switched our projects from Guice to Dagger). No more days wasted because of some unknowable injection bug.
 
Dagger reminds of the dependency injection framework I used in C# projects a long time ago. It had the same basic import/provide mechanism.
 
Spring is tried and true. Yea, the XML context configuration is archaic, but you did the right thing by switching new development to annotation-driven. Once you're at that point, who cares. 😉

I never liked Guice. I used it with Gin in a GWT based project and boy, was that miserable. Maybe it was Gin and GWT that made it such a horrible experience? It made me love Spring that much more...
 
yep, once i got to annotations everything became easy again

spring is weird like that. one or two days of intense springification, then don't need to touch it for another 6-12 months because it just works.
 
Back
Top