navigation

[react] Hooks

[React from zero practice 01- background] code split [React from zero practice 02- background] permission control [React from zero practice 03- background] custom hooks [React from zero practice 04- background] docker-compose Deploy React + Egg +nginx+mysql [React From zero practice 05- background] Gitlab-CI using Docker automated deployment

[source code – Webpack01 – precompiler] AST abstract syntax tree [source code – Webpack02 – Precompiler] Tapable [source code – Webpack03] hand written webpack-compiler simple compilation process [source code] Redux React-redux01 [source] Axios [source] vuex [source -vue01] Data reactive and initialize render [source -vue02] Computed responsive – Initialize, access, Update Procedure [source -vue04] Watch Listening properties – Initialize and update [source -vue04] vue. set and vm.$set [source -vue05] vue.extend

[source -vue06] Vue. NextTick and VM.$nextTick [Deployment 01] Nginx [Deployment 02] Docker deployVUE project [Deployment 03] Gitlab-CI

[Data Structures and Algorithms 01] Binary search and sort

[Deep 01] Execution context [Deep 02] Prototype chain [Deep 03] Inheritance [Deep 04] Event loop [Deep 05] Curri Bias function [Deep 06] Function memory [Deep 07] Implicit conversions and operators [Deep 07] Browser caching mechanism (HTTP caching mechanism) [Deep 08] Front-end security [Deep 09] Deep copy [Deep 10] Debounce Throttle [Deep 10] Front-end routing [Deep 12] Front-end modularization [Deep 13] Observer mode Publish subscribe mode Bidirectional data binding [Deep 14] Canvas [Deep 15] webSocket Webpack HTTP and HTTPS CSS- Interview Handwriting Promise Data Structures and Algorithms – Binary Search and Sorting Js Design Patterns – Agents, policies, singletons

/ front-end learn java01 – SpringBoot combat environment configuration and the HelloWorld service [front-end learn java02 – SpringBoot combat] mybatis + mysql implementation song to add and delete [front-end learn java03 – SpringBoot combat] Lombok, log, deployment [front-end science Java04 -SpringBoot combat] static resources + interceptor + front and back end file upload [front-end science Java05 -SpringBoot combat] common annotation + Redis to achieve statistics function

(1) Pre-knowledge

(1) Some words

// Create archetype from archetype // create conditional conditions against archetype // // Spring Framework => Spring Framework External // External librariesCopy the code

(2) Default error resolution for SpringBoot

  • inSRC/main/resources/templates/error / 4 xx. HTML or 5 xx. HTML will automatically be parsed
    • 1. Can beresources/templatesUnder the file
    • 2. You can also use the static resource folderResources/static | public | resources | meta-inf, resources, etc
  • Will return when access does not exist the page templates/error / 4 5 xx xx | page

(3) Java basic data types

  • Java provides eight basic typesFour integer types Two floating point character The Boolean
  • Four integer types
    • Byte an 8-bit
    • Short 16
    • Int 32-bit => 4 bytes
    • Long 64-bit => 8 bytes
  • Two floating point
    • float
    • double
  • character
    • char
  • The Boolean
    • boolean
  • Properties:SIZE TYPE MIN_VALUE MAX_VALUE

(4) Java reference types

  • The default value for all reference types is NULL
  • A reference variable can be used to refer to any compatible type

(5) a constant final

  • Constants are usually capitalized
Final double PI = 3.1415927;Copy the code

(6) Automatic type conversion

int i = 128;   
byte b = (byte)i;
Copy the code

(7) The difference between List and ArrayList

List<SomeObject> myList = new ArrayList<SomeObject>(); ArrayList<SomeObject> myList = new ArrayList<SomeObject>(); (1) List is an interface, which does not implement any properties or methods. If you call a method on the List, you are actually calling the method of ArrayList. (2) List is an interface, which requires the implementation class, such as ArrayList (3). Array Array uses subscripts to get its elements, List is initialized with GET (4) : Array Array must specify its size, which is not flexible. List can be expanded to its own size, convenientCopy the code

(8) IOC AOP

  • IOC Inversion of Control/dependency Injection= >Creation of an instantiated Bean object
  • AOP Aspect oriented programming= >A dynamic proxy
  • Spring JDBC + transactions



