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.