How mybatis works
This article introduces the relevant knowledge of "how mybatis works". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Mybatis process:
Configuration: first write the conf.xml file, the main function is to connect to the database, register the configuration xml file of mybatis (use tags)
1. Load mybatis's configuration file conf.cml (also loads the associated mapping file)
two。 Build sqlsessionfactory first
Then open sqlsessionfactory.open () and create a sqlsession
Mapping the identity string String statemenet of SQL
Execute the query to return the SQL,session.select (statemenet, parameter) of a unique user object
In java, the connection between null and string becomes null+ string, for example, null+ "= =" becomes null===.
When mybatis processes this null, when configuring the xml file, the SQL statement that writes the tag is tagged.
This is the end of the introduction to how mybatis works. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!