2022年5月6日 baiyuxin@surfbird.cn
This commit is contained in:
parent
c91c036ee3
commit
5e0a02fdcc
|
@ -126,6 +126,11 @@ public class GatewayArticle implements Serializable {
|
|||
@ApiModelProperty(value = "附件-英文版")
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private java.lang.String filesen;
|
||||
/**文章内容文件*/
|
||||
@Excel(name = "文章内容文件", width = 15)
|
||||
@ApiModelProperty(value = "文章内容文件")
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private java.lang.String contentFile;
|
||||
/**是否发布(Y:是N:否)*/
|
||||
@Excel(name = "是否发布(Y:是N:否)", width = 15)
|
||||
@ApiModelProperty(value = "是否发布")
|
||||
|
|
|
@ -0,0 +1,365 @@
|
|||
package org.jeecg.common.system.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 响应头文件类型集合
|
||||
* @author binzec
|
||||
*/
|
||||
public final class MimeUtils {
|
||||
|
||||
/**
|
||||
* KV对,K-mimeType,V-extension
|
||||
*/
|
||||
private static final Map<String, String> mimeTypeToExtensionMap = new HashMap<String, String>();
|
||||
/**
|
||||
* KV对,K-extension,V-mimeType
|
||||
*/
|
||||
private static final Map<String, String> extensionToMimeTypeMap = new HashMap<String, String>();
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public static void add(String mimeType, String extension) {
|
||||
if (!mimeTypeToExtensionMap.containsKey(mimeType)) {
|
||||
mimeTypeToExtensionMap.put(mimeType, extension);
|
||||
}
|
||||
extensionToMimeTypeMap.put(extension, mimeType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据extension获取mimeType
|
||||
*/
|
||||
public static String getByExtension(String extension) {
|
||||
if (extension == null || extension.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return extensionToMimeTypeMap.get(extension);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据mimeType获取extension
|
||||
*/
|
||||
public static String getByMimeType(String mimeType) {
|
||||
if (mimeType == null || mimeType.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return mimeTypeToExtensionMap.get(mimeType);
|
||||
}
|
||||
|
||||
/**
|
||||
* mimeType重复的,默认加载第一个
|
||||
*/
|
||||
static {
|
||||
add("application/andrew-inset", "ez");
|
||||
add("application/dsptype", "tsp");
|
||||
add("application/json", "json");
|
||||
add("application/futuresplash", "spl");
|
||||
add("application/hta", "hta");
|
||||
add("application/mac-binhex40", "hqx");
|
||||
add("application/mac-compactpro", "cpt");
|
||||
add("application/mathematica", "nb");
|
||||
add("application/msaccess", "mdb");
|
||||
add("application/oda", "oda");
|
||||
add("application/ogg", "ogg");
|
||||
add("application/pdf", "pdf");
|
||||
add("application/pgp-keys", "key");
|
||||
add("application/pgp-signature", "pgp");
|
||||
add("application/pics-rules", "prf");
|
||||
add("application/rar", "rar");
|
||||
add("application/rdf+xml", "rdf");
|
||||
add("application/rss+xml", "rss");
|
||||
add("application/zip", "zip");
|
||||
add("application/vnd.android.package-archive", "apk");
|
||||
add("application/vnd.cinderella", "cdy");
|
||||
add("application/vnd.ms-pki.stl", "stl");
|
||||
add("application/vnd.oasis.opendocument.database", "odb");
|
||||
add("application/vnd.oasis.opendocument.formula", "odf");
|
||||
add("application/vnd.oasis.opendocument.graphics", "odg");
|
||||
add("application/vnd.oasis.opendocument.graphics-template", "otg");
|
||||
add("application/vnd.oasis.opendocument.image", "odi");
|
||||
add("application/vnd.oasis.opendocument.spreadsheet", "ods");
|
||||
add("application/vnd.oasis.opendocument.spreadsheet-template", "ots");
|
||||
add("application/vnd.oasis.opendocument.text", "odt");
|
||||
add("application/vnd.oasis.opendocument.text-master", "odm");
|
||||
add("application/vnd.oasis.opendocument.text-template", "ott");
|
||||
add("application/vnd.oasis.opendocument.text-web", "oth");
|
||||
add("application/vnd.google-earth.kml+xml", "kml");
|
||||
add("application/vnd.google-earth.kmz", "kmz");
|
||||
add("application/msword", "doc");
|
||||
add("application/msword", "dot");
|
||||
add("application/vnd.openxmlformats-officedocument.wordprocessingml.document", "docx");
|
||||
add("application/vnd.openxmlformats-officedocument.wordprocessingml.template", "dotx");
|
||||
add("application/vnd.ms-excel", "xls");
|
||||
add("application/vnd.ms-excel", "xlt");
|
||||
add("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx");
|
||||
add("application/vnd.openxmlformats-officedocument.spreadsheetml.template", "xltx");
|
||||
add("application/vnd.ms-powerpoint", "ppt");
|
||||
add("application/vnd.ms-powerpoint", "pot");
|
||||
add("application/vnd.ms-powerpoint", "pps");
|
||||
add("application/vnd.openxmlformats-officedocument.presentationml.presentation", "pptx");
|
||||
add("application/vnd.openxmlformats-officedocument.presentationml.template", "potx");
|
||||
add("application/vnd.openxmlformats-officedocument.presentationml.slideshow", "ppsx");
|
||||
add("application/vnd.rim.cod", "cod");
|
||||
add("application/vnd.smaf", "mmf");
|
||||
add("application/vnd.stardivision.calc", "sdc");
|
||||
add("application/vnd.stardivision.draw", "sda");
|
||||
add("application/vnd.stardivision.impress", "sdd");
|
||||
add("application/vnd.stardivision.impress", "sdp");
|
||||
add("application/vnd.stardivision.math", "smf");
|
||||
add("application/vnd.stardivision.writer", "sdw");
|
||||
add("application/vnd.stardivision.writer", "vor");
|
||||
add("application/vnd.stardivision.writer-global", "sgl");
|
||||
add("application/vnd.sun.xml.calc", "sxc");
|
||||
add("application/vnd.sun.xml.calc.template", "stc");
|
||||
add("application/vnd.sun.xml.draw", "sxd");
|
||||
add("application/vnd.sun.xml.draw.template", "std");
|
||||
add("application/vnd.sun.xml.impress", "sxi");
|
||||
add("application/vnd.sun.xml.impress.template", "sti");
|
||||
add("application/vnd.sun.xml.math", "sxm");
|
||||
add("application/vnd.sun.xml.writer", "sxw");
|
||||
add("application/vnd.sun.xml.writer.global", "sxg");
|
||||
add("application/vnd.sun.xml.writer.template", "stw");
|
||||
add("application/vnd.visio", "vsd");
|
||||
add("application/x-abiword", "abw");
|
||||
add("application/x-apple-diskimage", "dmg");
|
||||
add("application/x-bcpio", "bcpio");
|
||||
add("application/x-bittorrent", "torrent");
|
||||
add("application/x-cdf", "cdf");
|
||||
add("application/x-cdlink", "vcd");
|
||||
add("application/x-chess-pgn", "pgn");
|
||||
add("application/x-cpio", "cpio");
|
||||
add("application/x-debian-package", "deb");
|
||||
add("application/x-debian-package", "udeb");
|
||||
add("application/x-director", "dcr");
|
||||
add("application/x-director", "dir");
|
||||
add("application/x-director", "dxr");
|
||||
add("application/x-dms", "dms");
|
||||
add("application/x-doom", "wad");
|
||||
add("application/x-dvi", "dvi");
|
||||
add("application/x-flac", "flac");
|
||||
add("application/x-font", "pfa");
|
||||
add("application/x-font", "pfb");
|
||||
add("application/x-font", "gsf");
|
||||
add("application/x-font", "pcf");
|
||||
add("application/x-font", "pcf.Z");
|
||||
add("application/x-freemind", "mm");
|
||||
add("application/x-futuresplash", "spl");
|
||||
add("application/x-gnumeric", "gnumeric");
|
||||
add("application/x-go-sgf", "sgf");
|
||||
add("application/x-graphing-calculator", "gcf");
|
||||
add("application/x-gtar", "gtar");
|
||||
add("application/x-gtar", "tgz");
|
||||
add("application/x-gtar", "taz");
|
||||
add("application/x-hdf", "hdf");
|
||||
add("application/x-ica", "ica");
|
||||
add("application/x-internet-signup", "ins");
|
||||
add("application/x-internet-signup", "isp");
|
||||
add("application/x-iphone", "iii");
|
||||
add("application/x-iso9660-image", "iso");
|
||||
add("application/x-jmol", "jmz");
|
||||
add("application/x-kchart", "chrt");
|
||||
add("application/x-killustrator", "kil");
|
||||
add("application/x-koan", "skp");
|
||||
add("application/x-koan", "skd");
|
||||
add("application/x-koan", "skt");
|
||||
add("application/x-koan", "skm");
|
||||
add("application/x-kpresenter", "kpr");
|
||||
add("application/x-kpresenter", "kpt");
|
||||
add("application/x-kspread", "ksp");
|
||||
add("application/x-kword", "kwd");
|
||||
add("application/x-kword", "kwt");
|
||||
add("application/x-latex", "latex");
|
||||
add("application/x-lha", "lha");
|
||||
add("application/x-lzh", "lzh");
|
||||
add("application/x-lzx", "lzx");
|
||||
add("application/x-maker", "frm");
|
||||
add("application/x-maker", "maker");
|
||||
add("application/x-maker", "frame");
|
||||
add("application/x-maker", "fb");
|
||||
add("application/x-maker", "book");
|
||||
add("application/x-maker", "fbdoc");
|
||||
add("application/x-mif", "mif");
|
||||
add("application/x-ms-wmd", "wmd");
|
||||
add("application/x-ms-wmz", "wmz");
|
||||
add("application/x-msi", "msi");
|
||||
add("application/x-ns-proxy-autoconfig", "pac");
|
||||
add("application/x-nwc", "nwc");
|
||||
add("application/x-object", "o");
|
||||
add("application/x-oz-application", "oza");
|
||||
add("application/x-pkcs12", "p12");
|
||||
add("application/x-pkcs12", "pfx");
|
||||
add("application/x-pkcs7-certreqresp", "p7r");
|
||||
add("application/x-pkcs7-crl", "crl");
|
||||
add("application/x-quicktimeplayer", "qtl");
|
||||
add("application/x-shar", "shar");
|
||||
add("application/x-shockwave-flash", "swf");
|
||||
add("application/x-stuffit", "sit");
|
||||
add("application/x-sv4cpio", "sv4cpio");
|
||||
add("application/x-sv4crc", "sv4crc");
|
||||
add("application/x-tar", "tar");
|
||||
add("application/x-texinfo", "texinfo");
|
||||
add("application/x-texinfo", "texi");
|
||||
add("application/x-troff", "t");
|
||||
add("application/x-troff", "roff");
|
||||
add("application/x-troff-man", "man");
|
||||
add("application/x-ustar", "ustar");
|
||||
add("application/x-wais-source", "src");
|
||||
add("application/x-wingz", "wz");
|
||||
add("application/x-webarchive", "webarchive");
|
||||
add("application/x-webarchive-xml", "webarchivexml");
|
||||
add("application/x-x509-ca-cert", "crt");
|
||||
add("application/x-x509-user-cert", "crt");
|
||||
add("application/x-xcf", "xcf");
|
||||
add("application/x-xfig", "fig");
|
||||
add("application/xhtml+xml", "xhtml");
|
||||
add("audio/3gpp", "3gpp");
|
||||
add("audio/amr", "amr");
|
||||
add("audio/basic", "snd");
|
||||
add("audio/midi", "mid");
|
||||
add("audio/midi", "midi");
|
||||
add("audio/midi", "kar");
|
||||
add("audio/midi", "xmf");
|
||||
add("audio/mobile-xmf", "mxmf");
|
||||
add("audio/mpeg", "mpga");
|
||||
add("audio/mpeg", "mpega");
|
||||
add("audio/mpeg", "mp2");
|
||||
add("audio/mpeg", "mp3");
|
||||
add("audio/mpeg", "m4a");
|
||||
add("audio/mpegurl", "m3u");
|
||||
add("audio/prs.sid", "sid");
|
||||
add("audio/x-aiff", "aif");
|
||||
add("audio/x-aiff", "aiff");
|
||||
add("audio/x-aiff", "aifc");
|
||||
add("audio/x-gsm", "gsm");
|
||||
add("audio/x-mpegurl", "m3u");
|
||||
add("audio/x-ms-wma", "wma");
|
||||
add("audio/x-ms-wax", "wax");
|
||||
add("audio/x-pn-realaudio", "ra");
|
||||
add("audio/x-pn-realaudio", "rm");
|
||||
add("audio/x-pn-realaudio", "ram");
|
||||
add("audio/x-realaudio", "ra");
|
||||
add("audio/x-scpls", "pls");
|
||||
add("audio/x-sd2", "sd2");
|
||||
add("audio/x-wav", "wav");
|
||||
add("image/bmp", "bmp");
|
||||
add("image/gif", "gif");
|
||||
add("image/ico", "cur");
|
||||
add("image/ico", "ico");
|
||||
add("image/ief", "ief");
|
||||
add("image/jpeg", "jpeg");
|
||||
add("image/jpeg", "jpg");
|
||||
add("image/jpeg", "jpe");
|
||||
add("image/pcx", "pcx");
|
||||
add("image/png", "png");
|
||||
add("image/svg+xml", "svg");
|
||||
add("image/svg+xml", "svgz");
|
||||
add("image/tiff", "tiff");
|
||||
add("image/tiff", "tif");
|
||||
add("image/vnd.djvu", "djvu");
|
||||
add("image/vnd.djvu", "djv");
|
||||
add("image/vnd.wap.wbmp", "wbmp");
|
||||
add("image/x-cmu-raster", "ras");
|
||||
add("image/x-coreldraw", "cdr");
|
||||
add("image/x-coreldrawpattern", "pat");
|
||||
add("image/x-coreldrawtemplate", "cdt");
|
||||
add("image/x-corelphotopaint", "cpt");
|
||||
add("image/x-icon", "ico");
|
||||
add("image/x-jg", "art");
|
||||
add("image/x-jng", "jng");
|
||||
add("image/x-ms-bmp", "bmp");
|
||||
add("image/x-photoshop", "psd");
|
||||
add("image/x-portable-anymap", "pnm");
|
||||
add("image/x-portable-bitmap", "pbm");
|
||||
add("image/x-portable-graymap", "pgm");
|
||||
add("image/x-portable-pixmap", "ppm");
|
||||
add("image/x-rgb", "rgb");
|
||||
add("image/x-xbitmap", "xbm");
|
||||
add("image/x-xpixmap", "xpm");
|
||||
add("image/x-xwindowdump", "xwd");
|
||||
add("model/iges", "igs");
|
||||
add("model/iges", "iges");
|
||||
add("model/mesh", "msh");
|
||||
add("model/mesh", "mesh");
|
||||
add("model/mesh", "silo");
|
||||
add("text/calendar", "ics");
|
||||
add("text/calendar", "icz");
|
||||
add("text/comma-separated-values", "csv");
|
||||
add("text/css", "css");
|
||||
add("text/html", "htm");
|
||||
add("text/html", "html");
|
||||
add("text/h323", "323");
|
||||
add("text/iuls", "uls");
|
||||
add("text/mathml", "mml");
|
||||
add("text/plain", "txt");
|
||||
add("text/plain", "asc");
|
||||
add("text/plain", "text");
|
||||
add("text/plain", "diff");
|
||||
add("text/plain", "po");
|
||||
add("text/richtext", "rtx");
|
||||
add("text/rtf", "rtf");
|
||||
add("text/texmacs", "ts");
|
||||
add("text/text", "phps");
|
||||
add("text/tab-separated-values", "tsv");
|
||||
add("text/xml", "xml");
|
||||
add("text/x-bibtex", "bib");
|
||||
add("text/x-boo", "boo");
|
||||
add("text/x-c++hdr", "h++");
|
||||
add("text/x-c++hdr", "hpp");
|
||||
add("text/x-c++hdr", "hxx");
|
||||
add("text/x-c++hdr", "hh");
|
||||
add("text/x-c++src", "c++");
|
||||
add("text/x-c++src", "cpp");
|
||||
add("text/x-c++src", "cxx");
|
||||
add("text/x-chdr", "h");
|
||||
add("text/x-component", "htc");
|
||||
add("text/x-csh", "csh");
|
||||
add("text/x-csrc", "c");
|
||||
add("text/x-dsrc", "d");
|
||||
add("text/x-haskell", "hs");
|
||||
add("text/x-java", "java");
|
||||
add("text/x-literate-haskell", "lhs");
|
||||
add("text/x-moc", "moc");
|
||||
add("text/x-pascal", "p");
|
||||
add("text/x-pascal", "pas");
|
||||
add("text/x-pcs-gcd", "gcd");
|
||||
add("text/x-setext", "etx");
|
||||
add("text/x-tcl", "tcl");
|
||||
add("text/x-tex", "tex");
|
||||
add("text/x-tex", "ltx");
|
||||
add("text/x-tex", "sty");
|
||||
add("text/x-tex", "cls");
|
||||
add("text/x-vcalendar", "vcs");
|
||||
add("text/x-vcard", "vcf");
|
||||
add("video/3gpp", "3gpp");
|
||||
add("video/3gpp", "3gp");
|
||||
add("video/3gpp", "3g2");
|
||||
add("video/dl", "dl");
|
||||
add("video/dv", "dif");
|
||||
add("video/dv", "dv");
|
||||
add("video/fli", "fli");
|
||||
add("video/m4v", "m4v");
|
||||
add("video/mpeg", "mpeg");
|
||||
add("video/mpeg", "mpg");
|
||||
add("video/mpeg", "mpe");
|
||||
add("video/mp4", "mp4");
|
||||
add("video/mpeg", "VOB");
|
||||
add("video/quicktime", "qt");
|
||||
add("video/quicktime", "mov");
|
||||
add("video/vnd.mpegurl", "mxu");
|
||||
add("video/x-la-asf", "lsf");
|
||||
add("video/x-la-asf", "lsx");
|
||||
add("video/x-mng", "mng");
|
||||
add("video/x-ms-asf", "asf");
|
||||
add("video/x-ms-asf", "asx");
|
||||
add("video/x-ms-wm", "wm");
|
||||
add("video/x-ms-wmv", "wmv");
|
||||
add("video/x-ms-wmx", "wmx");
|
||||
add("video/x-ms-wvx", "wvx");
|
||||
add("video/x-msvideo", "avi");
|
||||
add("video/x-sgi-movie", "movie");
|
||||
add("x-conference/x-cooltalk", "ice");
|
||||
add("x-epoc/x-sisx-app", "sisx");
|
||||
}
|
||||
}
|
|
@ -90,6 +90,7 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/sys/user/passwordChange", "anon");//用户更改密码
|
||||
filterChainDefinitionMap.put("/auth/2step-code", "anon");//登录验证码
|
||||
filterChainDefinitionMap.put("/sys/common/static/**", "anon");//图片预览 &下载文件不限制token
|
||||
filterChainDefinitionMap.put("/sys/common/autoViweStatic/**", "anon");//图片预览 &下载文件不限制token
|
||||
filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览
|
||||
//filterChainDefinitionMap.put("/sys/common/view/**", "anon");//图片预览不限制token
|
||||
//filterChainDefinitionMap.put("/sys/common/download/**", "anon");//文件下载不限制token
|
||||
|
@ -141,6 +142,8 @@ public class ShiroConfig {
|
|||
//前台免登陆
|
||||
// filterChainDefinitionMap.put("/gateway/**/", "anon");//前台免登陆
|
||||
filterChainDefinitionMap.put("/gateway/**", "anon");//前台免登陆
|
||||
filterChainDefinitionMap.put("/sys/dict/getDictItems/**", "anon");//字典查询
|
||||
|
||||
|
||||
//性能监控 TODO 存在安全漏洞
|
||||
//filterChainDefinitionMap.put("/actuator/**", "anon");
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.apache.commons.lang.StringUtils;
|
|||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.util.MimeUtils;
|
||||
import org.jeecg.common.util.CommonUtils;
|
||||
import org.jeecg.common.util.RestUtil;
|
||||
import org.jeecg.common.util.TokenUtils;
|
||||
|
@ -268,6 +269,74 @@ public class CommonController {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:根据文件扩展名来决定下载与否
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/autoViweStatic/**")
|
||||
public void pdfPreview(HttpServletRequest request, HttpServletResponse response) {
|
||||
// ISO-8859-1 ==> UTF-8 进行编码转换
|
||||
String imgPath = extractPathFromPattern(request);
|
||||
if(oConvertUtils.isEmpty(imgPath) || imgPath=="null"){
|
||||
return;
|
||||
}
|
||||
// 其余处理略
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
try {
|
||||
imgPath = imgPath.replace("..", "");
|
||||
if (imgPath.endsWith(",")) {
|
||||
imgPath = imgPath.substring(0, imgPath.length() - 1);
|
||||
}
|
||||
String filePath = uploadpath + File.separator + imgPath;
|
||||
File file = new File(filePath);
|
||||
if(!file.exists()){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件不存在..");
|
||||
}
|
||||
String lastName= "pdf";
|
||||
if(StringUtils.lastIndexOf(filePath,".") != -1){
|
||||
lastName = StringUtils.substring(filePath,StringUtils.lastIndexOf(filePath,".") +1);
|
||||
lastName = lastName.toLowerCase();
|
||||
}
|
||||
|
||||
response.setContentType(MimeUtils.getByExtension(lastName) + ";charset=UTF-8");
|
||||
response.addHeader("Content-Disposition", "inline;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
|
||||
inputStream = new BufferedInputStream(new FileInputStream(filePath));
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
outputStream.write(buf, 0, len);
|
||||
}
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
log.error("预览文件失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
//e.printStackTrace();
|
||||
} catch (RuntimeException e) {
|
||||
log.error("预览文件失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// /**
|
||||
// * 下载文件
|
||||
// * 请求地址:http://localhost:8080/common/download/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
|
||||
|
|
|
@ -7,7 +7,7 @@ server:
|
|||
include-stacktrace: ALWAYS
|
||||
include-message: ALWAYS
|
||||
servlet:
|
||||
context-path: /nyzy
|
||||
context-path: /ndsbw
|
||||
compression:
|
||||
enabled: true
|
||||
min-response-size: 1024
|
||||
|
@ -19,11 +19,15 @@ management:
|
|||
exposure:
|
||||
include: metrics,httptrace
|
||||
|
||||
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 10MB
|
||||
enabled: true
|
||||
# 上传的文件大小
|
||||
max-file-size: 500MB
|
||||
# 表单大小
|
||||
max-request-size: 500MB
|
||||
mail:
|
||||
host: smtp.exmail.qq.com
|
||||
username: xiuzhiming@surfbird.cn
|
||||
|
@ -131,9 +135,9 @@ spring:
|
|||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/nyzy_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3307/ndsbw_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: admin
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 多数据源配置
|
||||
#multi-datasource1:
|
||||
|
@ -167,7 +171,7 @@ mybatis-plus:
|
|||
table-underline: true
|
||||
configuration:
|
||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 返回类型为Map,显示null对应的字段
|
||||
call-setters-on-nulls: true
|
||||
#jeecg专用配置
|
||||
|
@ -248,7 +252,8 @@ cas:
|
|||
#Mybatis输出sql日志
|
||||
logging:
|
||||
level:
|
||||
org.jeecg.modules.system.mapper : info
|
||||
org.jeecg.modules.system.mapper : debug
|
||||
com.nd : debug
|
||||
#enable swagger
|
||||
swagger:
|
||||
enable: true
|
||||
|
|
|
@ -7,7 +7,7 @@ server:
|
|||
include-stacktrace: ALWAYS
|
||||
include-message: ALWAYS
|
||||
servlet:
|
||||
context-path: /nyzy
|
||||
context-path: /ndsbw
|
||||
compression:
|
||||
enabled: true
|
||||
min-response-size: 1024
|
||||
|
@ -22,8 +22,11 @@ management:
|
|||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 10MB
|
||||
enabled: true
|
||||
# 上传的文件大小
|
||||
max-file-size: 500MB
|
||||
# 表单大小
|
||||
max-request-size: 500MB
|
||||
mail:
|
||||
host: smtp.163.com
|
||||
username: jeecgos@163.com
|
||||
|
@ -131,7 +134,7 @@ spring:
|
|||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/nyzy_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/ndsbw_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
@ -248,7 +251,8 @@ cas:
|
|||
#Mybatis输出sql日志
|
||||
logging:
|
||||
level:
|
||||
org.jeecg.modules.system.mapper : debug
|
||||
org.jeecg.modules.system.mapper : info
|
||||
com.nd : info
|
||||
#enable swagger
|
||||
swagger:
|
||||
enable: false
|
||||
|
|
Loading…
Reference in New Issue