Introduction to Mybatis - adding, deleting, modifying and querying a single table based on xml configuration

    Introduction to Mybatis - add, delete, modify and query a single table based on configuration Introduction to Mybatis Configuration steps Use steps (all xml configurations have been configured) Basic data Entity class Interface of DAO layer Master profile Sub profile Test class  summary Introduction to Mybatis Official ...

Posted by alexrait1 on Wed, 09 Mar 2022 14:14:25 +0100

Caching mechanism of Mybatis

cache MyBatis has built-in a powerful transactional query caching mechanism, which can be easily configured and customized. By default, only local session caching is enabled, which only caches the data in one session. To enable the global L2 cache, you only need to add a line to the mapping file of SQL: <cache/> L1 cache Also known as ...

Posted by sebajom on Tue, 08 Mar 2022 22:44:48 +0100

In depth understanding of Mybatis configuration file

1, Depth of Mybatis configuration file 1.1,SqlMapConfig.xml Hierarchical relationship of Mybatis's core configuration file Common configuration analysis of Mybatis 1. environments tab Database environment configuration, supporting multi environment configuration There are two types of transaction manager: JDBC: this configuration direct ...

Posted by compt on Tue, 08 Mar 2022 20:53:15 +0100

SSM integration configuration

1. Guide Package Spring related packages Spring MVC related (core related packages will be imported together)<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.2 ...

Posted by mobtex on Tue, 08 Mar 2022 15:52:52 +0100

Encryption of sensitive fields based on Mybatis layer

In the SpringBoot project, how to gracefully implement the encryption and decryption of sensitive fields by user-defined annotation + interceptor We are often faced with manual encryption of some identity information or phone numbers, real names and other sensitive information, which is not only very bloated but also very elegant. There will ...

Posted by clarky08 on Mon, 07 Mar 2022 17:41:38 +0100

MyBatis learning (detailed steps to build the framework)

MyBatis learning What is MyBatis? MyBatis is the MyBatis SQL Mapper Framework for Java (sql) Mapping) MyBatis is an excellent persistence layer framework, which supports custom SQL, stored procedures and advanced mapping. MyBatis eliminates almost all JDBC code and the work of setting parameters and obtaining result sets. MyBatis can config ...

Posted by veveu on Mon, 07 Mar 2022 16:28:22 +0100

Pagination and annotation development

4. Pagination 4.1 paging with Limit List<User> selectByLimit(Map<String,Integer> map); <select id="selectByLimit" parameterType="map" resultType="user"> select * from user limit #{startIndex},#{pageSize} </select> SqlSession sqlSession = MyBatisUtil.getSqlSession(); UserDao mapper = sqlSession.getMapper(UserDao.cla ...

Posted by alanlee79 on Mon, 07 Mar 2022 08:02:29 +0100

In depth Mybatis framework

In depth Mybatis framework After learning Spring, we have learned how to manage a class as a Bean by the IoC container, that is, now we can use the Mybatis framework in a more convenient way. We can directly hand over SqlSessionFactory and Mapper to Spring for management, and we can use them quickly by injection. Therefore, we need to learn how ...

Posted by Pepe on Sat, 05 Mar 2022 14:32:11 +0100

SSM small project ---------- query student information by class

1, Project introduction The main functions of the project are: select a class from the drop-down list, and click the query button to display the table displaying student information at the bottom of the page As shown in the figure: Main technologies used: three SSM frameworks, AJAX, jQuery, BootStrap, etc Project objective: to i ...

Posted by steveangelis on Sat, 05 Mar 2022 11:45:01 +0100

SSM integration (they are copied and will not be configured by themselves after reading them for half a month. Here are the problems encountered in their configuration)

Construction steps Here, the database connection pool, springmvc, mybatis and service are created separately, and then import is integrated into ApplicationContext xml New projectGuide PackageCreate external file dB propertiesConfigure spring Dao xml: a. Associated database file b. Configure database source c. Configure bean sqlSessionFactory ...

Posted by Revlet on Sat, 05 Mar 2022 10:06:06 +0100