Common spring tools

Source: Internet
Author: User

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 

  1. Urlresource
  2. Classpathresource
  3. Filesystemresource
  4. Servletcontextresource
  5. Inputstreamresource
  6. Bytearrayresource
  7. Encodedresource, that is, resource plus encoding, can be considered as a encoded resource.
  8. Vfsresource (which is often used in JBoss and has a tool class vfsutils)
  9. 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 

  1. Org. springframework. Core. annotation. annotationutils
  2. 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.
  3. Org. springframework. Core. Io. Support. propertiesloaderutils
  4. 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
  5. Org. springframework. Core. generictyperesolver pattern analyzer is used to analyze the parameters of the pattern method.
  6. Org. springframework. Core. nestedexceptionutils

XML Tool 

  1. Org. springframework. util. xml. abstractstaxcontenthandler
  2. Org. springframework. util. xml. abstractstaxxmlreader
  3. Org. springframework. util. xml. abstractxmlreader
  4. Org. springframework. util. xml. abstractxmlstreamreader
  5. Org. springframework. util. xml. domutils
  6. Org. springframework. util. xml. simplenamespacecontext
  7. Org. springframework. util. xml. simplesaxerrorhandler
  8. Org. springframework. util. xml. simpletransformerrorlistener
  9. Org. springframework. util. xml. staxutils
  10. Org. springframework. util. xml. transformerutils

Other tool sets 

  1. Processing of org. springframework. util. xml. antpathmatcherant Style
  2. Org. springframework. util. xml. antpathstringmatcher
  3. Org. springframework. util. xml. Assert assertions are often used in our parameter judgment.
  4. Org. springframework. util. xml. cachingmapdecorator
  5. Org. springframework. util. xml. classutils for class Processing
  6. Org. springframework. util. xml. collectionutils is a tool used to process collections.
  7. Org. springframework. util. xml. commonslogwriter
  8. Org. springframework. util. xml. compositeiterator
  9. Org. springframework. util. xml. concurrencythrottlesupport
  10. Org. springframework. util. xml. customizablethreadcreator
  11. Org. springframework. util. xml. defaultpropertiespersister
  12. Org. springframework. util. xml. digestutils abstract processing, which is used for MD5 processing information
  13. Org. springframework. util. xml. filecopyutils file copy processing, combined with the concept of resource, is really convenient
  14. Org. springframework. util. xml. filesystemutils
  15. Org. springframework. util. xml. linkedcaseinsensitivemap
    Case-insensitive linkedmap of key values
  16. Org. springframework. util. xml. Repeated multivaluemap a key can store multiple values of the linkedmap.
  17. Org. springframework. util. xml. log4jconfigurer A log4j startup tool class for loading specified preparation files
  18. 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.
  19. Org. springframework. util. xml. objectutils has many methods to process null objects, such as nullsafehashcode, nullsafeequals, isarray, containselement, addobjecttoarray, and other useful methods.
  20. 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
  21. Org. springframework. util. xml. propertyplaceholderhelper is used to replace placeholders.
  22. Org. springframework. util. xml. reflectionutils reflect common tools and methods. useful methods include findfield, setfield, getfield, findmethod, invokemethod, etc.
  23. Org. springframework. util. xml. serializationutils is used for Java serialization and deserialization. serialize and deserialize Methods
  24. 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
  25. Org. springframework. util. xml. stringutils
  26. Org. springframework. util. xml. systempropertyutils
  27. Org. springframework. util. xml. typeutils is used to judge type compatibility. isassignable
  28. Monitoring of weak reference by org. springframework. util. xml. weakreferencemonitor

Web-related tools 

  1. Org. springframework. Web. util. cookiegenerator
  2. Org. springframework. Web. util. htmlcharacterentitydecoder
  3. Org. springframework. Web. util. htmlcharacterentityreferences
  4. Org. springframework. Web. util. htmlutils
  5. 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;
  6. Org. springframework. Web. util. javascriptutils
  7. Org. springframework. Web. util. log4jconfiglistener
    Use listener to initialize log4j in the Web Environment
  8. Org. springframework. Web. util. uritemplate
  9. Org. springframework. Web. util. uriutils processes the encoding of special characters in the URI.
  10. Org. springframework. Web. util. webutils
  11. Org. springframework. Web. util.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.