In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Spring is an open source framework for enterprise application development with the following functions
◆ purpose: to solve the complexity of enterprise application development
◆ function: use basic JavaBean instead of EJB, and provide more enterprise application functions
◆ scope: any Java application
To put it simply, Spring is a lightweight inversion of control (IoC) and AOP-oriented container framework.
◆ lightweight-Spring is lightweight in terms of size and cost. The complete Spring framework can be released in a JAR file with only more than 1MB in size. And the processing overhead required by Spring is negligible. In addition, Spring is non-intrusive: typically, objects in Spring applications do not depend on specific classes of Spring.
◆ control inversion-Spring promotes loose coupling through a technique called control inversion (IoC). When IoC is applied, other objects that an object depends on are passed in passively, rather than the object itself creating or looking for dependent objects. You can think of IoC as the opposite of JNDI-it's not that the object looks for dependencies from the container, but that the container actively passes the dependency to the object at initialization without waiting for the object request.
◆ is aspect-oriented-Spring provides rich support for aspect-oriented programming, allowing cohesive development by separating the application's business logic from system-level services such as auditing and transaction management. Application objects only do what they are supposed to do-- complete the business logic-- that's all. They are not responsible for (or even aware of) other system-level concerns, such as logging or transaction support.
◆ container-Spring contains and manages the configuration and lifecycle of application objects, in this sense it is a container, you can configure how each of your bean is created-based on a configurable prototype (prototype), your bean can create a separate instance or generate a new instance every time needed-and how they relate to each other. However, Spring should not be confused with traditional heavyweight EJB containers, which are often large and bulky and difficult to use.
◆ framework-Spring can configure simple components and combine them into complex applications. In Spring, application objects are grouped declaratively, typically in a XML file. Spring also provides many basic functions (transaction management, persistence framework integration, etc.), leaving you with the development of application logic.
All of these features of Spring enable you to write code that is cleaner, more manageable, and easier to test. They also provide basic support for various modules in Spring.
The two cores of Spring, AOP and IOC, can be used separately for any application, including the integration with MVC frameworks such as Struts and ORM frameworks such as Hibernate. At present, the so-called lightweight development of many companies is to use Spring + Struts (2) + Hibernate.
Spring MVC is a MVC framework, I think Spring MVC annotation-style development is more convenient than Struts2, can directly replace the above Struts (of course, Struts as a very mature MVC, functional feeling is still a little bit stronger than Spring, but Spring MVC is enough). Of course, the execution efficiency of spring mvc is higher than that of struts, because the value stack of struts affects efficiency.
Spring mvc is similar to a MVC open frame of struts, in fact, it all belongs to spring,spring mvc and needs a package with spring as a support to run.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.