[Spring] Pure java for Spring-hibernate integration

First import the corresponding jar package for Spring-hibernate Then prepare the file for the database connectionHibernate.propertiesAlsoJdbc.properties Hibernate.propertiesFile: Configure the hibernate dialect and automatic table building hibernate.dialect=org.hibernate.dialect.H2Dialect hibernate.hbm2ddl.auto=create Jdbc.propertiesFi ...

Added by Master_Phantom on Wed, 08 Jul 2020 17:41:09 +0300

The use of reverse engineering in Mybatis Generator

​​ 1, About MyBatis Generator MyBatis Generator (MBG) is the code generator of MyBatis and iBATIS. It will generate code for all versions of MyBatis and versions of iBATIS after 2.2.0. It reviews database tables (or many tables) and generates artifacts that can be used to access tables. This reduces the initial hassle of setting up objects an ...

Added by Doyley on Fri, 19 Jun 2020 06:20:27 +0300

Spring boot + durid + mybatis + docker for mysql read-write separation-2

Spring boot + durid + mybatis + docker for mysql read-write separation-2 preface Project structure Code interpretation Data source configuration DataSourceType DBContextHolder RouteDataSource DataSourceConfig SqlSessionFactoryConfig ReadOnly ReadOnlyAop mapper related classes Business test New use ...

Added by prakash on Wed, 17 Jun 2020 08:59:58 +0300

jdbc advanced custom connection pool and custom jdbc framework

JDBC advanced Use of JDBC connection pool The concept of database connection pool Database connection is a key and limited resource. When java program and database get the connection, it consumes resources especially. Therefore, a database connection pool is created to manage the connection betwe ...

Added by shane0714 on Mon, 15 Jun 2020 11:47:18 +0300

Getting started with SkyWalking

Article catalog Getting started with SkyWalking background Install Elasticsearch and start Install SkyWalking and start Agent for configuring spring cloud microservices View the link call of spring cloud Single microservice call monitoring Call link monitoring between microservices All microservice ...

Added by gaz_hayes on Sun, 14 Jun 2020 10:17:06 +0300

Notes on the use of Spring IOC, AOP

Configuration of xml Create xml file in src directory, named custom Add code to xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:context="http://www.springframework.org/schema/context"  xmlns:aop="http:/ ...

Added by jonorr1 on Fri, 12 Jun 2020 04:59:06 +0300

SpringBoot 2.3 integrates the latest ShardingJdbc + Druid + MyBatis

Today, the project is not busy. I want to have a look at the sharding JDBC sub database and sub table. I want to achieve the following: Discard the xml configuration and use. yml or. properties file + java to configure spring. Use Druid as database connection pool, open monitoring interface at the same time, and support monitoring multiple dat ...

Added by htcilt on Thu, 11 Jun 2020 06:47:20 +0300

Optimistic Lock (CAS) retry data version not updated under mysql transaction default isolation level

Exception Information Ccom.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction Reasons for the problem When optimistic locks modify data, the data version number has been modified, causing the modification to fail. When retrying the modification, each time the data read from the d ...

Added by xsist10 on Fri, 22 May 2020 21:51:58 +0300

Basic usage of JDBC

JDBC fixing steps: Load driver String url="jdbc:mysql://localhost:3306/jdbcstudy?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT"; String username="root"; String password="123456"; Class.forName("com.mysql.cj.jdbc.Driver");//I don't know why com.mysql.jdbc.Driver will report an error. Please leave a message if you have any ...

Added by PHPfolife on Wed, 20 May 2020 17:31:54 +0300

Use of Spring JDBC

Spring's JDBC module is responsible for database resource management and error handling, which greatly simplifies the operation of the database by the developers, so that the developers can get rid of the tedious database operation, so as to put more energy into writing business logic. For the Spring framework of database operation, the JdbcTem ...

Added by twilitegxa on Tue, 05 May 2020 09:44:21 +0300