Spring provides us with a lot of tool classes that should be well utilized in our daily work. it can greatly reduce the length of code we usually write. because we only want to use the spring tool class,
I don't want to introduce a large spring Project. The following is the tool class I extracted from spring3.0.5.
The jar package compiled by spring code I extracted is provided at the end.
The resouce concept in spring is useful when we process Io. For more information, see the spring manual.
Built-in resouce type
- Urlresource
- Classpathresource
- Filesystemresource
- Servletcontextresource
- Inputstreamresource
- Bytearrayresource
- Encodedresource, that is, resource plus encoding, can be considered as a encoded resource.
- Vfsresource (which is often used in JBoss and has a tool class vfsutils)
- Org. springframework. util. xml. resourceutils is used to process tools that express resource string prefixes and describe resources. For example: & quot; classpath: & quot ;.
Geturl, GetFile, isfileurl, isjarurl, extractjarfileurl
Tool
- Org. springframework. Core. annotation. annotationutils
- Org. springframework. core. io. support. pathmatchingresourcepatternresolver is used to process ant matching styles (COM /*. JSP, COM /**/*. JSP) to find all the resources and use them together with the above resource concepts, which is useful for file traversal. for more information, see javadoc.
- Org. springframework. Core. Io. Support. propertiesloaderutils
- Org. springframework. Core. bridgemethodresolver bridge method analyzer. For bridging methods, see: http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.4.5
- Org. springframework. Core. generictyperesolver pattern analyzer is used to analyze the parameters of the pattern method.
- Org. springframework. Core. nestedexceptionutils
XML Tool
- Org. springframework. util. xml. abstractstaxcontenthandler
- Org. springframework. util. xml. abstractstaxxmlreader
- Org. springframework. util. xml. abstractxmlreader
- Org. springframework. util. xml. abstractxmlstreamreader
- Org. springframework. util. xml. domutils
- Org. springframework. util. xml. simplenamespacecontext
- Org. springframework. util. xml. simplesaxerrorhandler
- Org. springframework. util. xml. simpletransformerrorlistener
- Org. springframework. util. xml. staxutils
- Org. springframework. util. xml. transformerutils
Other tool sets
- Processing of org. springframework. util. xml. antpathmatcherant Style
- Org. springframework. util. xml. antpathstringmatcher
- Org. springframework. util. xml. Assert assertions are often used in our parameter judgment.
- Org. springframework. util. xml. cachingmapdecorator
- Org. springframework. util. xml. classutils for class Processing
- Org. springframework. util. xml. collectionutils is a tool used to process collections.
- Org. springframework. util. xml. commonslogwriter
- Org. springframework. util. xml. compositeiterator
- Org. springframework. util. xml. concurrencythrottlesupport
- Org. springframework. util. xml. customizablethreadcreator
- Org. springframework. util. xml. defaultpropertiespersister
- Org. springframework. util. xml. digestutils abstract processing, which is used for MD5 processing information
- Org. springframework. util. xml. filecopyutils file copy processing, combined with the concept of resource, is really convenient
- Org. springframework. util. xml. filesystemutils
- Org. springframework. util. xml. linkedcaseinsensitivemap
Case-insensitive linkedmap of key values
- Org. springframework. util. xml. Repeated multivaluemap a key can store multiple values of the linkedmap.
- Org. springframework. util. xml. log4jconfigurer A log4j startup tool class for loading specified preparation files
- The tool class for org. springframework. util. xml. numberutils to process numbers. parsenumber can be used to process strings into the specified numeric format. It also supports format. convertnumbertotargetclass can be used to convert the number type.
- Org. springframework. util. xml. objectutils has many methods to process null objects, such as nullsafehashcode, nullsafeequals, isarray, containselement, addobjecttoarray, and other useful methods.
- Org. springframework. util. XML. patternmatchutilsspring is used to process simple matching. for example, spring's typical & quot; xxx * & quot;, & quot; * XXX & quot; and & quot; * XXX * & quot; pattern styles
- Org. springframework. util. xml. propertyplaceholderhelper is used to replace placeholders.
- Org. springframework. util. xml. reflectionutils reflect common tools and methods. useful methods include findfield, setfield, getfield, findmethod, invokemethod, etc.
- Org. springframework. util. xml. serializationutils is used for Java serialization and deserialization. serialize and deserialize Methods
- Org. springframework. util. XML. stopWatch is a good tool class for recording the execution time and can be used for testing the task in stages. finally, a nice print format is supported. this class should be frequently used
- Org. springframework. util. xml. stringutils
- Org. springframework. util. xml. systempropertyutils
- Org. springframework. util. xml. typeutils is used to judge type compatibility. isassignable
- Monitoring of weak reference by org. springframework. util. xml. weakreferencemonitor
Web-related tools
- Org. springframework. Web. util. cookiegenerator
- Org. springframework. Web. util. htmlcharacterentitydecoder
- Org. springframework. Web. util. htmlcharacterentityreferences
- Org. springframework. Web. util. htmlutils
- Org. springframework. Web. util. httpurltemplate
This class is used to construct a URL using a string template. It will automatically process Chinese characters in the URL and other related codes. It should be often used to read URL resources provided by others.
String url = & quot; http: // localhost/MyApp/{name}/{ID} & quot;
- Org. springframework. Web. util. javascriptutils
- Org. springframework. Web. util. log4jconfiglistener
Use listener to initialize log4j in the Web Environment
- Org. springframework. Web. util. uritemplate
- Org. springframework. Web. util. uriutils processes the encoding of special characters in the URI.
- Org. springframework. Web. util. webutils
- Org. springframework. Web. util.