Introduction to using JDBC template in Spring

Spring provides a powerful template class -- JDBC template to simplify JDBC operations. The data source DataSource object and the template JDBC template object can be defined in the configuration file in the form of Bean, giving full play to the power of dependency injection.   Case: use JDBC template to query all books 1. Introduce jar package ...

Posted by Loafin on Fri, 03 Apr 2020 01:06:22 -0700

MyBatis first program: HelloWorld

1. Download the jar package required by MyBatis Download links of Github versions of MyBatis: https://github.com/mybatis/mybatis-3/releases Download the JDBC driven jar package of the corresponding database      2. Prepare the database to use create database School; use School; create table Users (   id int primary key,   name varcha ...

Posted by tranzparency on Thu, 02 Apr 2020 14:05:48 -0700

Spring boot auto assembly principle

SpringBootApplication annotation @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Inherited @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class), @Filter(type = FilterType.CUSTOM, classes = AutoConfigu ...

Posted by theprofession on Thu, 02 Apr 2020 01:45:43 -0700

Detailed explanation of design mode bridge mode

Basic introduction Bridge mode is a structural design mode. Put the implementation and abstraction in two different class levels, so that the two levels can be changed independently. Based on the minimum design principle of class, different classes are given different responsibilities through encapsulation, aggregation, inheritance and other b ...

Posted by drdapoo on Mon, 30 Mar 2020 04:00:30 -0700

Java database development (1): JDBC connection database

1, MySQL database 1. Create database CREATE DATABASE jdbc CHARACTER SET 'utf8'; 2. build tables CREATE TABLE user ( id int(10) NOT NULL AUTO_INCREMENT, userName varchar(20) NOT NULL, PRIMARY KEY (id) ); 3. Add data 2, Connect MySQL database through JDBC 1.JDBC URL 2.Statement boolean execute(String SQL): if the ResultSet object can be ...

Posted by katlis on Sun, 29 Mar 2020 11:35:55 -0700

The use of BeanListHandler interface in DBUtils

Original link: http://www.yiidian.com/dbutils/dbutils-beanlisthandler.html org.apache.commons.dbutils.BeanListHandler is the implementation of the ResultSetHandler interface, and is responsible for converting all records at the ResultSet result level to the List collection of JavaBean s. This class is thread safe. 1 syntax for beanlisthandler L ...

Posted by codygoodman on Sat, 28 Mar 2020 07:55:12 -0700

hive-1.2.1 Installation and Simple Use

Hive can only be installed on one node 1. Upload tar package 2. Decompression tar -zxvf hive-1.2.1.tar.gz -C /apps/ 3. Install mysql database (switch to root user) (there are no limitations on where to install, only nodes that can connect to the hadoop cluster) 4. Configure hive (a) Configure the HIVE_HOME environment variable vi conf/hive-e ...

Posted by gyash on Thu, 26 Mar 2020 21:12:15 -0700

Source code analysis of Spring transaction execution

Spring transactions rely on AOP. The transaction execution process is to add AOP facet logic when the business method is executing. It is intercepted by the TransactionInterceptor class. We use this as the entry point to analyze the whole process. 1, TransactionInterceptor public Object invoke(MethodInvocation invocation) throws Throwable { ...

Posted by passagewds on Tue, 24 Mar 2020 04:06:06 -0700

CAS Single Sign On - Customize the login interface and form information

In the previous section, we talked about the configuration and management of services in CAS. We have some knowledge about adding services in CAS to the registry. If you are not familiar with this, you can review it CAS Single Sign-on (5) - Service Configuration and Management. Today, we continue with articles that we haven't covered before on ...

Posted by Kor Ikron on Wed, 18 Mar 2020 22:55:16 -0700

JDBC for transaction management

JDBC for transaction management There are four characteristics of a transaction:Atomicity: refers to that the operations contained in a transaction are regarded as a logical unitConsistency: the database is in a consistent state before and after the startIsolation: multiple transactions modified to the database are isolated from each otherThe i ...

Posted by Mark Baker on Wed, 18 Mar 2020 08:30:03 -0700