Use mybatis in spring boot and test it
1. pom.xmlDetailed POM XML file reference blogger source codeWhere h2's scope can be test.2. Spring boot uses mybatis for database operationWhen using mybatis, you need org mybatis. spring. boot:mybatis-spring-boot-starter:2.1. 3 [compile] dependency.Then create an interface and use the @ Mapper tag. mybatis will search for this tag and parse t ...
Added by sri2002 on Mon, 27 Dec 2021 14:05:50 +0200
SpringBoot: multi data source configuration based on MyBatis
preface
Previously, in the process of using SpringBoot to build background services, we usually access a database and a data source The MQTT service used in the new project needs authentication, but the MQTT service is used by multiple projects, so its authentication database is in a separate database. At this time, we need to configure ...
Added by Dillenger on Mon, 27 Dec 2021 12:20:53 +0200
Spring boot and spring listener mode
Recently, I read the source code of SpringBoot and found a strange phenomenon: there are two places in the project with the function of publishing events. One is the SpringApplicationRunListener interface; The other is the publishEvent method of the ApplicationEventPublisher interface, which is implemented by the ApplicationContext interface. T ...
Added by p_h_p on Mon, 27 Dec 2021 06:02:20 +0200
springBoot integration log4j
What are log4j and log4j2
Log4j: an open source project of Apache, which can control the destination of log information transmission to console, files, GUI components, etc., and control the output format of each log. These can be flexibly configured through a configuration file without modifying the application code. Although the maintenance h ...
Added by leegreaves on Sun, 26 Dec 2021 20:42:44 +0200
Multilingual exception handling usage guide
8-9 initial analysis of multilingual exception architecture This article will explain in the order of program operation, and the methods involved will be explained. At the end, all usage will be sorted out, and the details of possible errors will be listed.
1, Introduction framework
1.1 infrastructure
Exception related
ServiceException... ...
Added by OM2 on Sun, 26 Dec 2021 17:12:56 +0200
Spring Boot data verification of Spring Boot
9, Spring Boot data verification
9.1 what is data verification?
Data verification? Data verification is to make semantic analysis and judgment on the input data in the application, block the data that does not conform to the rules, and release the data that conforms to the rules, so as to ensure that the saved data conforms to our data stora ...
Added by azhan on Sun, 26 Dec 2021 09:53:49 +0200
Compatibility between Maven and IDEA version and configuration
When creating Maven project or SpringBoot project, you need to configure Maven plug-in. It can automatically provide dependencies for us. It only needs a few lines of code to provide the coordinates of the jar package, instead of madly guiding the package and consuming excess memory as before.
There is a compatibility problem between ...
Added by v1ral on Sat, 25 Dec 2021 18:03:57 +0200
Linux deploys Nacos and configures the MySQL data source. Put the Springboot configuration file into Nacos and use it
preface
Yesterday all sorts of strange things were as like as two peas in the nacos tutorial. They found that the nacos tutorial was basically a bit like the same. They were copied and copied, so that you could configure a lot of things. The introduction of dependencies was also a great surprise. Even the official tutorials of the librar ...
Added by hkay1 on Sat, 25 Dec 2021 17:34:16 +0200
Practice blog project
1. Create a springboot project and import the package
Spring boot starter excluding spring boot starter logging
This is the core launcher of Spring Boot, including automatic configuration, logging and YAML.
spring-boot-starter-log4j2
Compared with other log systems, log4j2 loses less data; Under the multithreading environment, the performan ...
Added by Weirdan on Sat, 25 Dec 2021 12:33:48 +0200
After successfully logging in shiro, jump to custom error HTML problem
After successfully logging in shiro, jump to error html
Let's talk about the problem first: in the saas project, after logging in successfully, you jump to error HTML, pause for a while and enter the main page. Tell me about my steps to deal with this problem:
Find out the login process of this page.Causes and timing of problems
According ...
Added by centerwork on Sat, 25 Dec 2021 11:41:48 +0200