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 by AtomicRax on Mon, 20 Jul 2020 18:01:36 +0200

springboot Actual Warfare Registered filter s and listener s

Application Scenarios There are special processes in your project that require filters and listeners, such as the spring Framework Character Filter CahracterEncoding Filter. code implementation MyFilter.java @WebFilter(urlPatterns = "/*",description = "custom filter") public class MyFilter implements Filter { ...

Posted by PeeJay on Thu, 16 Jul 2020 17:00:45 +0200

Overview of springMVC's ability to download Excel tables

spring provides encapsulation classes for Excel DownloadsOrg.springframework.web.Servlet.view.document.AbstractExcelView, when implemented, simply implement a class that inherits AbstractExcelView, then override the buildExcelDocument(Map<String, Object> model,HSSFWorkbook workbook, HttpServletRequest request,HttpServletResponse respo ...

Posted by conspi on Wed, 08 Jul 2020 17:02:44 +0200

javaSpring uses maven's initial build step java project

1. Modify in maven projectPom.xmlIntroduce dependencies on spring.<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com ...

Posted by rockintyler on Sun, 05 Jul 2020 16:37:42 +0200

Late night overtime boring, imitating an EventBus based on reflection

Dry point By reading this blog, you can learn about java's reflection mechanism and how to use custom annotations to solve everyday R&D problems based on the spring lifecycle. Problem Description In daily R&D, it is common to encounter an action triggered by Business A and at the same time trigger the action of Business B. This form of ...

Posted by rross46 on Mon, 29 Jun 2020 18:57:16 +0200

Pinyougou project notes: SpringBoot and Ali greater than

Notes on pinyougou project (11) SpringBoot introduce Small example (1) Small examples (2) Integration of springboot and activemq Ali greater than SpringBoot introduce springboot is a back-end full stack framework (excluding page technology) produced by spring organization Role: advocate zero ...

Posted by Imad on Mon, 29 Jun 2020 08:00:08 +0200

Spring cloud Part 5: fuse monitoring

Hystrix Dashboard is a real-time monitoring tool for hystrix. Through the Hystrix Dashboard, we can directly see the request response time, request success rate and other data of each Hystrix Command. But if you only use the Hystrix Dashboard, you can only see the service information in a single application, which is obviously not enough. We ne ...

Posted by madhu on Mon, 29 Jun 2020 06:47:29 +0200

Spring cloud Part 6: Spring Cloud Config Github

As distributed projects get bigger and bigger, hardworking programmers will begin to face a challenge, and configuration files will become more and more complicated, although spring provides a chicken rib solution, spring.profiles.active In the large-scale distributed project system, it's better than nothing. The pain of manual maintenance of c ...

Posted by michealholding on Mon, 29 Jun 2020 06:15:03 +0200

Hand in hand to teach you to customize a Druid Filter to record sql, and combine Nacos to realize dynamic switch and judge threshold adjustment

1, Background Durid is a widely used database connection pool, which has superior performance, powerful monitoring mechanism, and also supports expansion through the mechanism of filter. Druid has a StatFilter for slow sql recording, but I found some shortcomings in using it: The print log of this Fi ...

Posted by jonsof on Mon, 29 Jun 2020 04:13:38 +0200

Aop Series III (agent) of spring source sharing

Overall structure For spring AOP Proxy objects, the main task is to create a ProxyFactory, and then create AopProxyFactory to create AopProxy, and then use AopProxy to create the corresponding Proxy. The method call in the Proxy class Proxy created is to call MethodInvocation, which consists of Method ...

Posted by shiggins on Sun, 28 Jun 2020 06:22:28 +0200