XML parsing of java (DOM4J Technology)
Parsing XML file with DOM4J Technology
I. Introduction to XML
xml (Extensible Markup Language)Extensible meaning: allows programmers to extend new tags according to their own ideasNote: but when extending, you must follow the XML specificationSecond, the characteristics of xml:Self description,It can support cross platform,Retains the hierarchy ...
Added by e39m5 on Sun, 01 Dec 2019 03:14:51 +0200
Spring annotation driven development
1 component registration
1.1 @ configuration & @ Bean register Bean
1.1.1 traditional xml
Person.java
package com.xuweiwei.spring.model;
/**
* @describe:
* @author: Don't worry about the past, only laugh for the rest of my life.
* @version: 1.0
*/
public class Person {
private String name;
private Integer age;
...
Added by Illusion on Sat, 30 Nov 2019 12:42:59 +0200
spring boot and mybatis
Simplified configuration and content sublimation of spring boot and spring mvc.
How to integrate mybatis in spring boot?
Part 1: maven dependency (you can check it when creating the spring boot project)
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId&g ...
Added by harvillo on Thu, 28 Nov 2019 17:55:23 +0200
[SpringBoot] Add Filter to SpringBoot
Because springboot is based on servlet 3.0+, the embedded tomcat container cannot configure Filter in web.xml as before. This article is based on springboot 1.5.6
First
@WebFilter(filterName = "myFilter",urlPatterns = "/*")
public class MyFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ...
Added by mblack0508 on Thu, 28 Nov 2019 05:50:07 +0200
Source code analysis of Android system: Exploration of Handler's extended knowledge
After analyzing the Handler source code, there are many unknown secrets. Next, analyze it.
Classes involved:HandlerThread, IntentService, AsyncTask, Messenger, IdleHandler, Looper.Observer, MessageLogging, etc
The first half: HandlerThread, IntentService, AsyncTaskIn the second half of the lecture: Messenger, IdleHandler, Looper.Observer, Messa ...
Added by sgalonska on Wed, 27 Nov 2019 13:09:33 +0200
Android uses local service and remote service
Use local service
I. define java interface
public interface CalculateI {
int addab(int a, int b);
}
Create a Binder subclass, inherit Binder and implement interface methods
public class CalculateBinder extends Binder implements CalculateI{
@Override
public int addab(int a, int b) {
return a+b;
}
}
III. Onbind in ...
Added by mrdave on Tue, 26 Nov 2019 19:30:44 +0200
C + + essay Nuget packaging
First, prepare all the compiled packages to a folder
Like this
Next, create a new text document with the suffix. nuspec
Fill in content
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<!-- The unique identification number of the package, which is also ...
Added by tom_b on Mon, 25 Nov 2019 22:51:15 +0200
Android entry encapsulates a helper class for HTTP requests
In the previous article, we have implemented an HTTP GET and POST request;
Here I encapsulate an auxiliary class of HTTP get and post, which can be used better;
Class name: HttpRequestUtil
The following functions are provided:
(1) simulate GET request;
(2) simulate POST request;
(3) upload request of simulation ...
Added by Hallic7 on Mon, 25 Nov 2019 20:39:29 +0200
android adjustNothing get keyboard height
The implementation effect is as follows: after obtaining the keyboard height, manually move the input box:
20190402144716388.gif
Although the pop-up of the input box is not smooth enough, it seems a little stiff, but we can add appropriate animation to improve it.
The method is to cover a PopupWindow with a width of 0 and a ...
Added by ifuschini on Sun, 24 Nov 2019 18:43:40 +0200
Vernacular spring source code: Spring Context source code analysis
The previous blogs introduced the source code of IOC and AOP of Spring framework, so how to connect these two core components to provide a better external interface? At this time, the ApplicationContext in the context package will be launched.
ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("bean.xml" ...
Added by pbjpb on Sun, 24 Nov 2019 17:25:25 +0200