In this first installment of a three-part series that introduces the spring framework, you will begin to learn how to build lightweight, robust Java EE applications with spring technology. DeveloperWorks's regular contributor, Naveen Balani, began his three-part spring series by introducing the spring framework, which
Spring: Use Spring AOP to separate log input and method. spring AOP
Log output is a common function. The traditional method is to write the output statement inside the method body. When calling this method, use the input statement output information to record the execution of the method!
1. First write a common class:
Package com. importnew; public class Common {
Preparatory workFirst, build a simple Web project that will be used to add security controls later, and if you are building a web app using spring boot, you can read the Spring Boot Development web App article first.Web tier Implementation Request mapping@Controller Public class Hellocontroller { @RequestMapping ("/") public String Index () { return "Index"; } @RequestMapping ("/hell
Spring el--spring Expression language:
Supports the use of expressions in XML and annotations, similar to the El Expression language of JSPs.
Spring development often involves invoking a variety of resources, including common files, URLs, configuration files, system environment variables, and so on, and we might use spring's expression language to implement reso
After packaging for the spring release package, you might be surprised to find that the spring development team did not use a single jar file to contain all the code, but instead chose to build a single jar with a full release and 8 separate jar files to contain the corresponding spring components. The number of future versions of the component jar files is likel
Http://www.iteye.com/blogs/subjects/spring3http://jinnianshilongnian.iteye.com/blog/1482071Learn Spring with me (Open Tao blog)Spring is an open source framework that is created to address the complexities of enterprise application development. One of the main advantages of the framework is its layered architecture, which allows you to choose which components to use while providing an integrated framework f
[Spring practice series] (6) configure the Bean of the Spring IOC container1. IntroductionSpring provides a powerful IOC container to manage the beans that make up applications. To use the container service, you must configure the Bean running in the Spring IOC container.2. SolutionYou can use XML files, attribute files, annotations, and even APIs to set beans in
In the previous article, I introduced in detail how to build a maven environment and generate a maven skeleton web project. In this chapter, I will describe the process structure of Spring MVC, differences Between Spring MVC and Struts2, and analysis of some configuration files in the example.I. Introduction to Spring MVC 3.0Spring MVC is a typical MVC Framework
I. Using spring in JAVASE applications1. Download spring (download 1)Download: Spring-frameword-3.05.release-with-docs.zip (Spring framework and documentation) + Spring-frameword-3.0.5.release-dependencies.zip ( The spring framewo
Next we will create a web project. For simplicity, We will directly use the template in Virgo to create a new project. The control layer uses spring MVC 3.Create a WEB Project
Open STS and create a project. Select sprinng template project.
Figure: Create a spring template project
Select spring MVC Project
Figure: Template Selection
Enter the project name
[Spring] uses Spring's AbstractRoutingDataSource to implement multi-data source switching. spring dynamically switches data sources.
Recently, because the project needs to synchronize data between two projects, specifically, Project 1 data is synchronized to project 2 through the message queue, because this update operation also involves updating data in multiple databases, you need to switch between multip
1. Click Create New Project2. Select Spring initializer and jdk1.8 Note: Project names are lowercase letters3, now only need a create a Web, choose a good4, no use of the file, you can delete5. pom.xml file automatically introduces web and Java related packages and packaged plugins Both the main program and the test program are automatically generated.Spring Boot series (ii) Spring initializer quickly crea
If you use JUnit's liberary, you can complete the test of the program.
In spring development, Spring provides the relevant test modules, which makes it easy to load the configuration files and test them.
How to use:
The first step:
Introduction of the test package, found in the download of the Spring package Lib:
Add jar to project and build path
Step Two: Wr
This section covers the following:
Chapter, Remoting and web services using spring-using spring for remote and Web service
Chapter, Enterprise JavaBeans (EJB) Integration -EJB integration
Chapter, JMS (Java Message Service)--JMS (Java messaging Services)
Chapter, JMX
Chapter, JCA CCI
Chapter, Email
Chapter, task execution and scheduling --mission execution and scheduled tas
5.1 Spring MVC starts5.1.1 Tracking requests from spring MVCEvery time a user clicks a link or submits a form in a Web browser, the request begins to work. The job description of the request is like a courier delivery agent. Like a post office couriers or FedEx delivery officer, the request takes information from one place to another.① when the request leaves the browser, with information about what the use
Control inversion/Dependency InjectionRecently, I bought this Spring starter book: Spring in Action. The view from the hotel was good. It's a bit of a starter. Manning's book is still good, although I do not like those who only see Manning book the same focus on Manning, but with reverence for the mood and passion browse through again. Once again, the core concepts of IOC, DI, and AOP are accepted. Let's ta
As Java's cock wire, basically keep up with the pace of spring cock Silk, also keep up with the mainstream technology.Spring Top projects:Spring IO platform: For system deployment, is an integrated version platform for building modern applications, specifically when you use Maven dependency to introduce spring jar packages.Spring Boot: Designed to streamline the creation of product-level
The main contents of this chapter:With previous learning, we learned and quickly completed the first spring boot application. Spring Boot Enterprise Framework, then how does spring boot read static resources? such as JS folder, CSS files and png/jpg pictures? How do I customize a message converter? How do I customize the configuration of
Spring Overview:
Spring is an open source framework that has been developed to address the complexities of enterprise application development.
From a simple, test-and loosely-coupled perspective, no Java application can benefit from spring.
In short, spring is a lightweight control inversion (IOC) and
Transfer from official website document http://docs.spring.io/spring/docs/3.2.17.RELEASE/spring-framework-reference/htmlsingle/
Spring 30-new Features Spring 31-new Features spring 32-new Features spring 40-new Features
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.