JDBC utils tool class - manageable transactions

/** This blog is created by Leprosy equisetifolia It is not easy to create. Please indicate the source of Reprint: http://blog.csdn.net/ma_shou_feng */ 1. Tool design details 1.1 about abnormality: The tool class is designed to provide convenience for development. If there is an exception within the tool class, it is better to throw the ...

Posted on Sun, 31 May 2020 10:36:11 -0700 by benpaxton777

Spring07_ Pure annotation and spring integration Junit

For the source code of this tutorial, please visit: tutorial_demo In spring04_ In IOC and DI, we use XML configuration and Apache Commons DbUtils to implement single table CRUD operation. In this tutorial, we use pure annotation and Apache Commons DbUtils to implement single table CRUD operation. 1, Requirements and technical requirements 1.1 ...

Posted on Wed, 27 May 2020 22:53:16 -0700 by hatching

SQL statement blocking P6SPY

Software introduction P6Spy is an open source framework that can be used to intercept and modify data operation statements in applications. Through P6Spy, we can intercept SQL statements, which is equivalent to a recorder of SQL statements, so we can use it for relevant analysis, such as performance analysis. P6SPY provides the following functi ...

Posted on Wed, 27 May 2020 07:33:48 -0700 by FeralReason

After MySQL uses the column alias, Hibernate still reads the original column name instead of the alias

phenomenon hibernate cannot find the required field from the returned result set, such as user ﹣ name, when executing the program Error message: 2020-05-15 10:37:01.330 [INFO][org.hibernate.type.StringType][nullSafeGet][180]-> could not read column value from result set: from_classifier_id; Column 'from_classifier_id' not found. 2020-05 ...

Posted on Fri, 15 May 2020 09:05:36 -0700 by usacascl

SPI implementation of Java extension mechanism

1, What is SPI SPI (Service Provider Interface) is a mechanism that separates service interface and service implementation to achieve decoupling and greatly improves program scalability. The introduction of service provider is the implementer of SPI interface. Through local registration discovery, specific implementation classes can be obtaine ...

Posted on Wed, 06 May 2020 07:15:32 -0700 by dessolator

ADO.NET mass update data

ADO.NET mass data update Important reference http://bbs.csdn.net/topics/370090507 public static void SqlBulkUpdate() { DataTable dt = ExcelHelper.ImportExcelFile("d://User1.xls "; / / import the data in Excel into 10000 data tables (as the data source for updating data) DateTime begin = DateTime.Now; string connectionSt ...

Posted on Mon, 04 May 2020 03:41:56 -0700 by danrah

java JDBC connecting mysql database

Preface I have to admit the complexity of java code. concept 1 Parameters for creating database links String driver; String url; String user; String password; 2 load database class.formName(driver) 3 get database link Connection conn = DriverManager .getConnection(url,user,passwo ...

Posted on Sat, 02 May 2020 23:15:13 -0700 by tskweb

Several ways for Spring to load Properties configuration files

1: Load configuration file through context: Property placeholder tag Add the following declaration to spring's configuration file <context:property-placeholder ignore-unresolvable="true" location="classpath:jdbc.properties"/>   When referencing values, use $to reference the values you need1. In datasource.xml <!-- Configu ...

Posted on Fri, 01 May 2020 20:02:46 -0700 by snog

Mybatis -- optimize configuration file based on annotation CR

This article mainly focuses on the optimization of write configuration files, such as jdbc.properties configuration file, files introduced into database, such as driver,url,username,password, etc., and then introduce the corresponding file in SqlMapConfig.xml to simplify the configuration file. In SqlMapConfig.xml, use < typealiases > &lt ...

Posted on Fri, 01 May 2020 15:14:59 -0700 by aaadee

MyBatis uses reverse engineering to automatically generate the entity layer and dao layer of the project

1, Foreword I wrote an article about MyBatis Click the link to enter the basic CRUD of low version comparison However, it is not necessary to write dao layer and entity layer code in actual development, mainly using the shelf package provided by MyBatis Here is the whole process of using reverse engineering 2, Demo and code ① Create a ja ...

Posted on Fri, 01 May 2020 00:14:19 -0700 by geetakhurana