123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748 |
- package cn.keking.config;
- import cn.keking.utils.ConfigUtils;
- import org.springframework.beans.factory.annotation.Value;
- import org.springframework.stereotype.Component;
- import java.io.File;
- import java.util.Arrays;
- import java.util.Set;
- import java.util.concurrent.CopyOnWriteArraySet;
- /**
- * @author: chenjh
- * @since: 2019/4/10 17:22
- */
- @Component(value = ConfigConstants.BEAN_NAME)
- public class ConfigConstants {
- public static final String BEAN_NAME = "configConstants";
- static {
- //pdfbox兼容低版本jdk
- System.setProperty("sun.java2d.cmm", "sun.java2d.cmm.kcms.KcmsServiceProvider");
- }
- private static Boolean cacheEnabled;
- private static String[] simTexts = {};
- private static String[] medias = {};
- private static String[] convertMedias = {};
- private static String mediaConvertDisable;
- private static String officePreviewType;
- private static String officePreviewSwitchDisabled;
- private static String ftpUsername;
- private static String ftpPassword;
- private static String ftpControlEncoding;
- private static String baseUrl;
- private static String fileDir = ConfigUtils.getHomePath() + File.separator + "file" + File.separator;
- private static String localPreviewDir;
- private static CopyOnWriteArraySet<String> trustHostSet;
- private static CopyOnWriteArraySet<String> notTrustHostSet;
- private static String pdfPresentationModeDisable;
- private static String pdfDisableEditing;
- private static String pdfOpenFileDisable;
- private static String pdfPrintDisable;
- private static String pdfDownloadDisable;
- private static String pdfBookmarkDisable;
- private static Boolean fileUploadDisable;
- private static String tifPreviewType;
- private static String beian;
- private static String[] prohibit = {};
- private static String size;
- private static String password;
- private static int pdf2JpgDpi;
- private static String officeTypeWeb;
- private static String cadPreviewType;
- private static Boolean deleteSourceFile;
- private static Boolean deleteCaptcha;
- private static String officePageRange;
- private static String officeWatermark;
- private static String officeQuality;
- private static String officeMaxImageResolution;
- private static Boolean officeExportBookmarks;
- private static Boolean officeExportNotes;
- private static Boolean officeDocumentOpenPasswords;
- private static String cadTimeout;
- private static int cadThread;
- private static String homePageNumber;
- private static String homePagination;
- private static String homePageSize;
- private static String homeSearch;
- public static final String DEFAULT_CACHE_ENABLED = "true";
- public static final String DEFAULT_TXT_TYPE = "txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd,xbrl";
- public static final String DEFAULT_MEDIA_TYPE = "mp3,wav,mp4,flv";
- public static final String DEFAULT_OFFICE_PREVIEW_TYPE = "image";
- public static final String DEFAULT_OFFICE_PREVIEW_SWITCH_DISABLED = "false";
- public static final String DEFAULT_FTP_USERNAME = null;
- public static final String DEFAULT_FTP_PASSWORD = null;
- public static final String DEFAULT_FTP_CONTROL_ENCODING = "UTF-8";
- public static final String DEFAULT_VALUE = "default";
- public static final String DEFAULT_PDF_PRESENTATION_MODE_DISABLE = "true";
- public static final String DEFAULT_PDF_OPEN_FILE_DISABLE = "true";
- public static final String DEFAULT_PDF_PRINT_DISABLE = "true";
- public static final String DEFAULT_PDF_DOWNLOAD_DISABLE = "true";
- public static final String DEFAULT_PDF_BOOKMARK_DISABLE = "true";
- public static final String DEFAULT_PDF_DISABLE_EDITING = "true";
- public static final String DEFAULT_FILE_UPLOAD_DISABLE = "false";
- public static final String DEFAULT_TIF_PREVIEW_TYPE = "tif";
- public static final String DEFAULT_CAD_PREVIEW_TYPE = "pdf";
- public static final String DEFAULT_BEIAN = "无";
- public static final String DEFAULT_SIZE = "500MB";
- public static final String DEFAULT_PROHIBIT = "exe,dll";
- public static final String DEFAULT_PASSWORD = "123456";
- public static final String DEFAULT_PDF2_JPG_DPI = "105";
- public static final String DEFAULT_OFFICE_TYPE_WEB = "web";
- public static final String DEFAULT_DELETE_SOURCE_FILE = "true";
- public static final String DEFAULT_DELETE_CAPTCHA = "false";
- public static final String DEFAULT_CAD_TIMEOUT = "90";
- public static final String DEFAULT_CAD_THREAD = "5";
- public static final String DEFAULT_OFFICE_PAQERANQE = "false";
- public static final String DEFAULT_OFFICE_WATERMARK = "false";
- public static final String DEFAULT_OFFICE_QUALITY = "80";
- public static final String DEFAULT_OFFICE_MAXIMAQERESOLUTION = "150";
- public static final String DEFAULT_OFFICE_EXPORTBOOKMARKS = "true";
- public static final String DEFAULT_OFFICE_EXPORTNOTES = "true";
- public static final String DEFAULT_OFFICE_EOCUMENTOPENPASSWORDS = "true";
- public static final String DEFAULT_HOME_PAGENUMBER = "1";
- public static final String DEFAULT_HOME_PAGINATION = "true";
- public static final String DEFAULT_HOME_PAGSIZE = "15";
- public static final String DEFAULT_HOME_SEARCH = "true";
- public static Boolean isCacheEnabled() {
- return cacheEnabled;
- }
- @Value("${cache.enabled:true}")
- public void setCacheEnabled(String cacheEnabled) {
- setCacheEnabledValueValue(Boolean.parseBoolean(cacheEnabled));
- }
- public static void setCacheEnabledValueValue(Boolean cacheEnabled) {
- ConfigConstants.cacheEnabled = cacheEnabled;
- }
- public static String[] getSimText() {
- return simTexts;
- }
- @Value("${simText:txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd,xbrl}")
- public void setSimText(String simText) {
- String[] simTextArr = simText.split(",");
- setSimTextValue(simTextArr);
- }
- public static void setSimTextValue(String[] simText) {
- ConfigConstants.simTexts = simText;
- }
- public static String[] getMedia() {
- return medias;
- }
- @Value("${media:mp3,wav,mp4,flv}")
- public void setMedia(String media) {
- String[] mediaArr = media.split(",");
- setMediaValue(mediaArr);
- }
- public static void setMediaValue(String[] Media) {
- ConfigConstants.medias = Media;
- }
- public static String[] getConvertMedias() {
- return convertMedias;
- }
- @Value("${convertMedias:avi,mov,wmv,mkv,3gp,rm}")
- public void setConvertMedias(String convertMedia) {
- String[] mediaArr = convertMedia.split(",");
- setConvertMediaValue(mediaArr);
- }
- public static void setConvertMediaValue(String[] ConvertMedia) {
- ConfigConstants.convertMedias = ConvertMedia;
- }
- public static String getMediaConvertDisable() {
- return mediaConvertDisable;
- }
- @Value("${media.convert.disable:true}")
- public void setMediaConvertDisable(String mediaConvertDisable) {
- setMediaConvertDisableValue(mediaConvertDisable);
- }
- public static void setMediaConvertDisableValue(String mediaConvertDisable) {
- ConfigConstants.mediaConvertDisable = mediaConvertDisable;
- }
- public static String getOfficePreviewType() {
- return officePreviewType;
- }
- @Value("${office.preview.type:image}")
- public void setOfficePreviewType(String officePreviewType) {
- setOfficePreviewTypeValue(officePreviewType);
- }
- public static void setOfficePreviewTypeValue(String officePreviewType) {
- ConfigConstants.officePreviewType = officePreviewType;
- }
- public static String getFtpUsername() {
- return ftpUsername;
- }
- @Value("${ftp.username:}")
- public void setFtpUsername(String ftpUsername) {
- setFtpUsernameValue(ftpUsername);
- }
- public static void setFtpUsernameValue(String ftpUsername) {
- ConfigConstants.ftpUsername = ftpUsername;
- }
- public static String getFtpPassword() {
- return ftpPassword;
- }
- @Value("${ftp.password:}")
- public void setFtpPassword(String ftpPassword) {
- setFtpPasswordValue(ftpPassword);
- }
- public static void setFtpPasswordValue(String ftpPassword) {
- ConfigConstants.ftpPassword = ftpPassword;
- }
- public static String getFtpControlEncoding() {
- return ftpControlEncoding;
- }
- @Value("${ftp.control.encoding:UTF-8}")
- public void setFtpControlEncoding(String ftpControlEncoding) {
- setFtpControlEncodingValue(ftpControlEncoding);
- }
- public static void setFtpControlEncodingValue(String ftpControlEncoding) {
- ConfigConstants.ftpControlEncoding = ftpControlEncoding;
- }
- public static String getBaseUrl() {
- return baseUrl;
- }
- @Value("${base.url:default}")
- public void setBaseUrl(String baseUrl) {
- setBaseUrlValue(baseUrl);
- }
- public static void setBaseUrlValue(String baseUrl) {
- ConfigConstants.baseUrl = baseUrl;
- }
- public static String getFileDir() {
- return fileDir;
- }
- @Value("${file.dir:default}")
- public void setFileDir(String fileDir) {
- setFileDirValue(fileDir);
- }
- public static void setFileDirValue(String fileDir) {
- if (!DEFAULT_VALUE.equalsIgnoreCase(fileDir)) {
- if (!fileDir.endsWith(File.separator)) {
- fileDir = fileDir + File.separator;
- }
- ConfigConstants.fileDir = fileDir;
- }
- }
- public static String getLocalPreviewDir() {
- return localPreviewDir;
- }
- @Value("${local.preview.dir:default}")
- public void setLocalPreviewDir(String localPreviewDir) {
- setLocalPreviewDirValue(localPreviewDir);
- }
- public static void setLocalPreviewDirValue(String localPreviewDir) {
- if (!DEFAULT_VALUE.equals(localPreviewDir)) {
- if (!localPreviewDir.endsWith(File.separator)) {
- localPreviewDir = localPreviewDir + File.separator;
- }
- }
- ConfigConstants.localPreviewDir = localPreviewDir;
- }
- @Value("${trust.host:default}")
- public void setTrustHost(String trustHost) {
- setTrustHostSet(getHostValue(trustHost));
- }
- public static void setTrustHostValue(String trustHost){
- setTrustHostSet(getHostValue(trustHost));
- }
- @Value("${not.trust.host:default}")
- public void setNotTrustHost(String notTrustHost) {
- setNotTrustHostSet(getHostValue(notTrustHost));
- }
- public static void setNotTrustHostValue(String notTrustHost){
- setNotTrustHostSet(getHostValue(notTrustHost));
- }
- private static CopyOnWriteArraySet<String> getHostValue(String trustHost) {
- if (DEFAULT_VALUE.equalsIgnoreCase(trustHost)) {
- return new CopyOnWriteArraySet<>();
- } else {
- String[] trustHostArray = trustHost.toLowerCase().split(",");
- return new CopyOnWriteArraySet<>(Arrays.asList(trustHostArray));
- }
- }
- public static Set<String> getTrustHostSet() {
- return trustHostSet;
- }
- private static void setTrustHostSet(CopyOnWriteArraySet<String> trustHostSet) {
- ConfigConstants.trustHostSet = trustHostSet;
- }
- public static Set<String> getNotTrustHostSet() {
- return notTrustHostSet;
- }
- public static void setNotTrustHostSet(CopyOnWriteArraySet<String> notTrustHostSet) {
- ConfigConstants.notTrustHostSet = notTrustHostSet;
- }
- public static String getPdfPresentationModeDisable() {
- return pdfPresentationModeDisable;
- }
- @Value("${pdf.presentationMode.disable:true}")
- public void setPdfPresentationModeDisable(String pdfPresentationModeDisable) {
- setPdfPresentationModeDisableValue(pdfPresentationModeDisable);
- }
- public static void setPdfPresentationModeDisableValue(String pdfPresentationModeDisable) {
- ConfigConstants.pdfPresentationModeDisable = pdfPresentationModeDisable;
- }
- public static String getPdfOpenFileDisable() {
- return pdfOpenFileDisable;
- }
- @Value("${pdf.openFile.disable:true}")
- public void setPdfOpenFileDisable(String pdfOpenFileDisable) {
- setPdfOpenFileDisableValue(pdfOpenFileDisable);
- }
- public static void setPdfOpenFileDisableValue(String pdfOpenFileDisable) {
- ConfigConstants.pdfOpenFileDisable = pdfOpenFileDisable;
- }
- public static String getPdfPrintDisable() {
- return pdfPrintDisable;
- }
- @Value("${pdf.print.disable:true}")
- public void setPdfPrintDisable(String pdfPrintDisable) {
- setPdfPrintDisableValue(pdfPrintDisable);
- }
- public static void setPdfPrintDisableValue(String pdfPrintDisable) {
- ConfigConstants.pdfPrintDisable = pdfPrintDisable;
- }
- public static String getPdfDownloadDisable() {
- return pdfDownloadDisable;
- }
- @Value("${pdf.download.disable:true}")
- public void setPdfDownloadDisable(String pdfDownloadDisable) {
- setPdfDownloadDisableValue(pdfDownloadDisable);
- }
- public static void setPdfDownloadDisableValue(String pdfDownloadDisable) {
- ConfigConstants.pdfDownloadDisable = pdfDownloadDisable;
- }
- public static String getPdfBookmarkDisable() {
- return pdfBookmarkDisable;
- }
- @Value("${pdf.bookmark.disable:true}")
- public void setPdfBookmarkDisable(String pdfBookmarkDisable) {
- setPdfBookmarkDisableValue(pdfBookmarkDisable);
- }
- public static void setPdfBookmarkDisableValue(String pdfBookmarkDisable) {
- ConfigConstants.pdfBookmarkDisable = pdfBookmarkDisable;
- }
- public static String getPdfDisableEditing() {
- return pdfDisableEditing;
- }
- @Value("${pdf.disable.editing:true}")
- public void setpdfDisableEditing(String pdfDisableEditing) {
- setPdfDisableEditingValue(pdfDisableEditing);
- }
- public static void setPdfDisableEditingValue(String pdfDisableEditing) {
- ConfigConstants.pdfDisableEditing = pdfDisableEditing;
- }
- public static String getOfficePreviewSwitchDisabled() {
- return officePreviewSwitchDisabled;
- }
- @Value("${office.preview.switch.disabled:true}")
- public void setOfficePreviewSwitchDisabled(String officePreviewSwitchDisabled) {
- ConfigConstants.officePreviewSwitchDisabled = officePreviewSwitchDisabled;
- }
- public static void setOfficePreviewSwitchDisabledValue(String officePreviewSwitchDisabled) {
- ConfigConstants.officePreviewSwitchDisabled = officePreviewSwitchDisabled;
- }
- public static Boolean getFileUploadDisable() {
- return fileUploadDisable;
- }
- @Value("${file.upload.disable:false}")
- public void setFileUploadDisable(Boolean fileUploadDisable) {
- setFileUploadDisableValue(fileUploadDisable);
- }
- public static void setFileUploadDisableValue(Boolean fileUploadDisable) {
- ConfigConstants.fileUploadDisable = fileUploadDisable;
- }
- public static String getTifPreviewType() {
- return tifPreviewType;
- }
- @Value("${tif.preview.type:tif}")
- public void setTifPreviewType(String tifPreviewType) {
- setTifPreviewTypeValue(tifPreviewType);
- }
- public static void setTifPreviewTypeValue(String tifPreviewType) {
- ConfigConstants.tifPreviewType = tifPreviewType;
- }
- public static String[] getProhibit() {
- return prohibit;
- }
- @Value("${prohibit:exe,dll}")
- public void setProhibit(String prohibit) {
- String[] prohibitArr = prohibit.split(",");
- setProhibitValue(prohibitArr);
- }
- public static void setProhibitValue(String[] prohibit) {
- ConfigConstants.prohibit = prohibit;
- }
- public static String maxSize() {
- return size;
- }
- @Value("${spring.servlet.multipart.max-file-size:500MB}")
- public void setSize(String size) {
- setSizeValue(size);
- }
- public static void setSizeValue(String size) {
- ConfigConstants.size = size;
- }
- public static String getPassword() {
- return password;
- }
- @Value("${delete.password:123456}")
- public void setPassword(String password) {
- setPasswordValue(password);
- }
- public static void setPasswordValue(String password) {
- ConfigConstants.password = password;
- }
- public static int getPdf2JpgDpi() {
- return pdf2JpgDpi;
- }
- @Value("${pdf2jpg.dpi:105}")
- public void pdf2JpgDpi(int pdf2JpgDpi) {
- setPdf2JpgDpiValue(pdf2JpgDpi);
- }
- public static void setPdf2JpgDpiValue(int pdf2JpgDpi) {
- ConfigConstants.pdf2JpgDpi = pdf2JpgDpi;
- }
- public static String getOfficeTypeWeb() {
- return officeTypeWeb;
- }
- @Value("${office.type.web:web}")
- public void setOfficeTypeWeb(String officeTypeWeb) {
- setOfficeTypeWebValue(officeTypeWeb);
- }
- public static void setOfficeTypeWebValue(String officeTypeWeb) {
- ConfigConstants.officeTypeWeb = officeTypeWeb;
- }
- public static Boolean getDeleteSourceFile() {
- return deleteSourceFile;
- }
- @Value("${delete.source.file:true}")
- public void setDeleteSourceFile(Boolean deleteSourceFile) {
- setDeleteSourceFileValue(deleteSourceFile);
- }
- public static void setDeleteSourceFileValue(Boolean deleteSourceFile) {
- ConfigConstants.deleteSourceFile = deleteSourceFile;
- }
- public static Boolean getDeleteCaptcha() {
- return deleteCaptcha;
- }
- @Value("${delete.captcha:false}")
- public void setDeleteCaptcha(Boolean deleteCaptcha) {
- setDeleteCaptchaValue(deleteCaptcha);
- }
- public static void setDeleteCaptchaValue(Boolean deleteCaptcha) {
- ConfigConstants.deleteCaptcha = deleteCaptcha;
- }
- /**
- * 以下为cad转换模块设置
- */
- public static String getCadPreviewType() {
- return cadPreviewType;
- }
- @Value("${cad.preview.type:svg}")
- public void setCadPreviewType(String cadPreviewType) {
- setCadPreviewTypeValue(cadPreviewType);
- }
- public static void setCadPreviewTypeValue(String cadPreviewType) {
- ConfigConstants.cadPreviewType = cadPreviewType;
- }
- public static String getCadTimeout() {
- return cadTimeout;
- }
- @Value("${cad.timeout:90}")
- public void setCadTimeout(String cadTimeout) {
- setCadTimeoutValue(cadTimeout);
- }
- public static void setCadTimeoutValue(String cadTimeout) {
- ConfigConstants.cadTimeout = cadTimeout;
- }
- public static int getCadThread() {
- return cadThread;
- }
- @Value("${cad.thread:5}")
- public void setCadThread(int cadThread) {
- setCadThreadValue(cadThread);
- }
- public static void setCadThreadValue(int cadThread) {
- ConfigConstants.cadThread = cadThread;
- }
- /**
- * 以下为OFFICE转换模块设置
- */
- public static String getOfficePageRange() {
- return officePageRange;
- }
- @Value("${office.pagerange:false}")
- public void setOfficePageRange(String officePageRange) {
- setOfficePageRangeValue(officePageRange);
- }
- public static void setOfficePageRangeValue(String officePageRange) {
- ConfigConstants.officePageRange = officePageRange;
- }
- public static String getOfficeWatermark() {
- return officeWatermark;
- }
- @Value("${office.watermark:false}")
- public void setOfficeWatermark(String officeWatermark) {
- setOfficeWatermarkValue(officeWatermark);
- }
- public static void setOfficeWatermarkValue(String officeWatermark) {
- ConfigConstants.officeWatermark = officeWatermark;
- }
- public static String getOfficeQuality() {
- return officeQuality;
- }
- @Value("${office.quality:80}")
- public void setOfficeQuality(String officeQuality) {
- setOfficeQualityValue(officeQuality);
- }
- public static void setOfficeQualityValue(String officeQuality) {
- ConfigConstants.officeQuality = officeQuality;
- }
- public static String getOfficeMaxImageResolution() {
- return officeMaxImageResolution;
- }
- @Value("${office.maximageresolution:150}")
- public void setOfficeMaxImageResolution(String officeMaxImageResolution) {
- setOfficeMaxImageResolutionValue(officeMaxImageResolution);
- }
- public static void setOfficeMaxImageResolutionValue(String officeMaxImageResolution) {
- ConfigConstants.officeMaxImageResolution = officeMaxImageResolution;
- }
- public static Boolean getOfficeExportBookmarks() {
- return officeExportBookmarks;
- }
- @Value("${office.exportbookmarks:true}")
- public void setOfficeExportBookmarks(Boolean officeExportBookmarks) {
- setOfficeExportBookmarksValue(officeExportBookmarks);
- }
- public static void setOfficeExportBookmarksValue(Boolean officeExportBookmarks) {
- ConfigConstants.officeExportBookmarks = officeExportBookmarks;
- }
- public static Boolean getOfficeExportNotes() {
- return officeExportNotes;
- }
- @Value("${office.exportnotes:true}")
- public void setExportNotes(Boolean officeExportNotes) {
- setOfficeExportNotesValue(officeExportNotes);
- }
- public static void setOfficeExportNotesValue(Boolean officeExportNotes) {
- ConfigConstants.officeExportNotes = officeExportNotes;
- }
- public static Boolean getOfficeDocumentOpenPasswords() {
- return officeDocumentOpenPasswords;
- }
- @Value("${office.documentopenpasswords:true}")
- public void setDocumentOpenPasswords(Boolean officeDocumentOpenPasswords) {
- setOfficeDocumentOpenPasswordsValue(officeDocumentOpenPasswords);
- }
- public static void setOfficeDocumentOpenPasswordsValue(Boolean officeDocumentOpenPasswords) {
- ConfigConstants.officeDocumentOpenPasswords = officeDocumentOpenPasswords;
- }
- /**
- * 以下为首页显示
- */
- public static String getBeian() {
- return beian;
- }
- @Value("${beian:default}")
- public void setBeian(String beian) {
- setBeianValue(beian);
- }
- public static void setBeianValue(String beian) {
- ConfigConstants.beian = beian;
- }
- public static String getHomePageNumber() {
- return homePageNumber;
- }
- @Value("${home.pagenumber:1}")
- public void setHomePageNumber(String homePageNumber) {
- setHomePageNumberValue(homePageNumber);
- }
- public static void setHomePageNumberValue(String homePageNumber) {
- ConfigConstants.homePageNumber = homePageNumber;
- }
- public static String getHomePagination() {
- return homePagination;
- }
- @Value("${home.pagination:true}")
- public void setHomePagination(String homePagination) {
- setHomePaginationValue(homePagination);
- }
- public static void setHomePaginationValue(String homePagination) {
- ConfigConstants.homePagination = homePagination;
- }
- public static String getHomePageSize() {
- return homePageSize;
- }
- @Value("${home.pagesize:15}")
- public void setHomePageSize(String homePageSize) {
- setHomePageSizeValue(homePageSize);
- }
- public static void setHomePageSizeValue(String homePageSize) {
- ConfigConstants.homePageSize = homePageSize;
- }
- public static String getHomeSearch() {
- return homeSearch;
- }
- @Value("${home.search:1}")
- public void setHomeSearch(String homeSearch) {
- setHomeSearchValue(homeSearch);
- }
- public static void setHomeSearchValue(String homeSearch) {
- ConfigConstants.homeSearch = homeSearch;
- }
- }
|