How Do I Choose the Best Open Source Application Server?
The Spring framework is an open source J2EE application framework initiated by Rod Johnson. It is a lightweight container that manages the life cycle of beans. Spring solves many common problems encountered by developers in J2EE development, and provides powerful IOC, AOP, and Web MVC functions. Spring can be used alone to build application programs, can also be combined with many web frameworks such as Struts, Webwork, Tapestry, and can be combined with desktop applications such as Swing AP. Therefore, Spring can be used not only in JEE applications, but also in desktop applications and applets. The Spring framework consists of seven parts, namely Spring Core, Spring AOP, Spring ORM, Spring DAO, Spring Context, Spring Web, and Spring Web MVC. [1]
- Create a new landing page: loginActionSupport.jsp, the code is as follows
- Spring was started in 2003. It is a layered JavaSE / EE full-stack (one stack) lightweight open source framework, created by Rod Johnson [2]
- Lightweight -Spring is lightweight in terms of size and overhead. The complete Spring framework can be published in a JAR file that is only over 1MB in size. And the processing overhead required by Spring is trivial. In addition, Spring is non-intrusive: Typically, objects in a Spring application do not depend on specific classes of Spring.
- Powerful based
- 1. Convenient decoupling and simplified development
- With the IoC container provided by Spring, we can leave the dependencies between objects under the control of Spring to avoid excessive program coupling caused by hard coding. With Spring, users no longer need to write code for low-level requirements such as single-instance pattern classes and property file parsing, and can focus more on upper-level applications.
- 2.AOP
- Spring can effectively organize your middle-tier objects, whether or not you choose to use EJB. If you only use Struts or other frameworks that include J2EE-specific APIs, you will find that Spring is paying attention to the remaining issues. Spring can eliminate the excessive use of Singleton in many projects. In my experience, this is a major problem, it reduces the system's
- Spring provides many features, and I will quickly show each of them in turn.
- The Spring framework is a layered architecture consisting of 7 well-defined modules. Spring
- Download and install Spring, please follow the steps below.
- (1) Login to the site and download the latest stable version of Spring. The latest version is spring-framework-5.0. It is recommended to download spring-framework-spring-framework-4.0.0.M2-dist. This compressed package contains not only the Spring development package, but also third-party libraries that Spring compiles and runs on.
<% @ page contentType = "text / html; charset = GBK" isELIgnored = "false"%> <html> <head> <title>; implement user login instance, struts and Spring integration </ title> </ head> < body> <font size = '22 '> $ <br> </ font> <form name = "form1" action = "/ myLogin / loginActionSupportdo" method = "post"> User name: <input type = "text" name = "username" value = "$ {user.username}" /> <br> Password: <input type = "password" name = "password" value = "$ {user.password}" /> <br> <input type = "submit" name = method value = "Submit" /> </ form> </ body> </ html>
- 2. Create a class that stores login user information: User.java This class inherits from ActionF
- Spring Framework
- Spring Web Flow
- Spring Web Services
- Spring Security (Acegi Security)
- Spring Dynamic Modules For OSGi (tm) Service Platforms
- Spring Batch
- Spring Integration
- Spring LDAP
- Spring does enable you to solve your problem with the simplest and feasible solution, which has great practical value. While his
- The core of Spring design is the org.springframework.beans package, which is designed to be used with JavaBean components. This package is usually not used directly by the user, but is used by the server as the underlying intermediary for most other functions. The next highest level of abstraction is the BeanFactory interface, which is an implementation of the factory design pattern that allows objects to be created and retrieved by name. BeanFactory can also manage relationships between objects. Bean Factory supports two object models:
- 1. The singlet model provides a shared instance of an object with a specific name, which can be retrieved at query time. Singleton is the default and most commonly used object model. Ideal for stateless service objects.
- 2. The prototype model ensures that a separate object is created for each retrieval. Prototype models are best suited when each user needs their own objects. The bean factory concept is the foundation of Spring as an IOC container. The IOC shifts responsibility for handling things from the application code to the framework.