MyBatis Plus-3-Universal CRUD
General CRUD
1.1 Create the interface EmployeeMapper and inherit BaseMapper<T>
public interface EmployeeMapper extends BaseMapper<Employee> {
/*
* Mapper Interface
*
* Based on Mybatis: Writing CRUD-related methods in Mapper interface provides corresponding SQL mapping files and corresponding SQL statements for Ma ...
Posted by callesson on Sat, 05 Oct 2019 18:08:08 -0700
Return to Map in Mybatis
In Mobile, we usually use the following:
Returns a result
User selectOne(User user);
<select id="selectOne" parameterType="cn.lyn4ever.entity.User" resultType="cn.lyn4ever.entity.User">
select id,username,telphone from user where telphone=#{telphone} and password = #{password}
</select>
Returns multiple results (in f ...
Posted by ashleek007 on Sat, 05 Oct 2019 15:11:18 -0700
Question of accessing injected variables after injection of Spring configuration files
Code directly
1.Class OneClass
public class OneClass {
String s;
public void setS(String s) {
this.s = s;
}
}
2.Class Demo
public class Demo {
OneClass oneClass;
public void setOneClass(OneClass oneClass) {
this.oneClass = oneClass;
}
{
System.out ...
Posted by AdamDowning on Sat, 05 Oct 2019 11:47:32 -0700
Generator SqlMapCustom (mybatis reverse engineering)
Generator SqlMapCustom can be used as a tool to automatically load POJO, mapper interface and corresponding xml. First, paste the source link.
Click here: GitHub Source Link
Look at the source code annotations for usage. The contents of the project are as follows:
GeneratorSqlmap.java
import ja ...
Posted by Kondie on Sat, 05 Oct 2019 07:55:21 -0700
jenkins+maven+java-Tomcat -- Configuration of the project (server.xml)
Tomcat -- About Project Configuration
Configuration Ports - involving three ports - modifying conf/server.xml
# Close the port of tomcat
<Server port="8005" shutdown="SHUTDOWN">
# Establish access to http, browser access
<Connector port="8080" protocol="HTTP/1.1"
connection ...
Posted by Cerberus_26 on Fri, 04 Oct 2019 18:24:46 -0700
Several Ways to Realize Tree Structure by mybatis Single Table Self-Association
The javaBean is as follows:
public class Permission implements Serializable {
private Integer id;
private String name;
private String icon;
private String url;
private boolean open;//Are the leaves open?
private Integer pid;//Father id
private boolean checked;//Is it selected ...
Posted by notionlogic on Fri, 04 Oct 2019 07:57:15 -0700
scope of configuring bean s
siye@r480:~/svlution/workspace/springcore4322$ tree src/
src/
├── main
│ ├── java
│ │ ├── log4j.properties
│ │ └── ocn
│ │ └── site
│ │ └── springioc
│ │ └── domain
│ │ └── User.java
│ └── resources
└── test
├── java
│ └── ocn ...
Posted by ebm on Fri, 04 Oct 2019 03:48:44 -0700
ANTLR4 SQL parsing of sharding-jdbc
Public Number: Madad's Technical Wheel
Sharing mainly uses ANTLR4 to parse SQL. Take mysql as an example, before analyzing the source code, we can first understand the following three points:
antlr4, how to write.g4 grammar file
The mysql grammar can be referred to https://dev.mysql.com/doc/refman/8.0/en/sql-syntax-data-manipulation.html
...
Posted by trippyd on Thu, 03 Oct 2019 22:02:18 -0700
Express Bird Logistics Single Number Query api interface integration, can be directly used if necessary
With the development of online shopping, the express industry has also grown. The demand for the docking of express inquiry interface is also growing. The following is the collation of free express interface, with the call process attached, to share with you.
In the project development, some requirements will inevitably use some Api interfaces ...
Posted by Boris Senker on Thu, 03 Oct 2019 20:59:20 -0700
java threads: mutex and read-write locks
Links to the original text: https://my.oschina.net/u/580135/blog/612244
Two mutex mechanisms:
1,synchronized
2,ReentrantLock
ReentrantLock is a new feature of jdk5. ReentrantLoc ...
Posted by moberemk on Thu, 03 Oct 2019 18:47:40 -0700