SQL injection violation, multi statement not allow final solution
Solutions:
1. The code reports an error. The operation causing the exception is batch update. The definition of the Bean is related to Druid as follows:
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<property name="driverClassName" value="${db.driverClassName}"/&g ...
Posted by pakmannen on Wed, 20 Nov 2019 06:28:59 -0800
Using PHP+Redis to delay tasks and automatically cancel orders
Simple timing task solution: when using redis's keyspace notifications, you need to note that this function is launched after redis version 2.8, so the reids on your server should be at least 2.8 or above;
(A) business scenario:
1. When a business is triggered, a scheduled task needs to be started, and another task needs to be executed within t ...
Posted by Sanjib Sinha on Wed, 20 Nov 2019 00:18:31 -0800
03 mybatis interceptor mechanism
Catalog
Introduction to MyBatis interceptor
Use of interceptors
Introduction and configuration of interceptor
Source code analysis
summary
Reprinted from Research on the principle of MyBatis interceptor
Introduction to MyBatis interceptor
MyBatis provides a plug-in function. Alt ...
Posted by phpnoobguy on Mon, 18 Nov 2019 01:05:42 -0800
Commands out of sync; you can't run this command now
If you use mysqli's query method to get the result, you will get an error: Commands out of sync; you can't run this command now sss
Stored procedure:
CREATE PROCEDURE test1()
begin
drop table if exists tb1;
create table tb1
(
val int not null
)engine = innoDB;
insert into tb1(val) values(1),(2),(3) ...
Posted by shoz on Sun, 17 Nov 2019 12:29:04 -0800
Try with resources in Java
This is the ninth article of Effective Java.
To illustrate the problem, I write an ugly code first:
private void doSomething(Connection connection) {
String sql = "select 1";
PreparedStatement preparedStatement = null;
try {
preparedStatement = connection.prepareStatement(sql);
p ...
Posted by witty on Sun, 17 Nov 2019 09:04:49 -0800
Data service analysis of Spark project
Business logic processing
Peers
To judge whether it is a peer object, we can judge whether two objects have passed through multiple identical places by using longitude and latitude. Of course, each monitoring device can also be marked. When an object passes through the monitoring device, it can be captured by the device.
Tra ...
Posted by aztec on Sun, 17 Nov 2019 08:26:39 -0800
Docker packages nodejs project and database
To read this article, you must know the basic docker. This article only provides ideas and part of the code, not responsible for teaching
All orders must be handled carefully! look before you leap
command
Stop all running containers
docker stop $(docker ps -a -q)
Delete all containers
docker rm $(docker ps -a -q)
Using docker compose to start t ...
Posted by dreamwest on Sat, 16 Nov 2019 08:40:37 -0800
Using SQL Server database for python3 connection (linux version)
statement
My sample environment:
System version: CentOS 7.1
Database version: SQL Server2012
python version: Python 3.6.3
Connect to database tools: pyodbc, freetds
If you use Django to connect to the SQL Server database, please refer to the blog "Django 2.1 connect to use SQL Server(linux version)", which is different from that, ...
Posted by Omzy on Sat, 16 Nov 2019 07:43:30 -0800
Restrict multiple logins of the same account and choose forced kicking
Software type: CS
Development tool: Delphi
Function: restrict multiple logins of the same account and choose to kick others forcibly.
1. Use the temporary table to determine whether the current account has been logged in. Here is a brief introduction to the temporary table method. When the software is successfully logged in for the first time, ...
Posted by phlow on Fri, 15 Nov 2019 11:43:50 -0800
New feature of Oracle 12c: online conversion of non partitioned tables to partitioned tables
concept
Nonpartitioned tables can be converted to partitioned tables online. Indexes are maintained as part of this operation and can be partitioned as well. The conversion has no impact on the ongoing DML operations.
You can convert non partitioned tables to online partitioned tables. Indexes are maintained as part of the op ...
Posted by SoulAssassin on Fri, 15 Nov 2019 10:13:30 -0800