首页 > 代码库 > query mysql database using mybatis in java

query mysql database using mybatis in java

create database and table in mysql, and create mybatis java web using mybatis generator:

the layout for mybatis java web program:

技术分享

generatorconfig.xml:

技术分享

UserMapper.java:

技术分享

UserMapper.xml:

技术分享

 

User.java:

技术分享

 

 

 

UserExample.java:

技术分享

mybatis-config.xml

技术分享

the User_User.java for querying mysql database:

技术分享

 

query mysql database using mybatis in java