Posts

Showing posts from November, 2014

Explore Spring 4 Features - Part 2

Just Starting from the point where I left in the last POST The content of aspect-config.xml is: Here MyAspect is a AspectJ class: public aspect MyAspect { private DataInjectObject injectedData; public DataInjectObject getInjectedData() { return injectedData; } public void setInjectedData(DataInjectObject injectedData) { this.injectedData = injectedData; } pointcut incept1() : execution(* com.springjavaconfig.controller.BaseControllerNew.secureMethodNew(..,DataInjectObject)); pointcut incept2() : execution(* com.springjavaconfig.controller.BaseController.getEmployeeForm()); Object around() :incept2() { System.out.println("################################## \n\n"); System.out.println("####### ASPECTS IN ACTION ####### \n\n"); System.out.println("################################## \n\n"); System.out.println(" ****** Injected DATA:"+injectedData); return proce

Explore Spring 4 Features

The recent Spring Version is 4 , which is fully integrated with Java 8 . It has Got a lot of features in it bucket now. In this Blog I am going to explore some of its features with some insight. First thing that I will start with is: The Spring Java Config . Recently I have been working on Spring Java Config, I have been trying to migrate one of my existing Spring Projects (Which had Spring-Security 3.2, Aspects and other features) into a fully Java Based Configuration . My objective is,there is going to be no XML configuration, even web.xml . Spring Java config, though it is not a part of Spring 4. It has been introduced in Spring 3.2 . I will be creating a project with no .xml files bearing any Spring based configuration. All the configuration will be moved to Java. In the cloud there are actually a lot of posts bearing a lot of useful information regarding this Spring Java Based configuration and lot of them are really useful but I really had hard time in c