Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa Spring Questions on Spring

Have Programming Question? Ask it here!

Deepak Lal
Questions on Spring
2 Answer(s)      5 years and 9 months ago
Posted in : Spring

View Answers

November 13, 2008 at 1:06 AM

Hi friend,

The Spring Framework provides solutions to many technical challenges faced by Java developers and organizations wanting to create applications based on the Java platform. Because of the size and complexity of the functionality offered, it can be hard to distinguish the major building blocks from which the framework is composed. The Spring Framework is not exclusively linked to the Java Enterprise platform, although its far-reaching integration in this area is an important reason for its popularity.

With inversion of control , instead of executing application code at startup, a library called a framework is called. The framework then invokes the application code. The goal of inversion of control is to create a separation between the code itself and how the various pieces of code are connected together. It makes code much more readable.

There are two types of inversion of control: dependency injection and dependency lookup. In both cases, the framework instantiates the applications? objects. In the case of dependency injection, the framework knows how the dependencies of the objects are to be set. In the case of dependency lookup, the framework will ask the objects itself how their dependencies are to be set.


Spring reads the dependencies from an xml file, usually called applicationContext.xml, that (appart from the formatting which I can?t get right) looks as follows:

<bean id="frontend" class="">
<property name="matchService" ref="matchService"/>
<property name="clubService" ref="clubService"/>

<bean id="matchService" class="">
<property name="matchDao" ref="matchDao"/>

<bean id="clubService" class="">
< property name="clubDao" ref="clubDao"/>

<bean id="matchDao" class="">
< property name="database" ref="database"/>

<bean id="clubDao" class="">
< property name="database" ref="database"/>

<bean id="database" class="">
< property name="username" value="user"/>
< property name="password" value="secret"/>
< property name="url" value="jdbc:mysql://localhost:3306/soccer_db"/>;

November 13, 2008 at 1:08 AM

Aspect-Oriented Programming(AOP) complements Object-Oriented Programming (OOP) by providing another way of thinking about program structure. In addition to classes, AOP gives you aspects. Aspects enable modularization of concerns such as transaction management that cut across multiple types and objects. (Such concerns are often termed crosscutting concerns.)

One of the key components of Spring is the AOP framework. While the Spring IoC container does not depend on AOP, meaning you don't need to use AOP if you don't want to, AOP complements Spring IoC to provide a very capable middleware solution.


Visit for more information.


