简体   繁体   中英

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM