java refactoring ActionServlet to reduce the configuration item code of Web.xml
Two fatal disadvantages of Servlet (interview questions):
There are many configuration items in web.xml file: due to the increase of Servlet, a large number of Servlet configurations will be generated
Servlet has container dependency reason: HttpServletRequest and HttpServletResponse objects are created by the Web container when a servlet proc ...
Posted by Paavero on Wed, 01 Apr 2020 08:34:57 -0700
Spring learning journey (7) comparison of AOP programming based on XML configuration and AspectJ annotation configuration
This blog uses a slightly complex case to compare the differences between AOP programming based on XML configuration and AspectJ annotation configuration.
Related to the introduction of packages and other Spring AOP programming preparation, please refer to other blog posts in the small edition.
Case requirements:
Write a simple calculator to re ...
Posted by Kinneh on Wed, 01 Apr 2020 06:21:33 -0700
Implementing Http server in Golang and parsing header parameters and form parameters
In HTTP service, header parameters and form parameters are often used. This article is mainly to practice how to parse the parameters and form parameters in the header of HTTP request in Go language. The specific code is as follows:
package server
import (
"net/http"
"strconv"
"fmt"
)
func HttpStart(port int) {
http.HandleFunc(" ...
Posted by KCAstroTech on Wed, 01 Apr 2020 05:54:39 -0700
Four components of Android content resolver
ContentResolver
For complete code see: longlong's github
Standard format for content URI s:
content://com.example.app.provider.table1
content://com.example.app.provider.table2
The content URI is mainly composed of two parts: authority and path. The authority is generally named by package name. Path: disti ...
Posted by nainil on Wed, 01 Apr 2020 01:40:07 -0700
RadioButton icon resizes (TextView also works)
There is no corresponding layout parameter for the icon size of RadioButton. In this paper, the RadioButton is customized by means of custom attribute to control the image size.
Key points of this paper:
Use of custom properties.
Solve the problem of customizing the size of icons on the top, bottom, left and right of RadioButton text.
This m ...
Posted by TimSawyers on Tue, 31 Mar 2020 22:18:46 -0700
Bluetooth adapter can't find Bluetooth device problem when startDiscovery is over Android 6.0 / 7.0 +
Reprinted from: https://blog.csdn.net/zhangphil/article/details/77896924
Bluetooth adapter can't find Bluetooth device problem when startDiscovery is over Android 6.0 +
One of the important reasons for the problem is the permission problem of Android 6.0 +, Android 7.0 +. Good Bluetooth code running on Android 4.0 +, abnormal ...
Posted by literom on Tue, 31 Mar 2020 21:44:29 -0700
maven project integrates official wechat payment v3.0.9 (spring boot sample version)
Former by: recently made wechat payment in java, checked the maven warehouse of wechat payment sdk, and found that the latest update was on March 16, 2017, and the version number stayed at 0.0.3:
<!-- https://mvnrepository.com/artifact/com.github.wxpay/wxpay-sdk -->
<dependency>
<groupId>com.github.wxpay</groupId>
...
Posted by edwinlcy on Tue, 31 Mar 2020 20:09:14 -0700
BottomNavigationView bottom navigation bar, add quantity corner mark reminder
First, let's look at the effect picture of the implementation:
The code is also very simple
Each Tab in the BottomNavigationMenuView is a FrameLayout, so we can add views on it at will, so we can also implement our corner sign.
//Get the entire NavigationView
BottomNavigationMenuView menuView = (BottomNavigationMenuV ...
Posted by volomike on Tue, 31 Mar 2020 18:29:17 -0700
Parent child container relationship of Spring and Spring MVC
Parent child container relationship of Spring and Spring MVC
General configuration code
<!-- listeners -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name&g ...
Posted by simon622 on Tue, 31 Mar 2020 14:16:05 -0700
Using RESTFUL interface of CAS to log CS system into BS system
Get ready
First, refer to the previous article to configure CAS and RESTFUL. Refer to:
http://blog.csdn.net/happyteafriends/article/details/7450120
The scenario is as follows,
CAS address: http://10.1.81.223:8080/cas-server-webapp
Two WEB application addresses: http://10.1.81.223:8080/webapp2
http://10.1.81.223:8080/webapp1
Objectiv ...
Posted by royalsolo on Tue, 31 Mar 2020 13:00:56 -0700