Mybatis learning - create a mybatis project and connect to mysql

MyBatis avoids almost all JDBC code and manual setting of parameters and getting result sets. But the cost is to need tedious configuration, but these configurations are almost the same, but they are very complex. With the help of plug-ins, you can write configuration files more easily, or record the co ...

Added by slough on Mon, 24 Feb 2020 13:57:58 +0200

C3P0 of JDBC learning notes

step Import jar package Import c3p0-0.9.5.2.jar and mchange-commons-java-0.2.12.jar Define profileName: c3p0.properties or c3p0-config.xmlPath: put the file directly in the src directory <c3p0-config> <!-- Read connection pool objects using the default configuration --> <default- ...

Added by j007w on Wed, 19 Feb 2020 10:45:48 +0200

Common Java database operations

1. JDBC Driver JDBC-driven loading: 1. Loading through containers: For Java applications with containers, the corresponding driver jar packages can be placed directly in the lib directory of the container, such as web applications using Tomcat as a container, and the driver can be copied to the lib subdirectory of tomcat. 2. Application Runtim ...

Added by Exoon on Mon, 17 Feb 2020 01:22:41 +0200

Add, delete and modify the database by Statement

1, Statement interface introduction Function: object used to execute a static SQL statement and return the result it generates int executeUpdate(String sql) executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement, or an SQL statement that does not return anything, such as a SQLDDL statement. vo ...

Added by Bryan Ando on Sun, 09 Feb 2020 18:54:00 +0200

MyBatis configuring dynamic SQL statements

MyBatis configuring dynamic SQL statements In the SQL mapping file of MyBatis, sometimes you need to select different SQL statements according to some query conditions. If you rewrite SQL in every scenario, it's obvious that the efficiency is not very high, and the dynamic SQL of MyBatis solves this problem well. The dynamic SQL of MyBatis pro ...

Added by mpf on Thu, 06 Feb 2020 12:37:02 +0200

spring+springmvc+mybatis (ssm) integration

layout: post author: zjhChester header-img: img/post-bg-os-metro.jpg catalog: true tags: - ssm integration spring+springmvc+mybatis (ssm) integration 1. Preliminary preparation 1. Build maven project, check skeleton construction, check web app [external link image transfer failed. The sour ...

Added by devinemke on Sat, 01 Feb 2020 10:44:45 +0200

Reading the source code of mybatis: initialization of mybatis

Reprinted from Reading the source code of mybatis (2): initialization of mybatis 1. Initialization entry //Mybatis obtains SqlSession through SqlSessionFactory, and then can interact with the database through SqlSession private static SqlSessionFactory getSessionFactory() { SqlSessionFactory se ...

Added by Pioden on Mon, 27 Jan 2020 07:10:47 +0200

Installing and simple using mycat 1 under windows

1.orcale downloads sdk and installs 2. Download mycat https://github.com/MyCATApache/Mycat-download 3.server.xml <?xml version="1.0" encoding="UTF-8"?> <!-- - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the Lic ...

Added by bitman on Mon, 20 Jan 2020 08:48:27 +0200

Using ORM tools in simple JDBC programs

This article comes from the "excellent course" -- to elaborate on the architecture. ORM (object relational mapping) is an excellent tool for database programming. With a little experience and the power of Java annotations, we can build complex database systems and take advantage of productivity relatively easily. Relational databases ...

Added by bufke on Thu, 16 Jan 2020 11:22:28 +0200

Detailed explanation of Java JDBC connection to mysql database

1.JDBC introduction jdbc(java database connectivity) provides a unified programming interface for java developers to use the database. It consists of a set of java classes and interfaces. The classes and interfaces needed for JDBC are: DriverManager,Connection,Statement,ResultSet            2. Download MySQL connector Java The mysql version of ...

Added by nickthegreek on Tue, 14 Jan 2020 12:14:22 +0200