(2) Commonly used SpringBoot annotations

(1) @RestController

  • @RestController = @Controller + @ResponseBody
  • The characteristics of
    • Method in the Controller class after the annotation is addedUnable to return to page.
    • It’s automatically added to the method@ResponseBodyComment, soThere is no way to jump and pass data to another page
    • This is what the return meeting is aboutreturnThe content of the

(2) @GetMapping @PostMapping @PutMappiing @DeleteMapping

(3) @PathVariable @CookieValue @RequestHeader @ReqeustAttribute @RequestParam @RequestBody @MatrixVariable

  • @pathVariable Gets path variables in RESTful urls
// Test request // Test @pathVariable // Test @cookievalue // Test @requestheader => compare @requestParam @requestBody @RequestPart / / test @ RequestParam @ RequestAttribute / / / / @ RequestBody / / testing URL: http://localhost:7777/car/1/owner/woow_wu7? age=20&city=chongqing @GetMapping("/car/{id}/owner/{username}") public Void getPath( HttpServletRequest request, @PathVariable("id") int id, @PathVariable("username") String username, @PathVariable Map<String, String> pathVariable, // @CookieValue("name") String name, @RequestHeader("User-Agent") String userAgent, @RequestHeader Map<String, String> headers, @RequestParam("age") int age, @RequestParam Map<String, String> params // @RequestBody String body // @RequestAttribute("message") String message ) { log.info("@PathVariable('id') => id:{}, username: {}", id, username); Log.info (" @pathVariable Map<String, String> => Can use a Map object to receive all path variables => pv: {}", PathVariable); String tempId = pathVariable.get("id"); // Map instance has (map.get) (map.put) method system.out.println (tempId); log.info("@RequestHeader('User-Agent') => User-Agent: {}", userAgent); log.info("@RequestHeader Map<String, String> => headers: {}", headers); log.info("@RequestParam Map<String, String> => params: {}", params); // log.info("@CookieValue('name') => name: {}", name); // log.info(" @requestBody String body => get the body of the POST request, or a Map instance, @requestBody Map<String, Object> body ====> body{}", body); request.setAttribute("message", "success"); log.info("request: {}", request.getAttribute("message")); return null; }Copy the code

(4) @Configuration class annotation + @Bean to register components with the container

  • @Configuration=> can be understood as in XMLbeansThe label
    • Function: tells SpringBoot that the annotated class is aThe configuration class
    • Note: @configuration annotationConfiguration classes are components themselves
    • Parameters:@Configuration(proxyBeanMethods = true)
  • @Bean=> can be understood as in XMLbeanThe label
    • Function:Add a component to the container, and the added component is (single instance)
    • Component ID: YesThe method name
    • Return type: i.eType of component
    • Return value: isAn instance of a component in a container
    • @bean (component name) => @bean () parameter can rename the component name instead of the method name
