This article will show in detail how Spring Data MongoDB accesses the MongoDB database.
•Springis a lightweightJ2EEbased onJAVAThe application framework
–is based onJava: the bottom layer is implemented by theJavalanguage
–Lightweight: lower resource consumption and faster running speed
–J2EEFramework: serving the entireJ2EEDevelopment process
–webThe hierarchical design structure of the program
–Presentation layer/View layer/Weblayer (Servlet/JSP,Struts2,...)
–Logic layer/Business layer
–Data layer/Persistence layer (JDBC,Hibernate3、…)
–(Understand)Service layer, domain model layer
•Springis very powerful and can serveJ2EEEvery level in the development process
1. What is a transaction
Success will only occur if all tasks are successful. As long as one fails, it will not succeed
2. Characteristics of transactions
3 Reading problems will occur if isolation is not considered
4 Solve the reading problem
(1) Set the isolation level
Spring transaction management api
1 .Two ways of spring transaction management
The first one: programmatic transaction management (implementation by writing code)
The second one: declarative transaction management
(1) Implementation based on xml configuration files
#Spring Data MongoDB in actionThe above is the detailed content of How to understand Spring's transaction management. For more information, please follow other related articles on the PHP Chinese website!