Java EE Project Combat (OA System) Five _ three frame integration of the two
Three, add three main frame
In this training project, use the Spring+hibernate+struts framework and use annotations to replace the XML configuration file.
1. Add Database connection
In the DB browser window, first add a connection to the Oracle database:
Database type Select Oracle, in the connection string, "@" is followed by the host name: Port number: SID, while indicating the location of the driver class.
In the next step, select "Show only one user's schema":
2. Add Spring Framework
Step1: Select Frame version:
Step2: Detailed configuration, using the default configuration:
Step3: Copy jar package:
3. Add Hibernate frame
Step1: Select Frame version:
Step2: Detailed configuration:
In configuration page one, cancel "Create Sessionfactory class" Because the session factory is managed by the spring framework and does not require a build class:
In configuration page two, you need to select "DB Driver", here is "1." Oracle already configured in Add database connection:
Step3: Copy jar package:
4. Add Struts Framework
Step1: Select Frame version:
Step2: Detailed configuration:
To configure the suffix name of the action URL:
Step3: Copy jar package:
5. Remove the conflicting packages
In Hibernate and struts, a package called ANTLR is used, but different versions are used in two frames, and there are often packet conflicts. Remove older ANTLR Packages:
(This interface is right click on the item, select Build Path->configure build Path ..., and select Libraries tab, select the Struts frame, and click Edit appears)
At first, you can't edit it, you need to check the bottom option to edit it. This option means that the project is allowed to specify advanced configuration.
At this point, the configuration of the three major frameworks will be over.