(1) /src/main/java/com.example.demo/config/PetConfig.java ------- // 1. // 2. @configuration specifies a Configuration class, which is itself a component. // 3. If @configuration (proxyBeanMethods = true // 4), then @configuration (proxyBeanMethods = true // 4). @configuration (proxyBeanMethods = false) @configuration (proxyBeanMethods = false) @configuration (proxyBeanMethods = false) Public class PetConfig {@bean // register the component in the container => @bean (pet02) Public PetBean pet01() {return new PetBean("dog", "white"); }}Copy the code
(2) Problem: How do I verify that the component is registered with the container? Answer: can view in the main class, for the Lord by IOC can be run in class. GetBeanDefinitionNames () to get to the component of an array of problems: if the access to the component in to the container? Answer: run.getBean to get the specific code: @springBootApplication public class Application {public static void main(String[] args) {// 1. Return the IOC container // 2. Inversion of control and dependency injection ConfigurableApplicationContext run = SpringApplication. Run (Application. Class, args); / / 3. Check the container component String [] beanDefinitionNames = run. GetBeanDefinitionNames (); for (String name : beanDefinitionNames) { System.out.println(name); UserX UserBean userX1 = run.getBean("userX", userBean.class); UserBean userX2 = run.getBean("userX", UserBean.class); Println (" component: "+ (userX1 == userX2)); system.out.println (" component:" + (userX1 == userX2)); System.out.println(" true because registered components are singleton by default, and @bean registers components with the container as singleton "); Pet01 = run.getBean("pet01", petbea.class); // 3. System.out.println(pet01.getName()); // Get the name attribute in the pet01 object}}Copy the code

(5) @ConditionalonBean Conditional assembly annotation

  • ConditionalOnBean(name) indicates that the (@ConditionalonBean) component is added to the IOC container only if (name component) exists in the IOC container, and not if (name component) does not exist
  • ConditionalOnBean(name) ConditionalOnBean(name) ConditionalOnBean(name) ConditionalOnBean(name) ConditionalOnBean(name) ConditionalOnBean(name) ConditionalOnBean(name) ConditionalOnBean
  • Generally, there are a lot of various conditions in the scenario initiator annotation, condition judgment
  • In the IOC
    • 1. Prioritize parsing@Component, @Service, @Controller, @mapperSuch as annotation class
    • 2. Parse the configuration class again, that is@ConfigurationMark of class
    • 3. Finally parse the configuration class@Bean
@ Configuration / / @ ConditionalOnBean (name = "com. Example. Demo. Beans. ImportBean") if the annotation on the class, Said all @ Bean effect is the premise of the container has com. Example. Demo. Beans. Public ImportBean component class TestConditionalOnBeanConfig {/ / ConditionalOnBean(name) indicates that the (@conditionalonBean) component is added to the IOC container only when (name component) is present in the IOC container. // @conditionalonbean (name); // @conditionalonbean (name); // @conditionalonbean (name); // @conditionalonbean (name); @component, @service, @Controller, @mapper, etc. // -2. Then resolve the Configuration class, that is, the '@configuration' annotated class // -3. Finally parsing configuration class defined in the ` @ Bean ` @ ConditionalOnBean (name = "com. Example. Demo. Beans. ImportBean") @ Bean (" @ ConditionalOnBean ") to the public TestConditionalOnBeanBean registerConditionalOnBean() { return new TestConditionalOnBeanBean("@ConditionalOnBean"); }}Copy the code

(5) @import Adds components to the container

  • @Import and @bean are similar in that they add groups to the container
  • Syntax: @import ({class name.class, class name.class… })
  • Component name: @import Component name in the Import container defaults to (Full name of the class )
  • Note:
    • @import () must be used on the component class, which must be in the SpringBoot IOC container
    • @import () can be used on components like @config, @controller, and @service
    • @import () can Import third-party packages
SRC/main/Java/com. Example. The demo/config/PetConfig. Java -- -- -- -- -- -- -- / / @ Import / / 1. @ Import and @ Bean works in a similar way, // 2.@import Import components in the container are named by default (' full class name ') @import ({userbean.class, Petbean.class}) @configuration (proxyBeanMethods = true) Public class PetConfig {@bean // register the component in the container => @bean (pet02) Public PetBean pet01() {return new PetBean("dog", "white"); }} / above/print / / @ Import add components to the container name is: com. Example. Demo. Beans. PetBean / / @ bean to add container component name is: pet01Copy the code

(6) @ImportResource adds components configured in traditional XML files to the container

  • @ImportResource("classpath:beans/beans.xml")
    • Parameters:classpath:beans/beans.xmlRepresents theConfigure the file path for the component beans.xml
    • Specific:beans.xmlIs placed on thesrc/main/resources/beans/beans.xml
(1) src/main/java/com.example.demo/config/PetConig.java ------- // @ImportResource // 1. @ImportResource("classpath:beans/beans.xml") // 2. Parameters: ` classpath: beans/beans. XML ` represents ` configuration component beans. The XML file path ` / / 3. Specific: ` ` beans. XML is placed on the ` SRC/main/resources/beans beans. XML ` @ Import ({the UserBean class, Petbean.class}) @configuration (proxyBeanMethods = true) In the XML beans beans label @ ImportResource (" classpath: beans/beans. XML ") public class PetConfig {@ bean / / registered components = > with the container, Public PetBean pet01() {return new PetBean("dog", "white"); }}Copy the code
(2) src/main/resources/beans/beans.xml ------- <? The XML version = "1.0" encoding = "utf-8"? > <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> <! --UserBean--> <bean id="haha" class="com.example.demo.bean.UserBean"> <property name="name" value="zhangsan"></property>  <property name="age" value="20"></property> </bean> <! --PetBean--> <bean id="hehe" class="com.example.demo.bean.PetBean"> <property name="name" value="dog"></property> <property name="color" value="red"></property> </bean> </beans>Copy the code

(7) @ConfigurationProperties + @Component Implements configuration bindings

  • @ConfigurationProperties(prefix = "myapp")
  • @Compoennt:Is used to add class components to the container
(1) src/main/java/com.example.demo/bean/AppMessageBean.java ------- // 1. Only components in a container can get the power of SpringBoot, so to use @ConfigurationProperties() you must mark the object as a container Component with @Component. // 2. The bean object tests the @ConfigurationProperties and @Component annotations // 3. If the class has more properties than myApp in the application.yml file, ConfigurationProperties(prefix ="myapp") // prefix="myapp" the value of this prefix is in application.yml Public Class AppMessageBean {private String name; private String email; private String author; private String other; }Copy the code
(2) the SRC/main/resources/application. The yml -- -- -- -- -- -- -- myapp: # custom configuration parameters, mainly used to verify here @ ConfigurationProperties annotations using an author: woow_wu7 name: react-admin-java email: [email protected]Copy the code
(3) src/main/java/com.example.demo/controller/TestController.java ------- @Autowired AppMessageBean appMessageBean; // (1) // Test the @ConfigurationProperties and @Component annotations.  https://www.cnblogs.com/jimoer/p/11374229.html @GetMapping("/@ConfigurationProperties") public AppMessageBean getAuthorName() { System.out.println(appMessageBean); String author = appMessageBean.getAuthor(); System.out.println(author); return appMessageBean; }Copy the code

(8) @SpringBooTtest + @test Unit Test

  • 1. Introduce the Maven scenario initiatorspring-boot-starter-test
<! -- spring-boot-starter-test --> <! <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency>Copy the code
  • 2. Compile a test class
src/test/java/com.example.demo/ApplicationTests.java
-------
@SpringBootTest
class ApplicationTests {
	@Test
	void contextLoads() { dosomething...}
}
Copy the code

(3) Two ways to change the version number of Maven dependency packages

In mysql, for example

(1) Specify the version tag in pom.xml (based on Maven’s proximity dependency principle)

< the dependency > < groupId > mysql < / groupId > < artifactId > mysql connector - Java < / artifactId > < version > 8.0.21 < / version > <scope>runtime</scope> </dependency>Copy the code

(2) Use the properties tag in the POM.xml to modify (the principle is the nearest priority of Maven properties).

< the properties > < Java version > 1.8 < / Java. Version > <! You can also change the dependent version number in properties --> <! . -- < mysql version > 8.0.21 < / mysql version > -- > < / properties >Copy the code

(4) Data access

(1) Mysql driver + JDBC database connection pool = SpringBoot the most basic way to operate mysql

  • On this basis, you can add MyBatis to operate the database
  • 1. Install the mysql driver => mysql-connector-java
  • 2. Install the JDBC database connection pool => spring-boot-starter- data-JDBC(Distinction: spring-boot-starter- JDBC)
  • 3. Configuration items: Spring. Datasource…
  • 4. Data source: HikariDataSource
spring: datasource: # 1. If you have installed (mysql driver) and (JDBC database connection pool) Mysql-connector-java # 3. JDBC connection pool => spring-boot-starter- JDBC # 4. A step further: you can also use (Druid + MyBatis) data source url: JDBC: mysql: / / localhost: 3306/7 - the react - admin - Java? serverTimezone=GMT%2B8&useSSL=false username: root password: root dirver-class-name: com.mysql.cj.jdbc.Driver jdbc: Template: query-timeout: 10Copy the code
  • 4. Use the JdbcTemplate in the springBoot container to manipulate the database (unit testing)
src/test/com.example.demo/ApplicationTests.java ------- @SpringBootTest @Slf4j class ApplicationTests { @Autowired JdbcTemplate jdbcTemplate; / / automatic injection container JdbcTemplate @ the Test of void contextLoads () {Long aLong. = JdbcTemplate queryForObject (" select count (*) the from music", Long.class); // Operate the database log.info("music total data: {}", aLong); }}Copy the code

(2) HikariDataSource and Druid data sources => Filter Druid data sources

(五) Redis

Redis is an open source (in memory) (data structure storage system) that can be used as (database) (cache) (message middleware)

(1) Import maven dependency packages, namely redis scenario initiators

<! -- redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>Copy the code

(2) Check springBoot autoconfigure for redis.

  • Directory:External Libraries/spring - the boot - autoconfigure: / data/redis/RedisAutoConfiguration 2.4.2. Java
  • External means external
  • External Libraries is an extension of a class library
  • RedisAutoConfiguration.java (1)
    • Redis autoconfiguration:
      • @EnableConfigurationProperties(RedisProperties.class) (2)
      • spring.redis.xxx (3)
      • RedisAutoConfiguration. Java = > @ EnableConfigurationProperties (RedisProperties. Class) = > spring. Redis. XXX is the redis configuration, In other words, you can configure redis in application.yml, such as spring.redis.xxx
    • Connection factories are ready (both)
      • Lettuce => LettuceConnectionConfiguration
      • Jedis => JedisConnectionConfiguration
    • Operating redis
      • The following two component classes are automatically injected
      • RedisTemplate<Object, Object>
        • key: value
        • Compare the JdbcTemplate
      • StringRedisTemplate
        • Key and value are both strings

(3) Apply for a Redis server of Aliyun, and apply for the REDis public network address, and set the whitelist, user permission (read and write), etc







(4) Download and install Redis and redis client

  • Download link
  • Redis download the installation tutorial
  • Windows Redis client download connection
  • Redis Common commands
  • The use of redis
    • 1. After the installation is complete on a Windows OPERATING system, double-click the decompressed directoryredis-cli.exerun
    • 2. You can also open CMD in the folder and enter CMD./redis-cli.exeThe command
  • Redis Common commands
    • Obtaining read and write Permissions
      • auth username:password
      • auth password
    • Whether to disable Redis
      • config set disable [yes|no]
    • Query the default password (it can only be operated after login)
      • config get requirepass
    • Change password (can only be operated after login)
      • config set requirepass 123456
    • Log in redis
      • ./redis-cli -p 6379 -a 123456
    • Start the service
      • ./redis-server –service-start
    • Stop the service
      • ./redis-server –service-stop
    • string
      • set key valueSet the key value
      • get keyAccess to the key value
      • del keyThe delete key value
      • mget key1Key2 is obtained simultaneously
      • exists keyCheck whether the key exists
    • list= >Is a linked list
      • lpush key value1 value2Insert all values in the header of the list associated with the key
      • rpush key value1 value2Insert all values in the header of the list associated with the key
      • lrange key start endGet the values of the elements from start to end in the key list. Start and end can be negative values. If the value is -1, it indicates the elements at the end of the list
      • lpushx key valueLeftpush only happens when the key is present, and if you don’t add x, it will be created
      • lpop keyReturns and pops the first element, the header element, in the list associated with the specified key
    • set= >It’s an array plus a linked list
      • sadd key value1 value2Add data to a set without adding l ‘again if the value of the key already exists
      • smembers keyGets all members of a set
      • scard keyGets the number of members in a set
      • Srem key Member1 and member2Deletes the specified member in the set
    • zset
      • Each member of a Zset is associated with a score, which is used by Redis to sort the members of the set from smallest to largest
      • zadd key score member score2 member2All members and their scores are stored in a sorted-set
    • hash
      • The Hashes type in Redis can be viewed as a map with a String Key and a String Value, so it is suitable to store information about objects whose values are such as username
      • hset key fild valueSets a field/value pair for the specified key
      • hgetall keyObtain all filed- vaules in the key

(5) Configure redis in application.properties or applicatioin.yml

spring: redis: # can pass (external libraries)/spring - the boot - autoconfigure: / data/redis / 2.4.2 RedisAutoConfiguration RedisProperties/url to view the # url = redis://user:[email protected]:6379 host: r-bp1z4zrytbuyv7mkuzpd.redis.rds.aliyuncs.com port: 6379 password: woow_wu7:ALy123456789Copy the code

(6) Test reading and writing redis in springBoot test class

src/test/java/com.example.demo/ApplicationTests.java
-------

	@Autowired
	StringRedisTemplate stringRedisTemplate;

	@Autowired
	RedisTemplate redisTemplate;
    
	@Test
	void testRedis() {
		ValueOperations<String, String> stringStringValueOperations = stringRedisTemplate.opsForValue();
		stringStringValueOperations.set("redis", "ok"); // string set
		String redis = stringStringValueOperations.get("redis"); // string get
		log.info("redis: {}", redis);
	}
Copy the code

(7) Switch from Lettuce to Jedis

  • Springboot uses Lettuce by default, how to switch to Jedis
(1) Import dependencies <! -- jedis --> <! SpringBoot uses Lettuce by default, <groupId> <artifactId>jedis</artifactId> </dependency> (2) --> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> </dependency> Modify the redis configuration: # can pass (external libraries)/spring - the boot - autoconfigure: / data/redis / 2.4.2 RedisAutoConfiguration RedisProperties/url to view the # url = redis://user:[email protected]:6379 host: r-bp1z4zrytbuyv7mkuzpd.redis.rds.aliyuncs.com port: 6379 password: woow_wu7:ALy123456789 client-type: Jedis # 2, default is Lettuce (3) test @autowired RedisConnectionFactory RedisConnectionFactory; @Test void testRedis() { ValueOperations<String, String> stringStringValueOperations = stringRedisTemplate.opsForValue(); stringStringValueOperations.set("redis", "ok"); String redis = stringStringValueOperations.get("redis"); log.info("redis: {}", redis); / / print redis connection factory is with Lettuce or jedis the info (String) the valueOf (redisConnectionFactory. GetClass ())); }Copy the code

(8) To achieve a small function => count the number of visits to each URL

  • After SpringBoot connects to Redis
  • The principle of
    • 1. Through the InterceptorinterceptExcept login, static resourcesAll requests for
    • 2. Implement a front hook for the HandlerInterceptor interface in the interceptorpreHandlemethods
    • 3. Obtain the automatic injection in the preHandle methodStringRedisTemplateopsForValue()increment()Methods To achieve statistics
    • 4. The redis = >Increment (URL) method, key= URL, value= count
    • 5. Interceptor passes@ComponentAdded to the container, implemented in the configuration classWebMvcConfigurerOf the interfaceaddInterceptorsMethod to implement interception
  • The detailed steps
(1) the SRC/mian/Java/com. The example. The demo/interceptor/RedisUrlCountInteceptor Java -- -- -- -- -- - / * * * interceptor and the Filter has the same function * 2.Interceptor: * 1.filter: is a native component defined by servlets and can be used outside spring. Is an interface defined by Spring and can only be used in Spring. Public class RedisUrlCountInterceptor implements HandlerInterceptor public class RedisUrlCountInterceptor implements HandlerInterceptor { @Autowired StringRedisTemplate stringRedisTemplate; PreHandle @override public Boolean preHandle(HttpServletRequest Request, HttpServletResponse response, Object handler) throws Exception { String requestURI = request.getRequestURI(); / / stringRedisTemplate opsForValue (). The increment (url) = > this method each time to access the address, Url count will be + 1 stringRedisTemplate. OpsForValue (). The increment (requestURI); return true; }}Copy the code
(2) the SRC/main/Java/com. The example. The demo/config/AdminWebConfig Java -- -- -- -- -- - / * * * * 1 interceptor. Write an interceptor that implements the HandlerInterceptor interface * 2. Register interceptors in the container (implement the addInterceptors method of the WebMvcConfigurer interface) * 3. If all resources are intercepted, static resources will also be intercepted. Can be released by excludePathPatterns 】 * / / / @ the Configuration used to define the class (Configuration) @ Configuration @ EnableConfigurationProperties public Class AdminWebConfig Implements WebMvcConfigurer {// The RedisUrlCountInterceptor class is registered to the container via @compoent. @autowired RedisUrlCountInterceptor RedisUrlCountInterceptor; // @override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(redisUrlCountInterceptor) .addPathPatterns("/**") .excludePathPatterns("/", "/login", "css/**", "/fonts/**", "/images/**", "/js/**"); }}Copy the code

Program source code

  • Program source code
  • Online access to address – song additions and deletes to check