Dynamic update of JAVA static constant non @ Value annotation based on NACOS and JAVA reflection mechanism

1. Preface Constant class files are used in projects. If the values need to be changed, the code needs to be resubmitted, or the @ Value annotation is used to realize dynamic refresh. If there are too many constants, it is also very troublesome. Can there be a simpler way to implement them? This article describes the way that a JAVA class cor ...

Posted on Thu, 18 Jun 2020 22:05:31 -0400 by Frame

druid monitor configuration -- springBoot project

Cause: one day, my colleague's project connection pool burst At first, I thought there was a long-running sql, but after checking the DB, I found that there was no such sql at all Then I wonder if it is the calling of the third-party interface, which is suspended or not closed due to timeout. After ...

Posted on Fri, 12 Jun 2020 03:30:17 -0400 by ashbai

Spring boot08: integrating Druid

Crazy God said that the spring boot series is easy to understand. Based on the version 2.2.5 of spring boot, you are welcome to forward and pay attention to learning. WeChat official account: Bilibili, the first of the gods, Java No reprint without authorization of the author Integrated Druid About Druid A large part of Java progr ...

Posted on Tue, 26 May 2020 00:58:17 -0400 by davelr459

Getting Started with Druid 0.17 - A Complete Data Query Style

This article describes how Druid queries data. First, we ensure that the data has been loaded successfully. Druid queries are based on HTTP, and Druid provides a query view and formats the results. Druid provides three query modes, SQL, native JSON, CURL. 1. SQL Query Let's use wiki's data as an example Query the top 10 page edits SELECT page, ...

Posted on Thu, 14 May 2020 22:59:14 -0400 by amorphous

Spring Boot default data source

1. Use the Spring Boot default data source http://blog.csdn.net/qq_35760213/article/details/73863252 1.1 introducing POM dependency In pom files, we directly rely on the official spring boot start JDBC module or spring boot start data JPA module. <dependency> <groupId>org.springframework.boot</groupId> < ...

Posted on Sun, 03 May 2020 05:14:25 -0400 by Mijii

Data source management | PostgreSQL environment integration, JSON type application

Source code: GitHub point here || GitEE point here 1, Introduction to PostgreSQL 1. Comparison with MySQL PostgreSQL is a powerful and open-source relational database system. There are a lot of comparative analysis between PostgreSQL and MySQL on the Internet. Mostly from the performance, open source protocol, SQL standards, development diffic ...

Posted on Sat, 25 Apr 2020 22:03:05 -0400 by SurgeProto

Eureka Cluster Setup

Why set up a cluster of registries in case of a single point of failure, that is, the only registry failure that causes the entire architecture to fail Register with each other and watch each other First modify the host mapping of the native hosts file Add Map C:\Windows\System32\drivers\etc\hosts 1. Modify previous 7001 profile server: port ...

Posted on Tue, 21 Apr 2020 13:24:04 -0400 by Andy-H

Principle decryption → spring AOP realizes dynamic data source (read-write separation), what is the principle in essence?

Principle decryption Let's explain the points one by one, and then string together to understand the underlying principle of read-write separation Spring AOP AOP: Aspect Oriented Program As for Spring AOP, I believe you are familiar with it. It is a supplement to OOP. OOP is vertical, and AOP is horizontal As shown in the figure above, OOP i ...

Posted on Tue, 14 Apr 2020 08:24:55 -0400 by johnali3n

Using Alibaba Druid data source and monitoring sql in SpringBoot

Continue to summarize the work of Java background 2 Preface Previously, I wrote a SSM to replace c3p0 data source with Druid: https://blog.csdn.net/larger5/article/details/79509895 Recently, projects are basically based on SpringBoot. Similarly, using Druid as data source is also a very simple operation and principle Cod ...

Posted on Tue, 31 Mar 2020 07:33:34 -0400 by imranlink

A blood case caused by a Druid connection pool leak!

Recently, an application is always a card and needs to be restarted to solve the problem, resulting in various complaints. The troubleshooting problem is a blood case caused by a Druid connection pool leak. The exception log is as follows: ERROR - com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 50, maxActive 50, ...

Posted on Wed, 11 Mar 2020 22:57:01 -0400 by andremta