Mindmap
spring mvc

Inhalt der Mindmap
spring mvc
definition
- build software on top of Model-view controller architecture
- View
- can use JSP
- use a view resolver to identify what JSP should handle a specific request
- can use prefix to define a path
- can use a suffix to define a format (.jsp)
- resolver view must be specified inside "web.xml"
- organization
- should be stored inside "WEB-INF"
- chaining
- can chain views, through the controller using "forward" or "redirect"
- tags
- make interacting with data easier in our pages
- types
- spring.tld
- evaluating error
- setting themes
- outputting internationalized messages
- spring-form.tld
- based around proccessing form data
- most of its tag are mirrored from html form tag
- spring.tld
- interceptor
- are part of the request life cycle. Trigered when goes to or goes from controller
- used to perform actions before or after handling, or after completion of a request
- spring allow to create our interceptor or use existing ones, like the Locale Changing(to change lenguage)
- View
- build software on top of Model-view controller architecture
web.xml
- here the view resolvers are configured
- contains the directory where JSPs are storaged
- needed information to map successfully request and JSP
- also, can configure them to retrieve static resorces as pdf
- contains the directory where JSPs are storaged
- here the view resolvers are configured
components of architecture
- @Controller
- handle incoming request and building the response
- gateway to bussiness logic tier
- determine the view to show the data according to the returned model
- annotation
- @Controller
- @RequestMapping
- @ModelAttribute
- used whenever we want to send data to the controller or retrive data from the controller
- Binding result
- can forward a request
- also can redirect a request (creates a new one, so the state on the current one vanish)
- @Service
- contain bussiness logic (describes the verbs)
- ensures bussiness object is in a valid state
- transactions often begin
- @Repository (DAO)
- Mapping with DB or and object
- focused on persisting and interacting with DB (focused on nouns)
- @Controller
validation
- can use the JSR 303
- validation standard in the Java (vanilla )world. Bean validation API provides an object level constraint declaration and validation facility for the Java application developer
- requeriments
- import hibernate-validator dependency
- Specify in your model the validation rules
- in your controller, identify if exist an error and handle it
- have to use BindingResult (boolean)
- can use the JSR 303
features
- built-in support to RESTFUL
- Multiple view resolvers to support
- xml
- json
- html
Bilder und Dateien der Mindmap
Informationen
- Beschreibung
- Mindmap am spring mvc, erstellt von Jorge Celis am 10/10/2019.
- Erstellt von
- Jorge Celis
- Aufrufe
- 1
- Bewertung












