Original common SP + st + Hi Framework Analysis

Source: Internet
Author: User

I did not know what I understood when I wrote for the first time. Did I write it down first? I hope you can learn from each other.

SSH (SP + st + hi) this is currently the most popular Web framework system. Many fans are studying it. However, there are not many online materials. Some examples cannot be used. What we need is an SSH example that can be used in one process. with the help of a QQ friend, I ran a complete example of SSH. After a week of research, I personally thought that it would be relatively simple to use the development mode of that project, but there are many details. I still have problems with the above, but I want to work out the project and then gradually understand what I think is the final principle.

Here we will talk about the general framework of SSH:

In general, I think this is true: SSH binds transactions in the service and calls Dao in the service to complete specific business logic.

Is the sum of SS Sh. In the struts action package, we need to make a baseaction, which inherits the action.

And rewrite the setservlet method. This is the most critical part. The service class registered with SP will automatically load the Web boot.

SH is clearly written in the configuration file and easy to understand.

I made a very general SSH framework myself. I only need eclipse to add the list in the configuration file *. HBM. XML is changed to your own mapping database connection in proxool. configure in XML to write the SSH project.

The content in the applicationContext-hibernate.xml needs to be thoroughly understood

For a rough analysis, we first handed in the hi sessionfactory SP for management, then handed over the HI transaction to the SP for management, then bundled the service class with the SP, and then bundled the DAO class with the service class.

This is the first time my younger brother wrote this type of article. I hope you can forgive me.

If you need this SSH universal framework, contact me QQ: 10360048.

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.