The solution to the problem of using @ Param for Mybatis parameter to insert and return the primary key

Today, when working on the project, I encountered the problem that I need to return the auto increment primary key ID of the data just inserted. I found that the getId returned from the object is always empty, and all the data I checked online are Similar to this, <insert id="insertAndgetkey" parameterType="com.soft.myba ...

Posted by unidox on Sun, 05 Jan 2020 01:21:30 -0800

Conversion between simplified and traditional characters

zh2Hans.properties \u3473=\u3447 \u380f=\u37c6 \u3a5c=\u3a2b \u42b7=\u4336 \u42d9=\u433a \u42fb=\u433e \u4308=\ud858\ude16 \u477c=\u478d \u4a8f=\ud864\udffc \u4a97=\ud865\udc00 \u4a98=\ud864\udfff \u4af4=\ud865\udd97 \u4b18=\ud865\ude6e \u4b1d=\ud865\ude6f \u4b40=\ud866\udc07 \u4b43=\ud866\udc08 \u4b7f=\ud866\udded \u4b9d=\u ...

Posted by sailu_mvn on Sat, 04 Jan 2020 18:56:04 -0800

Pyhton crawler case (4) -- item inserted into MySQL database

In this section, how to insert the crawled data into mysql database is discussed. The tools used are PyCharm and Navicat for MySQL or Navicat Premium The crawled website is: http://books.toscrape.com/ , which is explained in many tutorials. Let's open navicat, create a new query, and create a table in the editor (using the dat ...

Posted by Salkcin on Sat, 04 Jan 2020 15:29:38 -0800

Implementation of inheriting JDBC daosupport (add, delete, modify and query)

First, create database tables and corresponding fields, and create constraints Second, build the project, import the jar package (ioc,aop,dao, database driver, connection pool) and put the applicationContext.xml file under src 3. Enable component scanning and configure data source 4. Write an entity class (provide get set) method, toString(), w ...

Posted by Devil_Banner on Sat, 04 Jan 2020 11:23:16 -0800

PHP+MYSQL transaction processing

For PHP + MYSQL transaction processing, first of all, transactions must be supported during database design, so when designing data tables, InnoDB is selected as the database engine. If the database engine selected does not support transactions, such as MyISAM, it can be locked through tables Here is a simple example of a tran ...

Posted by ceci on Sat, 04 Jan 2020 10:47:28 -0800

Mysql start / view slow query log

Mysql view slow query log 0. environment windows10 mysql5.7 1. demand In normal programming, for a slow SQL, we may need to view the "slow query" log of the SQL. We can get some inspiration from this log, so as to optimize the SQL and reduce the query time. But how to open and search the slow query log of mysql? ...

Posted by hadoob024 on Sat, 04 Jan 2020 10:27:06 -0800

Using Go language to operate MySQL database

Recently, I learned to use Go language to operate MySQL database to add, delete, modify and query user data when I was doing the registration and login service. Now I summarize my personal learning experience as follows, and attach Code warehouse address Welcome to fork. Software environment: Goland, Navicat for MySQL. 1, Realization ideas 1 ...

Posted by Potatis on Sat, 04 Jan 2020 03:05:34 -0800

Custom use of JpaRepository in Spring boot

Generic JpaRepository class import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface EmployeeRepository extends JpaRepository<Employee,Long>{ } General filter queries of JpaRepository can be solved in the form of findBy, which is easy to use in general, ...

Posted by Nicholas Reed on Sat, 04 Jan 2020 01:42:54 -0800

Import mysql data to redis

Using script to simulate the implementation of redis cli on the client side of redis: (Note: mysql address is 10.86.30.203 redis address is 10.86.31.50) 1. First determine the columns of mysql table: desc test; +-----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra ...

Posted by scuff on Fri, 03 Jan 2020 21:03:30 -0800

MySQL basic part: summary of system and custom function, detailed explanation of trigger use

1, System encapsulation function MySQL has many built-in functions, which can quickly solve some business requirements in development, including process control function, numerical function, string function, date time function, aggregation function, etc. The functions commonly used in these classifications are listed below. 1. Control flow f ...

Posted by netdynamix on Fri, 03 Jan 2020 12:52:53 -0800