Scan annotator in Spring

Scan annotator in Spring 1. Configure xml file The code is as follows: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLo ...

Posted by SecureMind on Thu, 30 Apr 2020 21:05:38 -0700

Conditional note for spring-boot Underlying exploration

stay Previous We talked about the implementation of conditional annotations.Finally, there's the question, "Why doesn't spring inject beans into classes that use conditional annotations when conditions don't work?"With this in mind, today we'll look at the spring-boot startup process in which our beans are injected with conditional an ...

Posted by Dj_Lord on Thu, 30 Apr 2020 18:33:50 -0700

Set up the ssm framework to realize login, data display, addition, deletion, modification and query

Requirements: Use ssm (spring spring MVC mybatis) for integration in the background Using bootstrap framework in the foreground Using Ajax to send between front and back Table structure:   After login, all user information will be displayed, and each can be added, deleted, modified and checked The user name and user PWD of this table are also u ...

Posted by esmarts on Thu, 30 Apr 2020 11:55:03 -0700

To add a database to a Java project

1. Add code to create database (similar to SQL statement) Add init schema.sql database syntax creation file to test resource file 2. Adding database in POM file depends on MySQL connector Java and mybatis spring boot starter <!--Add database dependency--> <dependency> <groupId>mysql</groupId> ...

Posted by sergio-pro on Thu, 30 Apr 2020 10:00:21 -0700

Spring Boot Aspect Aop thought

Spring Boot Aop Scope of Aspect Comment writing of interception rules Writing configuration file Aopconfig The compilation of add operation of comment interception Operation writing of add intercepted by method The writing of logAspect facet Writing of Main Operation results Scope of Aspect In o ...

Posted by rocky on Wed, 29 Apr 2020 21:17:19 -0700

Spring boot log Foundation

Springboot configuration log configuration file location logging.config: classpath:logging/logback.yml Spring boot log classification log4j: an open source log component implemented by apache logback: it is also designed by the author of log4j. It has better features. It is a log framework used to replace log4j and is the native implementation ...

Posted by aris1234 on Tue, 28 Apr 2020 19:41:38 -0700

Spring Boot + Spring Security for automatic login

Automatic login is a very common function in software development. For example, we log in to QQ email: Many websites will see similar options when we log in. After all, it's a very troublesome thing to let users enter their user name and password. The automatic login function is that after the user logs in successfully, if the user closes the ...

Posted by mentalist on Tue, 28 Apr 2020 19:02:09 -0700

High concurrency scenario - Request merging uncover HystrixCollapser - asynchronous implementation with Queue and thread pool

background In the high concurrency scenario of the Internet, there will be a lot of requests, but the database connection pool is relatively small, or the CPU pressure and processing logic need to be reduced. It is necessary to change a single query to batch query multiple and return. For example, in Alipay, query "personal information&quo ...

Posted by joebudden on Tue, 28 Apr 2020 00:59:13 -0700

Several ways to register Spring Bean

All roads lead to dragons and horses Premise: please https://blog.csdn.net/dong19891210/article/details/105697175 In case of Spring bean s can be registered in the following ways: 1. Register through GenericBeanDefinition Example code: Message helper class public class Message { private String message; public String getMessage() { retu ...

Posted by mahaguru on Mon, 27 Apr 2020 21:21:30 -0700

13. Spring cloud Alibaba Chapter 13, upgrade, service registration and configuration center Nacos

Spring cloud Alibaba Chapter 12, upgrade, service registration and configuration center Nacos 1, Why spring cloud Alibaba 1. Why With the micro service framework of spring cloud, why do you want to use the framework of spring cloud alibaba? The most important reason is spring Almost all components in the cloud use Netflix products, and ...

Posted by Liz_SA on Mon, 27 Apr 2020 20:09:31 -0700