类 ApplicationHome
java.lang.Object
org.springframework.boot.system.ApplicationHome
Provides access to the application home directory. Attempts to pick a sensible home for
both Jar Files, Exploded Archives and directly running applications.
- 从以下版本开始:
- 2.0.0
- 作者:
- Phillip Webb, Raja Kolli
-
构造器概要
构造器构造器说明Create a newApplicationHome
instance.ApplicationHome
(Class<?> sourceClass) Create a newApplicationHome
instance for the specified source class. -
方法概要
-
构造器详细资料
-
ApplicationHome
public ApplicationHome()Create a newApplicationHome
instance. -
ApplicationHome
Create a newApplicationHome
instance for the specified source class.- 参数:
sourceClass
- the source class ornull
-
-
方法详细资料
-
getSource
Returns the underlying source used to find the home directory. This is usually the jar file or a directory. Can returnnull
if the source cannot be determined.- 返回:
- the underlying source or
null
-
getDir
Returns the application home directory.- 返回:
- the home directory (never
null
)
-
toString
-