71. File Constant (#8)
This commit is contained in:
@ -1,13 +1,17 @@
|
||||
package net.shyshkin.study.fullstack.supportportal.backend;
|
||||
|
||||
import net.shyshkin.study.fullstack.supportportal.backend.constant.FileConstant;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SupportPortalBackendApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SupportPortalBackendApplication.class, args);
|
||||
new File(FileConstant.USER_FOLDER).mkdirs();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package net.shyshkin.study.fullstack.supportportal.backend.constant;
|
||||
|
||||
public class FileConstant {
|
||||
|
||||
public static final String USER_IMAGE_PATH = "/user/image/";
|
||||
public static final String JPG_EXTENSION = "jpg";
|
||||
public static final String USER_FOLDER = System.getProperty("user.home") + "/supportportal/user/";
|
||||
public static final String DIRECTORY_CREATED = "Created directory for: ";
|
||||
public static final String DEFAULT_USER_IMAGE_PATH = "/user/image/profile/";
|
||||
public static final String FILE_SAVED_IN_FILE_SYSTEM = "Saved file in file system by name: ";
|
||||
public static final String DOT = ".";
|
||||
public static final String FORWARD_SLASH = "/";
|
||||
public static final String NOT_AN_IMAGE_FILE = " is not an image file. Please upload an image file";
|
||||
public static final String TEMP_PROFILE_IMAGE_BASE_URL = "https://robohash.org/";
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user