The transformation of Spring REST API from entity to DTO
introduce
In this article, we will deal with the transformations that need to be done between the internal entities of Spring applications and DTO s (data transfer objects) outside the client.
Model mapping
Let's start by introducing the main library of entity to DTO transformation for execution - ModelMapper.
We need to add the following depen ...
Posted by boardy on Mon, 11 Nov 2019 02:09:34 -0800
Mybaits Source Parsing - One of the most detailed web-wide: Spring-Mybatis framework use and source parsing
In the previous articles, we mainly analyzed the separate use of Mybatis. In practice, most of the common project development uses mybatis in conjunction with Spring. After all, few projects are developed without Spring.This article describes how Mybatis works with Spring and how its source code is implemented.
Spring-Mybatis uses
Add maven dep ...
Posted by Judas on Sun, 10 Nov 2019 19:50:08 -0800
Object Factory for Mybatis
Preface
Above How Mybatis XML maps to methods When you talk about result mapping in Mybatis, you need to create objects and assign values to their attributes. To create objects, you use Mybatis's built-in object factory class, DefaultObjectFactory. Of course, Mybatis also provides an extension mechanism that allows users to implement their own ...
Posted by spider on Sun, 10 Nov 2019 17:52:52 -0800
7-5 development after deleting commodity category and acquisition of currentShop
I. dao level
1. Develop dao interface
public interface ProductCategoryDao {
/**
* Delete specified product category
* @param productCategoryId
* @param shopId
* @return effectedNum
*/
int deleteProductCategory(@Param("productCategoryId") long productCategory,@Param("shopId") long shopId);
}
2. Develop mapper impleme ...
Posted by ralph4100 on Sat, 09 Nov 2019 10:28:35 -0800
idea debugging opentsdb source code
Reference resources: https://blog.51cto.com/1196740/2394289?source=dra
Catalog
Download source code:
Compile and pack
Modify file directory
Modify opnetsdb.conf
Running TSDMain
Download source code:
git clone https://github.com/OpenTSDB/opentsdb.git
Compile and pack
To build the pom.xml configuration file:
[root@Mac ...
Posted by makoy on Sat, 09 Nov 2019 07:11:06 -0800
10. BeanFactory Source Code Analysis of Spring
BeanFactory Source Code Analysis for Spring (2)
Preface
In the previous section, we briefly analyzed the structure of BeanFactory, ListableBeanFactory, HierarchicalBeanFactory, AutowireCapableBeanFactory.DefaultListableBeanFactory, the main core class, gradually separates BeanFactory's functionality by programmatically starting the IOC containe ...
Posted by Jaguar83 on Sat, 09 Nov 2019 00:45:06 -0800
How Mybatis's method maps to XML
Preface
Above How the Mapper interface of Mybatis executes SQL You learned that Mapper executes SQL through a dynamic proxy, but there is no detailed description of how the method maps, including method names, return values, parameters, and so on; how these relate to xxMapper.xml.
Method Name Mapping
The purpose of caching MapperMethod s me ...
Posted by midgar777 on Fri, 08 Nov 2019 18:08:27 -0800
C × XML base XElement Name the first level child node name of the root node
.NET Framework : 4.7.2
IDE : Visual Studio Community 2019
OS : Windows 10 x64
typesetting : Markdown
blog : blog.csdn.net/yushaopu
github : github.com/GratefulHeartCoder
xml file
<?xml version="1.0" encoding="utf-8"?>
<cultures>
<taoists count="100" comme ...
Posted by ShashidharNP on Fri, 08 Nov 2019 13:08:17 -0800
JavaScript implementation of table sorting
Table sorter includes JavaScript and a little CSS, which can make the original html table be able to sort each row according to the data value of each column.
Effect
Click in any column in the header, and the following lines will be sorted in ascending order according to the column value
Order by string comparison
Click the co ...
Posted by dylan001 on Fri, 08 Nov 2019 06:54:53 -0800
Use Mybatis every day, but do you really know how it works?
Recently, I want to write a mybatis paging plug-in, but before I write the plug-in, I must understand the specific working principle of mybatis, so I will start to work by referring to other blogs and reading the source code.
Core components:
SqlSession
Executor
StatementHandler
ParameterHandler
ResultSetHandler
TypeHandler
MappedStatement
Co ...
Posted by neridaj on Fri, 08 Nov 2019 04:12:39 -0800