Spring Framework

Spring Framework - Application Context - three ways to get to the application context

Spring Framework - Application Context - three ways to get to the application context

This article shows you three different ways how to get to the Spring Framework Application Context in your code. Summary (This is a repost of an older article I wrote in 2010). In searching Google for “Spring ApplicationContextAware ”, you will come across a lot of recommendations and I also see a lot of folks continuing to complain saying that their setApplicationContext method does not get invoked. So to help clarify, I’m blogging a few notes in hope that it helps clarify how the context works.

Spring LDAP Overview | Baeldung

Spring LDAP Overview | Baeldung

<img src="/img/2017/03/springframework.png" alt=""> Learn how to use the Spring LDAP APIs to authenticate and search for users, as well as to create and modify users in the directory server. Source: Spring LDAP Overview | Baeldung

Grails No profile found for name [web] illegalstateexception

<img src="/img/2013/11/grails.png" alt="Grails"> Most likely you’ve landed on this page because you’ve searched for the error in a search engine and it brought you here. Symptom: When you run “grails” under an existing project that you previously had (either on a different PC or from a source-control like GIT or SVN and you’ve mistakenly included the “build” directory). The associated error would have been one of the following: Grails No profile found for name [web] or java.

Gradle Spring Woes: Issues in creating single jar bundle with all dependency jars nested within

<img src="/img/2016/11/springframework.png" alt="springframework"> If you’re implementing any projects with Spring and Gradle (for build), as your project grows you may run into this issue. Or you’ve landed on this page by searching on Google for “Unable to locate Spring NamespaceHandler for XML schema namespace” (your actual XML that it’s error-ing out may vary). Either way, you’re in luck! Most likely, you’re using the fatjar gradle plugin to create a single JAR for executing as “java -jar one-big-bundle.

Tomcat 6+: Infamous "SEVERE: Error listenerStart" message - How-To debug this error?

I’m sure if you have been developing with Java and Tomcat for sometime, you are likely to run into the infamous debug error. SEVERE: Error listenerStart You will most likely start Googling it trying to find out what the heck is going on. And in trying to see the extended logging on what that “listenerStart” error means. After some lucky searches, you will see links asking you to drop a “log4j.

Spring Framework Samples and Reference Implementations online in svn

Sometimes it’s good to look at the svn repository for the reference sample that Spring Framework provides. Here’s a quick link for that URL: https://src.springframework.org/svn/spring-samples/ You can traverse through it via a HTTP(s) browser or you can download the latest samples via tools like TortiseSVN. Here is a list of some of the projects samples that are available today: spring-samples - Revision 431: / * configuration-basic/ * jpetstore/ * mvc-ajax/ * mvc-basic/ * petcare/ * petclinic/ * petclinic-groovy/ * spring-travel/ * task-basic/ * templates/ * tutorials/ Hopefully this article will be beneficial for someone who is trying to get familiar with Spring Framework.