Maven project configuration Logback outputs JSON format logs
Recently, the project put forward the requirement that the log output be fixed in JSON format for back-end Flink program parsing.
Project background
The project is a simple Maven project. Logs are collected by Filebeat, so there is no need to configure output to Logstash.
Below is the dependency configuration in the pom.xml file, where logstash ...
Posted by loveitandhateit on Thu, 03 Oct 2019 17:23:58 -0700
MyBatis-14 Interface Binding Scheme and Multi-parameter Transfer
Interface Binding Scheme
Effect
After creating an interface, the implementation class of the interface is generated by mybatis. By calling the interface object, the sql written in mapper.xml can be obtained.
Note: This solution is used in the later integration of mybatis and spring
Implementation ...
Posted by CoderGoblin on Thu, 03 Oct 2019 16:13:44 -0700
Handwritten SSM Add/Delete Change Framework Set
1. Create entity classes
lombok-1.18.4.jar: (guide, short for pepper) used to simplify the code with annotations instead of get set accessors, with and without parameters, toString method.
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Emp {
private int eid;
private String ename;
private ...
Posted by EdN on Thu, 03 Oct 2019 08:06:40 -0700
Spring Boot operation principle - Case Analysis (HttpEncodingAutoConfiguration)
After understanding the operation principles and main notes of Spring Boot, we will now briefly analyze the built-in configuration function of Spring Boot: the coding configuration of http.
When we configure Http coding in regular projects, we add a filter to web.xml, such as:
<filter>
<filter-name>CharacterEncodingFilter</filte ...
Posted by KFC on Thu, 03 Oct 2019 07:58:14 -0700
spring-boot-plus V1.2.2 release, 5 Minutes Finish CRUD
Update Log CHANGELOG
[V1.2.2-RELEASE] 2019.08.26 🏇
⭐️ New Features
Interceptor Enables Disabled Configuration
File upload and download security/privilege control
Enable logback.xml log configuration
⚡️ Optimization
Change core package directory
Download Upload Interceptor
logback.xml displays line numbers
application.yml Interceptor Con ...
Posted by cavendano on Thu, 03 Oct 2019 07:42:24 -0700
mybatis Details - Dynamic sql_Common Label Details
IF Tags
Problems arising from the non-use of if tags
Dynamic splicing sql is realized by various tag methods provided by mybatis.
Demand: user enquiry based on gender and name
Query sql:
SELECT id, username, birthday, sex, address FROM user WHERE sex = 1 AND username LIKE'% Liu%'
<!-- Query users b ...
Posted by RamboJustRambo on Thu, 03 Oct 2019 03:45:27 -0700
10 Public Number Development - Concern/Cancel Concern Events
When the user is concerned about and cancels the public number, he will push the event to the developer's URL.
If the server fails to respond within five seconds, the connection will be broken, and the request will be restarted, and a total of three tries will be repeated.
If the server can not guarante ...
Posted by zipp on Wed, 02 Oct 2019 23:26:57 -0700
springboot is packaged as war and deployed to tomcat container
Step 1: Modify pom.xml to increase <packaging>war</packaging>
Step 2: Remove the tomcat component
<!-- spring boot web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!--Remove Em ...
Posted by duankr on Wed, 02 Oct 2019 09:23:57 -0700
StatusBar Loading Process of Android P System UI
Related source code:
\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\StatusBar.java
\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\StatusBarWindowManager.java
\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\StatusBarWin ...
Posted by luketheduck on Wed, 02 Oct 2019 08:15:10 -0700
Hibernate Framework of Java Framework
What is a framework?
Answer: Semi-finished projects that can complete some functions
JavaEE Three-tier Architecture
Web
Service
Dao
The 5 framework:
SSH: Spring + Struts2 + Hibernate
SSM: Spring + SpringMVC + MyBatis
hibernate is an orm framework
orm:object relation mapping. Object relation mapping
orm ...
Posted by pmt2k on Wed, 02 Oct 2019 04:12:34 -0700