An implementation of read-write separation of springboot mybatis

First of all, consider using cache for processing. If the cache is not enough, then use read-write separation for implementation application.yml configures two data sources #Default usage configuration spring: profiles: active: dev --- #Development and configuration spring: profiles: dev datasource: master: jdbc-url: jdbc: ...

Posted by Jason_London on Fri, 08 Nov 2019 19:35:17 +0100

java links Oracle(JDBC)

Tools: eclipse jdk 1.8 oracle 11g ojdbc6.jar(Database driver package) Six steps of JDBC: Here we follow these six steps of jdbc: Registration driven Get connection Get execution sql statement object Execute sql statement Process result set close resource URL: Uniform Resource Locator oracle URL: jdbc:orac ...

Posted by bobbfwed on Fri, 08 Nov 2019 16:05:50 +0100

There are three ways to batch import and delete the Mybatis framework

Create a database first CREATE TABLE user (   id varchar(32) CHARACTER SET utf8 NOT NULL,   name varchar(50) CHARACTER SET utf8 DEFAULT NULL ,   dflag char(1) CHARACTER SET utf8 DEFAULT NULL ,   PRIMARY KEY (`id`) ) jdbc.properties configuration mysql.driver=com.mysql.jdbc.Driver mysql.url=jdbc:mysql://127.0.0.1:3306/qingmu?char ...

Posted by sheac on Tue, 05 Nov 2019 22:59:51 +0100

Spring series 7: four ways for spring to integrate mybatis

I. use annotation to integrate mybatis The project contents are as follows Step 1: import the jar package <build> <resources> <!-- mapper.xml File in java Directory --> <resource> <directory>src/main/java</directory> <includes> ...

Posted by akop on Tue, 05 Nov 2019 22:10:14 +0100

SSM framework realizes the addition, deletion, modification, query, paging and distribution of projects

1. Create a new project in idea, file - > New - > project. Select Maven, pay attention to jdk1.8, and click Next. 2.k here, Group,Artifactld, click Next. 3. Click finish. 4.ssm_parent1 is the parent class and does not write anything. Then four modules need to be created under ssm_parent1: ...

Posted by bravo81 on Fri, 01 Nov 2019 21:51:09 +0100

flowable learning exclusive gateway

I. deployment Designer 1. Put flowable-idm.war and flowable-modeler.war into the webapps directory of tomcat, and then start Tomcat. 2. Access in browser http://localhost:8080/flowable-modeler , user name / password: admin/test login, save and export the file after designing the process. Two code 1 create a process engine and deploy a pro ...

Posted by Enlightened on Wed, 30 Oct 2019 07:56:27 +0100

Mybaits primary key value updating

Article directory Mybaits primary key value updating Return the primary key value generated by the current session (supported by MySQL and Oracle) Test it. You can write back the primary key value by setting the attribute. The principle is unknown (only supported by MySQL) Test it. Mybaits pri ...

Posted by ShadowIce on Tue, 29 Oct 2019 19:17:05 +0100

Java virtual machine classloader and parent delegation mechanism

The so-called Class Loader is to load Java classes into the Java virtual machine.< Interviewer, stop asking me "Java virtual machine class loading mechanism" >The mechanism for loading class files is described in. This article focuses on the loader and parental delegation mechanism. Class loader There are three types of classloa ...

Posted by darga333 on Tue, 29 Oct 2019 08:45:53 +0100

[Junit] Spring project unit test

Background If spring project needs to test small functions, it takes time and effort to start the whole project. You can use spring test package to unit test, accelerate project development and testing. Two, use 1. Add maven dependency <dependency> <groupId>junit</groupId> ...

Posted by Fsoft on Mon, 28 Oct 2019 15:19:06 +0100

V. automatic assembly of Spring

Spring auto assembly Spring makes use of dependency injection (DI) to complete the assignment of the dependencies of various components in the IOC container. [1]@Autowired @Autowired annotation, which can annotate class member variables, methods and constructors to complete the work of automatic assembly. Use @ Autowired to eliminate the set an ...

Posted by josaho on Mon, 28 Oct 2019 14:41:35 +0100