Java EE Project Combat (OA System) Five _ three frame integration of the two __java

Source: Internet
Author: User

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.


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.