Just after reading the code that my classmates gave me, I couldn't help bursting. Go to TMD, write like a piece of excrement, disgusting, mess, this let me how to finish?? A line of code comments are not, but also very self-righteous arrogance. "Doesn't that make sense?" This is mybatis ah, there are many ways to achieve ... "
It's better to ask for your own. Determine the content of the system summary configuration.
1, first of all to find out what applicatiioncontext.xml this rubbish is what ghosts use, after consulting, fuck TMD, the beast is the spring configuration file, is to implement the injected bean (control inversion), commonly known as the object will be created, Implement new's nausea work to the spring container. Fuck, there's a lot of configuration stuff, and it makes me sick.
2. Know how to use it. With half a day yet to know how to use it, fuck all copy. Here's the point, remember:
When using the Applicationcontext.xml file, you need to add listener in Web. XML:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
The rest of the things, to Baidu, I sprayed out. Thanks for watching.
Summary of spring and MyBatis integration