Related Tutorials/Questions & Answers:
Questions on Spring - Spring
Questions on Spring  1> what is Spring Framework ? why does... in Spring ? 3> what is Spring - Aspect Oriented Programming,Please explain with a working Example for Spring - Aspect oriented Programming Concept.?  
spring questions - Spring
spring questions  what is framework? what are the main objectives of Spring? what IOC ? what it can do
spring question - Java Interview Questions
spring question  what is quartz API in spring
Spring question - Java Interview Questions
Spring question  Hi Pls any one give idea abot this question? in the above statement, what is the meaning og abstarct = true? Thanks In Advance   Hi friend, Read for more information. http
Ask Spring Questions Online
Ask Spring Questions Online       Spring is an open source application Framework for Java platform and .NET Framework. The prime feature of Spring
spring   hi how can we make spring bean as prototype how can we load applicationcontext in spring what is dependency injection
spring  Access JSP files in Spring
spring  javascript browse image in spring progrme
spring  how to upgrade from struts2 to spring
spring  sir how to access multiple jsp's in spring
spring   i am a beginner in java.. but i have to learn spring framework.. i know the core java concepts with some J2EE knowledge..can i learn spring without knowing anything about struts
Spring  What is AOP concept in spring? How AOP concept differ from DI concept
spring  sir can you explain me the flow of sample example by using spring? thanks
spring   package bean; public interface AccountsDAOI{ double... normally. i set the classpath=D:\java softwares\ST-IV\Spring\spring-framework-2 .5.1\dist\spring.jar;D:\java softwares\ST-IV\Spring\spring-framework-2.5.1\lib\c
Spring  I understand spring as dependency injection. It can avoid object creating and can directly inject values. But i am comfusing that Dependency... are created. By the same way i want to know how spring injected property
the following links:
the following links:
spring - Spring
spring  what is Session Factory in spring
spring - Spring
spring  what is the use of HashTable concept in spring
spring - Spring
spring  give me the explanation about spring>and give me the difference between spring and EJB 3.0 WHAT IS THE USAGE OF SPRING WHERE WE HAVE TO USE IT? GIVE ME ONE EXAMPLE
spring - Spring
spring  Hi sir how compile spring application on jboss5.1.0 server how run spring application on jboss5.1.0 server thanks
spring - Spring
spring  what is the use of spring  Hi Friend, Spring is grate framework for development of Enterprise grade applications. Spring.... Spring can be used to configure declarative transaction management, remote access
SPRING - Spring
SPRING  In spring frame work when applicationcontext.xml will be load into the contianer i want answer plz replyyyyyy
spring - Spring
spring  how spring is light weight? please tell me this i want to know
spring - Spring
spring   hi, I need sample example user update profile using spring with hibernate and spring jsp. I need the sample code very urgently. Please... the following link:
spring - Spring
spring  i want to work in spring.i m new to spring. i have download the springframework 2.5.4 , i dont know how to use this in eclipse 3.3. i m... information.
spring - Spring
spring  hi how to use work ioc in spring. Regards Venkatesan  Hi Friend, Please visit the following link: Here you will get the explanation of IOC and AOP. Thanks
spring - Spring
spring  what is the difference between spring and hibernate and ejb3.0  Hi mamatha, Spring provides hibernate template and it has many.... * Spring hibernateTemplate also throws RunTime exception compared to checkd
spring - Spring
spring  sample code for formvalidation by using spring with javascript as presentation ex textboxes like dept id dept name Submit.../spring/userregistration.shtml Hope that it will be helpful for you. Thanks
spring - Spring
spring  i want to work in spring.i m new to spring. i have download the springframework 2.5.4 , i dont know how to use this in eclipse 3.3. i m using JBOSS server. help me plz
Spring and Eclipse - Spring
Spring and Eclipse  How to add Spring API Docs to Eclipse
spring security - Spring
spring security  Can i use spring security concept acegi for any type of java applications
Spring Question - Spring
Spring Question  Sir what is difference between spring session and jsp session
spring MVC - Spring
spring MVC  what is the use of applicationcontext.xml,[servelt-name]-servlet.xml,properties file in spring MVC module
Spring mvc
Spring mvc  what is spring mvc
spring with jms
spring with jms  examle for spring with jms
RichFaces + Spring Connectivity - Spring
RichFaces + Spring Connectivity  Hi We are having requirement of using RichFaces with Spring Framework. When the user fills out all the forms information(textbox) and clicks submit, then how to retrieve the value within Spring
Tutorial for spring - Spring
.  Hi friend, I am sending book name of spring framework. 1. Beginning Spring Framework 2. 2. Spring in Action, Second Edition Beginning Spring Framework 2 shows beginning Java developers how to build server side Java
Spring Usage - Spring
Spring Usage  Hi This is Chandra Mohan, I want to work with Spring. SO, i want to working with spring, what are the API's required i.e. how to set the classpath,jar files and Structure of the Spring project. Please
spring with hibernate - Spring
spring with hibernate   Hi, I need the sample code for user registration using spring , hibernate with my sql. Please send the code as soon as possible. I need Spring with Hibernate code not struts. Thanks, Valarmathi
spring web - Spring
spring web  hi thanku for reply :) Actually i dint get u what is meaning of spring web as i understand i am telling you. I am using eclipse and jar files like spring.jar,tlds of spring. hibernet.jar and also required jars
Spring Duplicate submit - Spring
Spring Duplicate submit  hi, i have problem in spring, i am pressing back or refresh my request get submitted again what i can do to avoid this,i am using only spring not struts
spring hibernate spring
spring hibernate spring  why are all the links in the following page broken. the following link: Spring Hibernate Thanks
spring Web Services - Spring
spring Web Services  Hi, Can any one explains or give me some example which gives me that how to start up spring web services. Thanks, mahi
spring 2.5 - Spring
spring 2.5  Hi deepak, i've a problem populating the select drop down in spring. i m pasting the relevant codes in the box. plz have a look and suggest me the remedy. potion from selectivepriceincrease.jsp
Spring Framework Training - Spring
Spring Framework Training  THinking of taking spring framework training from Intertech. Here's the class... does this give me what I need?
Spring MyEclipse Code - Spring
Spring MyEclipse Code  How To Configure Spring in MyEclipse ?  Hi Friend, Please visit the following link: Hope that it will be helpful for you
spring mvc - Spring
spring mvc  hi referenceData() in SimpleFormController never called. use this for dropdown list in insert screen. With Regards Venkat
Spring ApplicationContextAware
Spring ApplicationContextAware  What is the exact usage of ApplicationContextAware interface in spring
spring MVC frame work - Spring
spring MVC frame work  Example of spring MVC frame work