SSH integration Summary (xml and annotation), ssh integration xml Annotation
I have encountered many problems during SSH integration. I would like to make a summary for your reference only.1. Configure with XML:Ii. Configure with annotation + XML:
Other questions:
- Problem: During Multi-to-one ing, the proxy object of one party is obtained when multiple objects are obtained. An exception occurs when the view layer is called: org. hibernate. lazyInitializationException: cocould not initialize proxy-no Session, that is, the proxy object cannot be initialized.
- Cause: a transaction is added at the service layer, and the session is closed when the transaction is committed.
- Solution (three methods ):
The above is the basic process of SSH configuration. Due to the length of the Code, only a part of the code is provided, which should not affect normal viewing.