[英]Should I avoid using classes in Spring util package?
There are many useful utility classes under the org.springframework.util
package, however, many of them also has this on their document. org.springframework.util
包下有许多有用的实用程序类,但是,它们中的许多都在它们的文档中有这个。
Mainly for internal use within the framework
主要供框架内部使用
Is it safe to use these classes in application ? 在应用程序中使用这些类是否安全?
Yes, it is fine to use them. 是的,可以使用它们。 Those classes provide
static
helper methods that shouldn't contain any mutable static
state. 这些类提供了不应包含任何可变
static
static
助手方法。
If the classes and methods are public, it is safe. 如果类和方法是公开的,那么它是安全的。 Read the documentation carefully to make sure that there will not be any side effects on the rest of the framework.
仔细阅读文档以确保不会对框架的其余部分产生任何副作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.