use of org.springframework.boot.system.ApplicationTemp in project spring-boot by spring-projects.
the class SessionStoreDirectory method getValidDirectory.
File getValidDirectory(boolean mkdirs) {
File dir = getDirectory();
if (dir == null) {
return new ApplicationTemp().getDir("servlet-sessions");
}
if (!dir.isAbsolute()) {
dir = new File(new ApplicationHome().getDir(), dir.getPath());
}
if (!dir.exists() && mkdirs) {
dir.mkdirs();
}
assertDirectory(mkdirs, dir);
return dir;
}
use of org.springframework.boot.system.ApplicationTemp in project spring-boot by spring-projects.
the class AbstractServletWebServerFactoryTests method getValidSessionStoreWhenSessionStoreNotSet.
@Test
void getValidSessionStoreWhenSessionStoreNotSet() {
AbstractServletWebServerFactory factory = getFactory();
File dir = factory.getValidSessionStoreDir(false);
assertThat(dir.getName()).isEqualTo("servlet-sessions");
assertThat(dir.getParentFile()).isEqualTo(new ApplicationTemp().getDir());
}
Aggregations