The use of JDBC and SQL injection

Basic JDBC usage: package demo; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.junit.Test; /** * Test query class for all users * */ public class QueryAll { @Test public void testQueryAll(){ Connection conn= nul ...

Posted by gat on Thu, 30 Apr 2020 08:28:14 -0700

The detailed steps of java connecting mysql database

The detailed steps of java connecting mysql database Connection Description: a. The driver of mysql connection b. mysql database installation c,eclipse e. Whether the database service is open (control panel - management tool - Service - find the corresponding service of mysql) f. Create a database 1. Create a new java project and t ...

Posted by dsjoes on Thu, 30 Apr 2020 07:09:14 -0700

MyBatis+Oracle in the execution of insert time and space value error reporting: source code to find solutions

To facilitate the test, the Demo code is given first: mybatis-oracle-config.xml 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" 3 "http://mybatis.org/dtd/mybatis-3-config.dtd"> 4 5 <configuration> 6 <properties> 7 <property nam ...

Posted by SirChick on Wed, 15 Apr 2020 08:12:25 -0700

What is the difference between Class.forName and lassLoader?

Preface Recently, during an interview, I was asked the difference between a Class.forName() loading class and a ClassLoader loading class in the Java reflection.I didn't come up with it at that time. I studied it myself and wrote it down. explain Class.forName() and lassLoader can both load classes in java.ClassLoader is a class loader that fol ...

Posted by like_duh44 on Tue, 14 Apr 2020 19:49:52 -0700

Source code analysis of Mybatis+Oracle with insert null error reporting

In order to facilitate SEO search, first of all, post the error content Different versions of Oracle drivers will report different errors 1 <dependency> 2 <groupId>com.oracle</groupId> 3 <artifactId>ojdbc6</artifactId> 4 <version>1.0</version> 5 </dependency> The error is reported as ...

Posted by cliffboss on Tue, 14 Apr 2020 11:36:29 -0700

How to implement redis distributed lock

Distributed lock is a way to control the synchronous access of shared resources between distributed systems. In the distributed system, they often need to coordinate their actions. If different systems or different hosts of the same system share one or a group of resources, when accessing these resources, they often need to be mutually exclusiv ...

Posted by Jeroen_nld on Fri, 10 Apr 2020 23:02:20 -0700

I don't know jdbc, what about Mybatis source parsing?

This article is mainly intended to show the use of jdbc to make it easier to read MyBatis source code and to warm up for source analysis. Many of the key information can be found in the MyBatis source code. This article does not analyze the MyBatis source code. Because the MyBatis source code is a huge and complex project, it can't be said in j ...

Posted by juma929 on Fri, 10 Apr 2020 21:13:28 -0700

spring - use profile to manage environment information

Programs generally have development environment, test environment and online environment. The basis of program running in these environments is generally different. For example, in a program with data source access, embedded database may be used in development, and independent mysql may be used in the test environment. After the program is offi ...

Posted by nttaylor on Tue, 07 Apr 2020 22:17:24 -0700

Data source management: adapt and manage dynamic data sources based on JDBC mode

Source code: GitHub point here || GitEE point here 1, Relational data source 1. Dynamic data source The basic functions of dynamic management data source: data source loading, container maintenance, persistent management. 2. Relational database Different manufacturers of relational databases provide different connection methods, driver packag ...

Posted by blackhawk08 on Tue, 07 Apr 2020 08:51:15 -0700

Two SQL errors (invalid column types: getTimestamp not implemented and ORA-00984: columns are not allowed here)

uncategorized SQLException; SQL state [99999]; error code [17004]; invalid column type Error phenomenon Invalid column type: getTimestamp not implemented for class oracle.jdbc.driver.T4CNumberAccessor ; uncategorized SQLException; SQL state [99999]; error code [17004]; Invalid column type: getTimestamp not implemented for class oracle.jdbc.driv ...

Posted by geo3d on Mon, 06 Apr 2020 07:05:29 -0700