SpringBoot implements multiple data source configuration

Spring boot for multi data source configuration springBoot implements the configuration of multiple data sources application.properties Configure two data sources in spring.datasource.primary.url=jdbc:mysql://localhost:3306/test1 spring.datasource.primary.username=root spring.datasource.primary.password=root spring.datasource.primary.driv ...

Posted on Mon, 20 Jul 2020 12:04:53 -0400 by Julian Pedley

[Spring] Pure java for Spring-hibernate integration

First import the corresponding jar package for Spring-hibernate Then prepare the file for the database connectionHibernate.propertiesAlsoJdbc.properties Hibernate.propertiesFile: Configure the hibernate dialect and automatic table building hibernate.dialect=org.hibernate.dialect.H2Dialect hibernate.hbm2ddl.auto=create Jdbc.propertiesFi ...

Posted on Wed, 08 Jul 2020 10:43:00 -0400 by sineadyd

spring annotation Driven Development -- attribute assignment

1. @Value assignment and @ PropertySource loading configuration file SpEl Introduction: https://www.jianshu.com/p/e0b50053b5d3 @Value assignment public class Person { //Use @ Value to assign Value; //1. Basic value //2. You can write a spiel; ා {} //3. You can write ${}; take out the val ...

Posted on Tue, 30 Jun 2020 00:29:28 -0400 by utahcon

Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available

org.apache.tomcat.jdbc.pool.ConnectionPool View source code private PooledConnection borrowConnection(int wait, String username, String password) throws SQLException { if (isClosed()) { throw new SQLException("Connection pool closed."); } //end if //get the curr ...

Posted on Fri, 26 Jun 2020 03:29:04 -0400 by callmecheez

New features of Java syntax_ java5 to java11

1, Foreword I never thought, it's 0202, Sun is dead, I have to start from the new features of Java 5, and focus on the new features of Java 8... In fact, there are a lot of such things on the Internet. Why do I have to write them? Because leaders think that we are too (really) busy (lazy) and have no time to study at ordinary times, so let's f ...

Posted on Wed, 24 Jun 2020 04:07:41 -0400 by fuzz01

Spring Boot declarative transaction management example

Video Explanation address: (reserved: to be uploaded...)Let's start: What is a database transaction? A database transaction is a single logical unit of work that accesses and potentially modifies the contents of a database.Let's check the mysql database: Open two separate windows for mysql database In a mysql window, create a database ...

Posted on Wed, 24 Jun 2020 01:17:33 -0400 by CaptainChainsaw

SSM learning notes - (spring MVC + Spring + mybatis) configuration (eclipse)

I've heard the teacher said that the whole family bucket of spring framework has never known what it is. I read a lot with a sense of mystery and didn't really understand it. I simply learned the configuration of SSM framework by taking the opportunity of practical training. Spring, as a novice of Xi ...

Posted on Tue, 23 Jun 2020 04:20:34 -0400 by galewis

Java, JDBC core technology, transaction, thread pool

Article catalog JDBC core technology 1, Overview 1. Data persistence 2. Data storage technology in Java 3. Introduction to JDBC 4. JDBC architecture 5. JDBC programming steps 2, Get database connection 3, PrepareStatement 1. Operation and access to database 2. Disadvantages of using Statement to ...

Posted on Tue, 23 Jun 2020 03:15:26 -0400 by Chris-the dude

springboot Integrated CAS for Single Sign On

Recently, new projects have used CAS single sign-on, and I won't, how can I tolerate it?Learn nothing and build a demo for spring-boot integrated CAS.Single sign-on and sign-out are implemented. Single Sign On is the full name of SSO.Meaning: In multiple trusted systems, as long as you log in to one system, other systems can access it. CAS It i ...

Posted on Sun, 21 Jun 2020 14:05:25 -0400 by bonzie

Web05 mybatis advanced (using annotation development and SQL to build objects)

MyBatis advanced Today, I'd like to share with you the following Annotation implementation single table development Annotation for multi table operation SQL construction statement of MyBatis Here are some key words of MyBatis annotation development Annotation implementation single table developme ...

Posted on Sun, 21 Jun 2020 04:30:55 -0400 by dad00