Tag:mybatis

  • Mybatis plus query specified field select

    Time:2022-4-30

    Mybatis plus query specified field select Table structure CREATE TABLE `user` ( `ID ` bigint (20) not null comment ‘primary key’, `Name ` varchar (30) default null comment ‘, `Age ` int (11) default null comment ‘age’, `Email ` varchar (50) default null comment ‘, `manager_ ID ` bigint (20) default null comment ‘immediate superior […]

  • MySQL high-end Bureau, if you don’t understand these thoroughly, what about optimization?

    Time:2022-4-29

    MySQL, a familiar and unfamiliar term, we used MySQL database as early as learning JavaWeb. At that stage, MySQL seemed to us to be just a good thing for storing data. When storing, it was blocked inward, and when querying, it was also a blind full table query (without a little optimization). ​ We always […]

  • MySQL high-end Bureau, if you don’t understand these thoroughly, what about optimization?

    Time:2022-4-29

    MySQL, a familiar and unfamiliar term, we used MySQL database as early as learning JavaWeb. At that stage, MySQL seemed to us to be just a good thing for storing data. When storing, it was blocked inward, and when querying, it was also a blind full table query (without a little optimization). ​ We always […]

  • Usage and paging of mybatis plus lambdaquery

    Time:2022-4-28

    example lambdaQuery public List<DTO> selectList(DTO inDTO) { List<Entity> list = dao.selectList(Wrappers.<Entity>lambdaQuery() .eq(StringUtil.isNotEmpty(inDTO.getAa()), Entity::getAa, inDTO.getAa()) .eq(StringUtil.isNotEmpty(inDTO.getBb()), Entity::getBb, inDTO.getBb())); return converter.toListDTO(list); } paging Start storing pages first (parameter 1: current page, parameter 2: how many pages are displayed in a page) ⭐ This must be placed on the retrieval method that needs paging, otherwise the paging data […]

  • Differences and introduction between optimistic lock and pessimistic lock

    Time:2022-4-27

    ❤ Author home page:Li Yihe beat Xiao Tai’s blog❀ personal introduction: Hello, I’m Li Yihe! ( ̄▽ ̄)~*Remember to like, collect and comment ⭐ ️ ⭐ ️ ⭐ ️Study carefully!!! Article catalogue Introduction of lock Pessimistic lock Optimistic lock Differences and Implementation Summary:   Introduction of lock   what is a lock? The lock in the program […]

  • [mybatis] several methods of batch update of mybatis

    Time:2022-4-26

    1. The Java code circularly executes SQL and updates one by one This method is to call the update method to update the data that needs to be updated. The implementation code is as follows: public void test() { //Collection to update List<HashMap<String, Object>> updateMap = new ArrayList<>(); HashMap<String, Object> param = new HashMap<>(3); param.put(“name”, […]

  • [e-commerce spike project] project summary: redis realizes distributed session, user authentication, oversold, system pressure test, rabbitmq asynchronous ordering, and interface current limiting

    Time:2022-4-25

    Foreword: learn from muke.com course – “java second kill system scheme optimization, high performance and high concurrency practice”. After reading it, I developed it once and benefited a lot. I intend to write it out and share it with you. This article is the summary and notes of my project. Technology stack: spring boot, thymeleaf, […]

  • Mybatis – label

    Time:2022-4-24

    We are writing mapper When using XML, where is required, where 1 = 1 is often used to avoid all clauses being unsatisfied.But in fact, mybatis has provided convenient < where > tags, which are automatically processed for us.When all the clauses of where are not satisfied, the where will be automatically removed when creating […]

  • Mybatis uses Oracle to add data

    Time:2022-4-24

    The blogger is mainly engaged in the development of Oracle CE database. He has not used Oracle for a long time and has forgotten many knowledge points. This time, he mainly reviews some SQL statements used in his work; query All query statements are normal, but it should be noted that when Oracle database queries, […]

  • Shiro study notes_ 03: actual combat of integrating springboot project

    Time:2022-4-20

    Shiro study notes This article is based on the video tutorial of the up main [bad programming person] of station B [the latest version of Shiro tutorial in 2020, integrating the actual combat tutorial of springboot project], which is only used for personal learning and communication. Video link: https://www.bilibili.com/video/BV1uz4y197Zm Official documents: http://www.baizhiedu.xin Catalog title Shiro […]

  • [mybatis] – basic exercise (3)

    Time:2022-4-13

    I summary: Mybatis: Realize the information query of users and their addresses. (1) The relationship between user and address is one to many, which requires one to many entity Association configuration (2) XML and annotation are used respectively  Description: the database is springdb, and the data table is t_ User and t_ Address     […]

  • Use of the latest code generator (3.5.1 +) of mybatis plus

    Time:2022-4-12

    1. Introduce dependency: <!–mybatisPlus–> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.4.3.4</version> </dependency> <!– Mybatis plus code generator — > <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-generator</artifactId> <version>3.5.1</version> </dependency> <!– Velocity template — > <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-core</artifactId> <version>2.3</version> </dependency> <!– Freemaker template — > <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> </dependency> <!–mysql–> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> Explain why two template dependencies are cited: Because the […]