Spring MVC Source Analysis

I. Analysis of Processing Processes 1. First of all, Tomcat loads and parses the / WEB-INF/web.xml file every time it starts up, so you can find a breakthrough from web.xml. The main code is as follows: <servlet > <servlet-name >spring-mvc</servlet-name> <!-- servlet class --> <servlet-class >org. ...

Posted on Thu, 10 Oct 2019 23:51:20 -0700 by the_ut_tick

Start-up Analysis of MyBatis

Preface MyBatis is one of the most commonly used persistence layer frameworks at present. By analyzing its source code, we can make better use of it in our use process. This series is based on mybatis-3.4.6 for analysis.MyBatis's initial work is to parse the main configuration file, map the configuration file, and annotate information. It is t ...

Posted on Thu, 10 Oct 2019 23:15:15 -0700 by outatime88

Generating Docx and Pdf files based on Freemarker template

The product raises the requirement of generating a word document and a pdf document respectively, which need to contain data, which need to have corresponding styles such as font size, tables, paragraphs and so on. The initial idea was to use Apache POI, but after looking at that large piece of code for filling in value operations, it was found ...

Posted on Thu, 10 Oct 2019 20:22:54 -0700 by hillbilly928

Two Development Methods of Querying a User by ID

Two Development Methods of Querying a User by ID The database table sql statement is as follows: https://github.com/beyondyanyu/Sayingyy/blob/master/JDBC2-database sql table building statement (1) Primitive Dao development: UserDao.java (interface): package com.pdsu.mybatis.dao; import com.pdsu.myb ...

Posted on Thu, 10 Oct 2019 15:36:06 -0700 by frymaster

2. Resolution Default Label of Spring Source Analysis 2

1. Resolving default labels parseDefaultElement(ele, delegate); void parseDefaultElement(Element ele, BeanDefinitionParserDelegate delegate) { //Parsing import Tags if (delegate.nodeNameEquals(ele, IMPORT_ELEMENT)) { importBeanDefinitionResource(ele); } //Parsing alias Tags else if (delegate.nodeNameEquals(ele, ALIAS_ELEME ...

Posted on Thu, 10 Oct 2019 12:40:09 -0700 by dflow

Android uses selector (selector) to achieve dynamic click effect

That is: The Prospect and Background of Android In Android, it is necessary to add dynamic click effects for the user's experience if click events are set for images. The results are as follows: The main code is as follows Realization: Step one: Set the background to selector_set in the control: (rememb ...

Posted on Thu, 10 Oct 2019 03:33:12 -0700 by jibosh

Various uses of @Import in Spring and ImportAware interface

@ Import annotation @ Import annotations provide functionality equivalent to <import/> elements in XML to implement one or more configuration classes imported. @ Import can be used either as a class or as a meta-annotation. @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Import { /** * ...

Posted on Thu, 10 Oct 2019 01:36:05 -0700 by benjrox

Use of Page Helper in MyBatis

Use of Page Helper in MyBatis A brief introduction to PageHelper Simple use of PageHelper Step 1: Import dependencies in pom.xml Step 2: Configure the interceptor plug-in in Spring's configuration file Step 3: Use Call PageHelper.startPage static method before you need to paginate MyBatis query meth ...

Posted on Wed, 09 Oct 2019 19:09:45 -0700 by dvt85

KVM Virtualization Foundation Management in Cent os 7

Bowen outline: 1. Installing kvm virtualization; Second, manually change the configuration file, clone web01 and generate a new virtual machine web02. 3. What are the similarities and differences between web01 and web02? Fourth, two methods of remote connection of virtual machine; 5. Use the default NAT network type to enable web02 to ping o ...

Posted on Wed, 09 Oct 2019 16:46:52 -0700 by snrecords

Spring-based declarative transactions using annotations (database operations, servlet implementations)

Implementing declarative transactions with annotations (database operations, servlet implementations) 1. Transactions: Let's see how transactions in databases are defined. That is to say, in a transaction, if many methods are invoked, either all of them are successfully executed or all of them fail to e ...

Posted on Wed, 09 Oct 2019 13:44:55 -0700 by nishmgopla