This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am new to spring and using spring 2.0. I am writing an AOP Logging program.
I am not getting compilation error.
While running the Main.java I am getting warning log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
My doubt is what i will add the syntax of code in Main.java so that i am getting the output.
[b]”I have added the jar files in the class path .asm-2.2.3.jar, asm-commons-2.2.3.jar, asm-util-2.2.3.jar, aspectjrt.jar, aspectjweaver.jar, spring-aop.jar, spring.jar,log4j.jar, cglib-nodep-2.1_3.jar”
First: The warning you are getting is generated by log4j, You need to configure log4j to remove this warning. To do that create a log4j.xml configuration file and add a category like this. Also have commons-logging.jar on the class path.
Second: In Main you are just instantiating the spring context, you are not calling anything. So follow the suggsation by Anshu and call the greeter method.