Spring Boot-using Druid connection pool, SQL monitoring and spring monitoring

Project structure 1.Introduce maven dependencies <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.1.10</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> View Code 2. Add druid configuration to the application.properties configuration […]

Thoughts on java thread pool ThreadPoolExecutor monitoring and dynamic parameter adjustment

Table of Contents For thread pool parameters For task submission strategy Respond quickly to user requests The default strategy of java ThreadPoolExecutor is as follows The tomcat ThreadPoolExecutor strategy is as follows Process batch tasks quickly Thread pool monitoring Dynamic adjustment of thread pool parameters https://mp.weixin.qq.com/s/baYuX8aCwQ9PP6k7TDl2Ww Java thread pool implementation principle and its practice in […]

JVM-08 class constant pool and runtime constant pool

class constant pool The Class constant pool is the resource warehouse in the Class file. In addition to the description information such as the version, fields, methods, and interfaces of the class, the Class file also contains a constant pool table, which is used to store various literals and symbol references generated during compilation. Symbolic […]

Target detection algorithm improvement series: Backbone replaced by PoolFormer

PoolFormer MetaFormer is a Transformer paper written by Yan Shuicheng. The contribution of this paper mainly has two points: first, it abstracts Transformer into a MetaFormer with a general architecture, and proves through experience that the MetaFormer architecture has achieved great results in the Transformer/mlp class model. Big success. Second, by using only simple non-parametric […]

Understanding the thread pool in Java multithreading

1. Summary 1. The significance of the existence of threads: In concurrent programming, because using processes to program is “too heavy”, threads (“lightweight processes”) are introduced at this time. 2. Thread advantages: Creating threads is more efficient than creating processes, destroying threads is more efficient than destroying processes, and scheduling threads is more efficient than […]

SpringBoot+Vue blog front-end and back-end separation project 8 article details-thread pool (springboot + mybatisplus+redis+mysql+jwt+cache)

Table of Contents 1. Article details 1.1 Interface description 1.2 Involved tables and pojos 1.3 Controller 1.4 Service 1.5 Testing 2. Use thread pool to update reading count 2.1 Why use the thread pool to update the reading count: 2.2 Solution: 2.3 Thread pool configuration 2.4 Use 2.5 Testing 1. Article details 1.1 Interface Description […]

93. Redis uses connection pool to manage connections above Redis 6.0 and subscribe and publish messages.

Use connection pool to manage Redis connections Starting from Redis 6.0, Redis can support the use of multi-threading to receive and process client commands, so applications can use connection pools to manage Redis connections. The previous chapter talked about creating a single connection to operate the redis database. This time, we used a connection pool […]