Introduction to Spring Framework

Source: Internet
Author: User

Introduction to Spring Framework
Spring Framework has been learning java programming for three years without knowing it. At the beginning, I always like watching videos and hitting the keyboard step by step. Every time the system runs normally, I feel happy. At the beginning, all the code was designed by itself and basically no third-party java classes were used. However, with the deepening of learning, we gradually began to contact various third-party java class libraries, such as apache common, dom4j, and log4j. Similarly, to reduce the complexity of system development, most systems will also be built using industry-classic frameworks, such as struts + spring + orm (ssh ), spring mvc + spring + orm (s2sh ). In java, the Spring Framework (hereinafter referred to as spring) Framework is widely used. Especially in java ee development systems, common ssh and s2sh are inseparable from spring. This article is about spring framework and will be divided into modules one by one in the future. If you are interested, you can follow the latest developments in the blog. This blog post describes some important content recorded during the learning process. Ignore the details. Of course, in order to better understand some abstract concepts, we recommend that you have a certain degree of java development skills, such as basic java syntax, design patterns, UML, databases, and other basic knowledge. Of course, this article mainly comes from the official spring documentation. It is recommended that you refer to the Spring Framework introduction Spring Frame to provide a comprehensive and configurable Programming Model for modern enterprise applications, developers can quickly select required modules as needed. Using spring to manage applications can free developers from the basic framework and focus on business logic development, greatly improving development efficiency.
Module spring consists of multiple modules. The core module is the core module, and other modules depend on the core module. During development, developers can select modules as needed. From the spring module composition diagram, we can see that spring mainly consists of the following modules to form the Core iner as the Core layer (see later decomposition) Aop: For Aspect-oriented programming (see later decomposition) Data Access: database access layer (see post-decomposition) Web: spring mvc layer (see post-decomposition) Test: spring testing framework (see post-decomposition) use cases for the entire spring Application Scenario
As shown in the figure, all modules of spring clearly show the application scenarios. As a spring user, we only need to use spring to hand over a large number of basic frameworks to spring for management. Developers only need to focus on business logic, greatly reducing the development complexity. For example, you can use declarative transactions to configure transactions, so that all template Code related to transactions is thrown to spring management; use IOC to manage dependency injection; and use spring mvc as the mvc framework. However, as a general framework, the entire spring cannot be bound. This is why spring is so powerful that it can flexibly accommodate other third-party frameworks. Framework for integrating struts into spring

To sum up and learn about spring, you cannot copy others' configuration files directly. Otherwise, the configuration files will be turned upside down and confused. By reading the official documentation, you can have a clear grasp of the entire spring framework and be more comfortable with development. Familiar with the saying that it is also a matter of course to learn from snake farming. You must grasp the design principles and application scenarios of a technology. With the overall context, you can get twice the result with half the effort.

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.