Skip to content

Instantly share code, notes, and snippets.

@SriMaddy
Last active March 23, 2016 07:24
Show Gist options
  • Save SriMaddy/116b97100b006b559944 to your computer and use it in GitHub Desktop.
Save SriMaddy/116b97100b006b559944 to your computer and use it in GitHub Desktop.
-> light weight framework used to build any type of java apps
-> its non-invasive : does not force a programmer to extend any predefined class (like struts)
-> features :
-> simplicity (non-invasive)
-> testability (no need server/container)
-> lightly coupling
-> modules in spring 1.x :
-> core module
-> context module (J2EE)
-> DAO (JDBC)
-> AOP (Aspect oriented Programming)
-> ORM module
-> web module
-> MVC module
-> but web and MVC modules are combined in spring 2.x .
Core Module
-----------------
-> to avoid tightly coupling
-> to achieve loosly coupling
Dependency Injection
------------------------
-> setter/ constructor injection
-> spring ioc container have all beans/dependencies
Get Resource
------------------
-> Resource(I), ClassPathResource(C)
Get Bean
------------------
-> BeanFactory(I), XMLBeanFactory(C)
Object dependency injection
--------------------------------
-> two methods to denote this in config.xml
-> inner bean
-> <ref /> tag
-> <ref /> tag can contain any one of the following three attributes
-> local : both parent and child bean in same configuration file (spring_config1.xml)
-> parent : two config files (spring_config1.xml for parent and spring_config2.xml for child)
-> bean : first checking goes on local file, if no, goes to parent file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment