Spring's commonly used tool classes

Source: Internet
Author: User
Tags file copy print format log4j


built-in resouce type

    1. Urlresource

    2. Classpathresource

    3. Filesystemresource

    4. Servletcontextresource

    5. Inputstreamresource

    6. Bytearrayresource

    7. Encodedresource, resource plus encoding, can be thought of as a coded resource.

    8. Vfsresource (often used in JBoss, and corresponding tools vfsutils)

    9. Org.springframework.util.xml.ResourceUtils is a tool used to describe resources that represent resource string prefixes. such as: "classpath:".
      GetURL, GetFile, Isfileurl, Isjarurl, Extractjarfileurl



Tool Class  

    1. Org.springframework.core.annotation.AnnotationUtils Handling annotations

    2. Org.springframework.core.io.support.PathMatchingResourcePatternResolver for working with ant matching styles (com/*.jsp, com/**/*.jsp), Finding all the resources, combined with the concept of resource above, is useful for traversing files. For details, please see Javadoc

    3. Org.springframework.core.io.support.PropertiesLoaderUtils Load Properties Resource Tool class, combined with resource

    4. Org.springframework.core.BridgeMethodResolver Bridging Method Analyzer. For bridging methods Please refer to: http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.4.5

    5. The Org.springframework.core.GenericTypeResolver Paradigm Analyzer, which is used in the paradigm-based method, parameters analysis.

    6. Org.springframework.core.NestedExceptionUtils



XML Tools  

    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. Org.springframework.util.xml.AntPathMatcherant-style processing (URL path matching)

  2. Org.springframework.util.xml.AntPathStringMatcher

  3. Org.springframework.util.xml.Assert asserts that it should be used frequently when our arguments are judged.

  4. Org.springframework.util.xml.CachingMapDecorator

  5. Org.springframework.util.xml.ClassUtils for class processing

  6. Org.springframework.util.xml.CollectionUtils tools for working with 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 Digest processing, here are for MD5 processing information

  13. Org.springframework.util.xml.FileCopyUtils file copy processing, combined with the concept of resource together to deal with, really is very convenient

  14. Org.springframework.util.xml.FileSystemUtils

  15. Org.springframework.util.xml.LinkedCaseInsensitiveMap
    The key value is case-insensitive linkedmap

  16. Org.springframework.util.xml.LinkedMultiValueMap A key can hold multiple values of Linkedmap

  17. Org.springframework.util.xml.Log4jConfigurer a log4j boot Load tool class that specifies the configuration file

  18. Org.springframework.util.xml.NumberUtils the tool class that handles numbers, there are parsenumber that can manipulate strings into the number format we specify, and also support format format, Convertnumbertotargetclass can achieve conversions of type number.

  19. Org.springframework.util.xml.ObjectUtils has many methods for handling null object. Useful methods such as Nullsafehashcode, Nullsafeequals, IsArray, containselement, Addobjecttoarray, etc.

  20. Org.springframework.util.xml.PatternMatchUtilsspring is used to handle simple matches. such as Spring's typical "xxx*", & quot;*xxx" "*xxx*" Pattern styles

  21. Org.springframework.util.xml.PropertyPlaceholderHelper for handling placeholder replacements

  22. Org.springframework.util.xml.ReflectionUtils reflects common tool methods. FindField, SetField, GetField, FindMethod, InvokeMethod and other useful methods.

  23. Org.springframework.util.xml.SerializationUtils for serialization and deserialization of Java. Serialize and Deserialize methods

  24. Org.springframework.util.xml.StopWatch a good tool class for recording execution time, and can be used to test the task in a phased time. Finally, a good-looking print format is supported. This class should always be used

  25. Org.springframework.util.xml.StringUtils

  26. Org.springframework.util.xml.SystemPropertyUtils

  27. Org.springframework.util.xml.TypeUtils used for type-compatible judgments. isassignable

  28. Org.springframework.util.xml.WeakReferenceMonitor monitoring of weak references



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 that automatically handles Chinese characters and other related encodings in the URL. When reading URL resources provided by others, you should always use the
      String URL = "http://localhost/myapp/{name}/{id}"

    6. Org.springframework.web.util.JavaScriptUtils

    7. Org.springframework.web.util.Log4jConfigListener
      Using listener to formulate log4j in web environment

    8. Org.springframework.web.util.UriTemplate

    9. Org.springframework.web.util.UriUtils encoding of special characters in URIs

    10. Org.springframework.web.util.WebUtils

    11. Org.springframework.web.util.


Spring's commonly used tool classes

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.