Spring Basics

To learn Spring, its better to have a development environment, the best choice is the Spring Source Tool Suite

Install Eclipse 3.8.2 and STS 3.2.0 on Windows

Spring dependency injection with Gradle example

built on top of the concept of Dependency Injection, for example, the IoC implementation in Spring ... injection is the foundation of Spring. Many other components of Spring are actually ... classes. Let's create an example which demonstrate annotation based DI configuration with Spring ... . The Package Explorer should look like this [Step 3. Add Spring 3 dependency] Open SpringDemo

What is HandlerAdapter in Spring MVC

The HandlerAdapter implements adapter pattern, it allows ... details of the implementation. HandlerAdapter makes DispatherServlet and the request handlers ... decoupled. DispatherServlet call the request handlers through HandlerAdapter interface, so ... it can interact with any request handlers as long as they provided their HandlerAdapter implementations

Spring web flow configuration

Spring uses namespace to config web flow. The prefix for web flow configuration is "webflow" like this:

FlowExecutor is the entry point of the flow execution. The attribute flow-registry of flow executor should be the bean id of a flow registry bean. The default value is "flowRegistry". If your flow registry bean id is the name, you can omit this attribute.

FlowExecutor is the entry point of the flow execution. The attribute flow-registry of flow executor should be the bean id of a flow registry bean. The default value is "flowRegistry". If your flow registry bean id is the name, you can omit this attribute..

What is Post Redirect Get(PRG) in Spring Web Flow

The PRG used in Spring Web Flow is to solves the accidental resubmit problem .

In this pattern, the request is processed in two stages. At the first stage, the request is processed by the processing logic, but not response view immediately, instead, it send a redirect command to browser.

The five states in web flow

Spring Web Flow defines five states:view, action, decision, subflow, and end state .

The states are the steps of a flow. A state defines behavior that be executed when the state is entered. For example, render a view or execute an action.

Scopes in Spring web flow

Scope determines how long an object will live, servlet defines four servlet scopes. The Spring Web Flow introduced some extra scopes to facilitate the flow functionality.

A scope is just a place you can store your named objects.The servlet scopes are not designed for web flow, Spring has to define new scopes.

What is Spring LocaleResolver

LocaleResolver is a strategy interface defined in org.springframework.web.servlet.LocaleResolver.

LocaleResolver defined the interface of Locale resolution and modification.

Spring 3 annotation based configuration

This is an example context configuration for DispatchServlet:

@EnableWebMvc: annotation used together with @Configuration enables default Spring MVC configuration, equivalent to mvc:annotation-driven .

Previous Page 1 2 3