Knowledge point ③: druid configuration and use in Spring Boot

Spring Boot druid configuration rely on Add druid dependency to Spring Boot project <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>${druid.version}</version> </dependency> To configure spring.datasource.url= spring.datasource.username= spring.datasour ...

Posted by madd_maxx on Sun, 05 Apr 2020 18:53:31 -0700

Introduction to using JDBC template in Spring

Spring provides a powerful template class -- JDBC template to simplify JDBC operations. The data source DataSource object and the template JDBC template object can be defined in the configuration file in the form of Bean, giving full play to the power of dependency injection.   Case: use JDBC template to query all books 1. Introduce jar package ...

Posted by Loafin on Fri, 03 Apr 2020 01:06:22 -0700

Spring boot (III) integration with mybatis

Preface With the release of spring boot2.0. The API interface of the project team has considered the transformation to spring boot. We always use mybatis as the underlying interface, so in this article, I specially practiced the integration of mybatis in spring boot.   1, Preparations 1,pom.xml   1 <dependencies> 2 &lt ...

Posted by ntnwwnet on Tue, 31 Mar 2020 02:57:27 -0700

Spring boot integrates mybatis plus multi data source Druid monitoring, Atomikos deals with transactions, cross database and linked table query

Spring boot integrates mybatis plus (2) multi data source Druid monitoring, Atomikos deals with transactions, cross database and linked table query In the previous chapter, I used springboot project to integrate mp, mp basic use, code generator use, Druid data monitoring, etc., but only for single dat ...

Posted by joshbb on Thu, 05 Mar 2020 01:36:39 -0800

Springboot web construction yml module annotation of Java framework

SpringBoot Spring Boot is a one-stop framework for integrating all application frameworks, simplifying the development of spring applications. It is a runtime application monitoring framework with more conventions than configurations, less complexity and simplicity, and ready to use out of the box, quasi production environment To quickly build ...

Posted by ngng on Thu, 05 Mar 2020 01:07:52 -0800

Spring boot 2.0.3 integrated druid data source and monitoring

I. Druid Druid is the best database connection pool in the Java language, and also the open source project of Alibaba. Druid is a database connection pool developed by Alibaba called monitoring. In terms of function, performance and scalability, Druid is superior to other database connection pools, including DBCP, C3P0, BoneCP, ...

Posted by Alffallen on Sat, 15 Feb 2020 11:20:50 -0800

Simple login case

preparation: Import the required jar package, import it into the lib package under the web directory and WEB-INF directory, and add it into the module The following picture:Configuration database file druid.properties driverClassName=com.mysql.cj.jdbc.Driver url=jdbc:mysql:///Day14 you can create your o ...

Posted by Lukey on Sun, 09 Feb 2020 07:52:08 -0800

Spring Boot+mybatis create multi data source connection

Spring Boot+mybatis create multi data source connection 1, Background: the company system needs to do heterogeneous database data migration, need to configure multiple data sources, there are also some small problems in the configuration process, so make a record here; 2, Code address: 3, Code exp ...

Posted by rookie on Sat, 11 Jan 2020 08:10:12 -0800

Spring boot configuration Servlet, Filter, Listener

Spring boot configuration Servlet, Filter, Listener In spring boot applications, the embedded Servlet 3.0 + container will not directly use the ServletContainerInitializer and WebApplicationInitializer, that is, the Servlet, Filter and Listener configurations implemented through the above two interfaces are invalid, which is to prevent the desi ...

Posted by srikanth03565 on Thu, 02 Jan 2020 09:29:34 -0800

Spring boot integrates shiro configuration

1. Configure lifecycle bean postprocessor to manage lifecycle 2. Configure ShiroFilterFactoryBean to set which paths require authentication and which do not 3. Enable shiro Aop annotation to support AuthorizationAttributeSourceAdvisor 4. Configure SecurityManager to manage custom realms, session s, and caches Realm realizes logi ...

Posted by Wintergreen on Wed, 04 Dec 2019 20:33:14 -0800