Package org.springframework.boot.system
Class ApplicationTemp
- java.lang.Object
- org.springframework.boot.system.ApplicationTemp
public class ApplicationTemp extends Object
Provides access to an application specific temporary directory. Generally speaking different Spring Boot applications will get different locations, however, simply restarting an application will give the same location.- Since:
- 2.0.0
Constructor Summary
Constructors Constructor Description ApplicationTemp()
Create a newApplicationTemp
instance.ApplicationTemp(Class<?> sourceClass)
Create a newApplicationTemp
instance for the specified source class.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getDir()
Return the directory to be used for application specific temp files.File
getDir(String subDir)
Return a sub-directory of the application temp.String
toString()
Constructor Detail
ApplicationTemp
public ApplicationTemp()
Create a newApplicationTemp
instance.
ApplicationTemp
public ApplicationTemp(Class<?> sourceClass)
Create a newApplicationTemp
instance for the specified source class.- Parameters:
sourceClass
- the source class ornull