Please enable JavaScript.
Coggle requires JavaScript to display documents.
Spring - Coggle Diagram
Spring
09-Spring MVC: controllers and views
create a controller class
define controller method
add request mapping to controller method
return view name
develop view page
create models to store data
04-Spring configuration with java annotations
annotations are metadata in your java class
applicationContext -> <context:component-scan />
Component(name)
annotation on the class name
ClassPathXmlApplicationContext, getBean
default bean name would be class name
05-Dependency injection - annotations
constructor injection -
Autowired
setter injection -
Autowired
method injection -
Autowired
differentiate implementation beans -
Qualifier
inject field values -
Value
01-IoC using Xml configuration
we have taken out the object creation process from Java to a Spring config file. Now spring is managing the object creation process.
applicationContext.xml contains the beans
Configure beans inside xml file and used inside our main code
ClassPathXmlApplicationContext, getBean
02-Dependency injection using Xml configuration
constructor injection
<constructor-args />
setter injection
<property></property>
literal values injection
load literal values from a property file
03-Spring bean scope and lifecycle
default scope - singleton
new object - prototype
scope property
lifecycle - init, destroy
07-Spring configuration with java code
create a java file like xml file -
Configuration,
ComponentScan
load that using AnnotationConfigApplicationContext class
create beans using
Bean
annotation
inject properties from file using -
PropertySource,
Value
annotation
08-Spring MVC: building spring web app
Spring web project
copy spring jars into lib folder
copy web.xml and servlet file
10-Spring MVC: Request Params & request mapping
RequestParam
annotation
Controller level request mapping
06-Annotations: bean scope and lifecycle methods
Scope,
PostConstruct,
PreDestroy
11-Spring MVC: Form tags and data binding
12-Spring MVC: Form validations