Spring boot local cache (guava and caffeine)

1. Scene description Because the project needs to use local caching, specifically why not redis, etc., do not discuss, record the process, hoping to help needy friends. 2. Solutions 2.1 Use guava as a local cache The initial idea is to use guava, because there is guava's denpency in the project itself. 2.1.1 pom file Three dependencies are req ...

Posted on Sat, 12 Oct 2019 00:22:20 -0700 by pfdesigns

Spring Framework Learning Notes - SSM Integration and Maven Custom Template Creation

Spring+Spring MVC+MyBatis+Maven The core of SSM integration is Spring+MyBatis integration. Looking back on MyBatis operation database process, we use a SQL Session Factory object to get the SQL Session, and then CRUD operation. Now, with spring, we load and manage the SQL Session Factory through spring. If you want to use it directly, please go ...

Posted on Fri, 11 Oct 2019 22:44:20 -0700 by NArc0t1c

Spring MVC Source Analysis

I. Analysis of Processing Processes 1. First of all, Tomcat loads and parses the / WEB-INF/web.xml file every time it starts up, so you can find a breakthrough from web.xml. The main code is as follows: <servlet > <servlet-name >spring-mvc</servlet-name> <!-- servlet class --> <servlet-class >org. ...

Posted on Thu, 10 Oct 2019 23:51:20 -0700 by the_ut_tick

2. Resolution Default Label of Spring Source Analysis 2

1. Resolving default labels parseDefaultElement(ele, delegate); void parseDefaultElement(Element ele, BeanDefinitionParserDelegate delegate) { //Parsing import Tags if (delegate.nodeNameEquals(ele, IMPORT_ELEMENT)) { importBeanDefinitionResource(ele); } //Parsing alias Tags else if (delegate.nodeNameEquals(ele, ALIAS_ELEME ...

Posted on Thu, 10 Oct 2019 12:40:09 -0700 by dflow

Spring Cloud Upgrade

Upgrade related project components: eureka-server registry config-server configuration center zipkin-server link tracking admin-server monitoring center gateway-service gateway user-server user service uaa-service authorization center log-service log Center client-server business service <java.version>1.8</java.version> from Spri ...

Posted on Thu, 10 Oct 2019 12:29:49 -0700 by natasha_thomas

Java Agent, the Key Technology of Java Call Chain Tracking

I. Java agent There are many introductions about Java agent on the internet. Please find Du Niang and Gu Brother. The only point to mention is that byte code injection is more useful than byte buddy, which is highly encapsulated and easy to use. Code Samples The following is a sample of key code that can be adapted by itself. 1. Writing agent ...

Posted on Thu, 10 Oct 2019 10:02:34 -0700 by jwer78

Various uses of @Import in Spring and ImportAware interface

@ Import annotation @ Import annotations provide functionality equivalent to <import/> elements in XML to implement one or more configuration classes imported. @ Import can be used either as a class or as a meta-annotation. @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Import { /** * ...

Posted on Thu, 10 Oct 2019 01:36:05 -0700 by benjrox

Spring Boot Cache Actual EhCache

Spring boot uses SimpleCacheConfiguration by default, even using Concurrent MapCache Manager to implement caching. But switching to other cache implementations is also simple. pom file Introducing corresponding jar packages into pom <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifact ...

Posted on Wed, 09 Oct 2019 20:14:25 -0700 by judgy

Principle of SpringBoot Health Examination

I believe that all the students who read the previous article know the routine of SpringBoot automatic assembly. Look directly at the spring.factories file. When we use it, we only need to introduce the following dependencies. <dependency> <groupId>org.springframework.boot</groupId> <artifact ...

Posted on Wed, 09 Oct 2019 19:30:08 -0700 by fantomel

Use of Page Helper in MyBatis

Use of Page Helper in MyBatis A brief introduction to PageHelper Simple use of PageHelper Step 1: Import dependencies in pom.xml Step 2: Configure the interceptor plug-in in Spring's configuration file Step 3: Use Call PageHelper.startPage static method before you need to paginate MyBatis query meth ...

Posted on Wed, 09 Oct 2019 19:09:45 -0700 by dvt85