上传文件按日期存储及部分文件路径位置

pull/72/head
RuoYi 2019-01-31 11:45:55 +08:00
parent 4829163bab
commit 742846b421
34 changed files with 121 additions and 95 deletions

View File

@ -53,11 +53,17 @@
<dependencies> <dependencies>
<!--Spring框架基本的核心工具--> <!-- Spring框架基本的核心工具 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId> <artifactId>spring-context-support</artifactId>
</dependency> </dependency>
<!-- SpringWeb模块 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<!-- SpringBoot集成mybatis框架 --> <!-- SpringBoot集成mybatis框架 -->
<dependency> <dependency>

View File

@ -14,9 +14,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.base.AjaxResult; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.config.Global; import com.ruoyi.common.config.Global;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.framework.config.ServerConfig; import com.ruoyi.framework.config.ServerConfig;
import com.ruoyi.framework.util.FileUploadUtils;
/** /**
* *

View File

@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.base.AjaxResult; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.util.ServletUtils;
import com.ruoyi.framework.web.base.BaseController; import com.ruoyi.framework.web.base.BaseController;
/** /**

View File

@ -16,8 +16,8 @@ import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.config.Global; import com.ruoyi.common.config.Global;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.framework.shiro.service.SysPasswordService; import com.ruoyi.framework.shiro.service.SysPasswordService;
import com.ruoyi.framework.util.FileUploadUtils;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysDictDataService; import com.ruoyi.system.service.ISysDictDataService;

View File

@ -22,13 +22,10 @@ user.notfound=请重新登录
user.forcelogout=管理员强制退出,请重新登录 user.forcelogout=管理员强制退出,请重新登录
user.unknown.error=未知错误,请重新登录 user.unknown.error=未知错误,请重新登录
#批量插入用户错误信息 ##文件上传消息
user.import.excel.null=Excel数据为空请按照导入模板填写数据 upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB
user.import.excel.data.null=Excel数据为空只有标题行请按照导入模板填写数据 upload.filename.exceed.length=上传的文件名最长{0}个字符
user.import.excel.filetype.error=文件不是Excel文件
user.import.excel.file.error=文件名为空,文件为空
user.import.excel.fileinput.error=获取Excel2003流错误
user.import.excel.fileinputx.error=获取Excel2007流错误
##权限 ##权限
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]

View File

@ -15,7 +15,7 @@
// 判断是否 iphone // 判断是否 iphone
var isIPhone = function () { var isIPhone = function () {
let browserName = navigator.userAgent.toLowerCase(); var browserName = navigator.userAgent.toLowerCase();
return /(iPhone|iPad|iPod|iOS)/i.test(browserName); return /(iPhone|iPad|iPod|iOS)/i.test(browserName);
}; };

View File

@ -1,7 +1,7 @@
package com.ruoyi.framework.web.exception.base; package com.ruoyi.common.exception.base;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.util.MessageUtils;
/** /**
* *

View File

@ -0,0 +1,19 @@
package com.ruoyi.common.exception.file;
import com.ruoyi.common.exception.base.BaseException;
/**
*
*
* @author ruoyi
*/
public class FileException extends BaseException
{
private static final long serialVersionUID = 1L;
public FileException(String code, Object[] args)
{
super("file", code, args, null);
}
}

View File

@ -1,39 +1,16 @@
package com.ruoyi.common.exception.file; package com.ruoyi.common.exception.file;
import org.apache.commons.fileupload.FileUploadException;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
public class FileNameLengthLimitExceededException extends FileUploadException public class FileNameLengthLimitExceededException extends FileException
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private int length;
private int maxLength;
private String filename;
public FileNameLengthLimitExceededException(String filename, int length, int maxLength) public FileNameLengthLimitExceededException(int defaultFileNameLength)
{ {
super("file name : [" + filename + "], length : [" + length + "], max length : [" + maxLength + "]"); super("upload.filename.exceed.length", new Object[] { defaultFileNameLength });
this.length = length;
this.maxLength = maxLength;
this.filename = filename;
}
public String getFilename()
{
return filename;
}
public int getLength()
{
return length;
}
public int getMaxLength()
{
return maxLength;
} }
} }

View File

@ -0,0 +1,16 @@
package com.ruoyi.common.exception.file;
/**
*
*
* @author ruoyi
*/
public class FileSizeLimitExceededException extends FileException
{
private static final long serialVersionUID = 1L;
public FileSizeLimitExceededException(long defaultMaxSize)
{
super("upload.exceed.maxSize", new Object[] { defaultMaxSize });
}
}

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,6 +1,6 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
import com.ruoyi.framework.web.exception.base.BaseException; import com.ruoyi.common.exception.base.BaseException;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.exception.user; package com.ruoyi.common.exception.user;
/** /**
* *

View File

@ -1,8 +1,7 @@
package com.ruoyi.framework.web.page; package com.ruoyi.common.page;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.page.PageDomain; import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.framework.util.ServletUtils;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.util; package com.ruoyi.common.utils;
import org.springframework.context.MessageSource; import org.springframework.context.MessageSource;
import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.common.utils.spring.SpringUtils;

View File

@ -1,4 +1,4 @@
package com.ruoyi.framework.util; package com.ruoyi.common.utils;
import java.io.IOException; import java.io.IOException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -8,7 +8,6 @@ import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import com.ruoyi.common.support.Convert; import com.ruoyi.common.support.Convert;
import com.ruoyi.common.utils.StringUtils;
/** /**
* *

View File

@ -1,11 +1,12 @@
package com.ruoyi.framework.util; package com.ruoyi.common.utils.file;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import org.apache.tomcat.util.http.fileupload.FileUploadBase.FileSizeLimitExceededException;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.config.Global; import com.ruoyi.common.config.Global;
import com.ruoyi.common.exception.file.FileNameLengthLimitExceededException; import com.ruoyi.common.exception.file.FileNameLengthLimitExceededException;
import com.ruoyi.common.exception.file.FileSizeLimitExceededException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.Md5Utils; import com.ruoyi.common.utils.Md5Utils;
/** /**
@ -18,18 +19,18 @@ public class FileUploadUtils
/** /**
* 50M * 50M
*/ */
public static final long DEFAULT_MAX_SIZE = 52428800; public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
/**
* 100
*/
public static final int DEFAULT_FILE_NAME_LENGTH = 100;
/** /**
* *
*/ */
private static String defaultBaseDir = Global.getProfile(); private static String defaultBaseDir = Global.getProfile();
/**
*
*/
public static final int DEFAULT_FILE_NAME_LENGTH = 200;
/** /**
* jpg * jpg
*/ */
@ -62,7 +63,7 @@ public class FileUploadUtils
} }
catch (Exception e) catch (Exception e)
{ {
throw new IOException(e); throw new IOException(e.getMessage(), e);
} }
} }
@ -82,7 +83,7 @@ public class FileUploadUtils
} }
catch (Exception e) catch (Exception e)
{ {
throw new IOException(e); throw new IOException(e.getMessage(), e);
} }
} }
@ -104,19 +105,25 @@ public class FileUploadUtils
int fileNamelength = file.getOriginalFilename().length(); int fileNamelength = file.getOriginalFilename().length();
if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
{ {
throw new FileNameLengthLimitExceededException(file.getOriginalFilename(), fileNamelength, throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
} }
assertAllowed(file); assertAllowed(file);
String fileName = encodingFilename(file.getOriginalFilename(), extension); String fileName = extractFilename(file, extension);
File desc = getAbsoluteFile(baseDir, baseDir + fileName); File desc = getAbsoluteFile(baseDir, baseDir + fileName);
file.transferTo(desc); file.transferTo(desc);
return fileName; return fileName;
} }
public static final String extractFilename(MultipartFile file, String extension)
{
String filename = file.getOriginalFilename();
filename = DateUtils.datePath() + "/" + encodingFilename(filename) + extension;
return filename;
}
private static final File getAbsoluteFile(String uploadDir, String filename) throws IOException private static final File getAbsoluteFile(String uploadDir, String filename) throws IOException
{ {
File desc = new File(File.separator + filename); File desc = new File(File.separator + filename);
@ -135,10 +142,10 @@ public class FileUploadUtils
/** /**
* *
*/ */
private static final String encodingFilename(String filename, String extension) private static final String encodingFilename(String filename)
{ {
filename = filename.replace("_", " "); filename = filename.replace("_", " ");
filename = Md5Utils.hash(filename + System.nanoTime() + counter++) + extension; filename = Md5Utils.hash(filename + System.nanoTime() + counter++);
return filename; return filename;
} }
@ -154,7 +161,7 @@ public class FileUploadUtils
long size = file.getSize(); long size = file.getSize();
if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE)
{ {
throw new FileSizeLimitExceededException("not allowed upload upload", size, DEFAULT_MAX_SIZE); throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024);
} }
} }
} }

View File

@ -15,10 +15,10 @@ import org.springframework.stereotype.Component;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessStatus; import com.ruoyi.common.enums.BusinessStatus;
import com.ruoyi.common.json.JSON; import com.ruoyi.common.json.JSON;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.manager.AsyncManager; import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory; import com.ruoyi.framework.manager.factory.AsyncFactory;
import com.ruoyi.framework.util.ServletUtils;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysOperLog; import com.ruoyi.system.domain.SysOperLog;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;

View File

@ -2,7 +2,8 @@ package com.ruoyi.framework.config;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.ruoyi.framework.util.ServletUtils;
import com.ruoyi.common.utils.ServletUtils;
/** /**
* *

View File

@ -5,10 +5,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.utils.AddressUtils; import com.ruoyi.common.utils.AddressUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.framework.shiro.session.OnlineSession; import com.ruoyi.framework.shiro.session.OnlineSession;
import com.ruoyi.framework.util.LogUtils; import com.ruoyi.framework.util.LogUtils;
import com.ruoyi.framework.util.ServletUtils;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysLogininfor; import com.ruoyi.system.domain.SysLogininfor;
import com.ruoyi.system.domain.SysOperLog; import com.ruoyi.system.domain.SysOperLog;

View File

@ -19,14 +19,15 @@ import org.apache.shiro.subject.PrincipalCollection;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.RoleBlockedException;
import com.ruoyi.common.exception.user.UserBlockedException;
import com.ruoyi.common.exception.user.UserNotExistsException;
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
import com.ruoyi.framework.shiro.service.SysLoginService; import com.ruoyi.framework.shiro.service.SysLoginService;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.exception.user.CaptchaException;
import com.ruoyi.framework.web.exception.user.RoleBlockedException;
import com.ruoyi.framework.web.exception.user.UserBlockedException;
import com.ruoyi.framework.web.exception.user.UserNotExistsException;
import com.ruoyi.framework.web.exception.user.UserPasswordNotMatchException;
import com.ruoyi.framework.web.exception.user.UserPasswordRetryLimitExceedException;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysMenuService; import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;

View File

@ -7,17 +7,17 @@ import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constant.ShiroConstants; import com.ruoyi.common.constant.ShiroConstants;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.enums.UserStatus; import com.ruoyi.common.enums.UserStatus;
import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.UserBlockedException;
import com.ruoyi.common.exception.user.UserDeleteException;
import com.ruoyi.common.exception.user.UserNotExistsException;
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.framework.manager.AsyncManager; import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory; import com.ruoyi.framework.manager.factory.AsyncFactory;
import com.ruoyi.framework.util.MessageUtils;
import com.ruoyi.framework.util.ServletUtils;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.exception.user.CaptchaException;
import com.ruoyi.framework.web.exception.user.UserBlockedException;
import com.ruoyi.framework.web.exception.user.UserDeleteException;
import com.ruoyi.framework.web.exception.user.UserNotExistsException;
import com.ruoyi.framework.web.exception.user.UserPasswordNotMatchException;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;

View File

@ -9,11 +9,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.framework.manager.AsyncManager; import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory; import com.ruoyi.framework.manager.factory.AsyncFactory;
import com.ruoyi.framework.util.MessageUtils;
import com.ruoyi.framework.web.exception.user.UserPasswordNotMatchException;
import com.ruoyi.framework.web.exception.user.UserPasswordRetryLimitExceedException;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;
/** /**

View File

@ -7,7 +7,8 @@ import org.apache.shiro.session.mgt.SessionFactory;
import org.apache.shiro.web.session.mgt.WebSessionContext; import org.apache.shiro.web.session.mgt.WebSessionContext;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.ruoyi.common.utils.IpUtils; import com.ruoyi.common.utils.IpUtils;
import com.ruoyi.framework.util.ServletUtils; import com.ruoyi.common.utils.ServletUtils;
import eu.bitwalker.useragentutils.UserAgent; import eu.bitwalker.useragentutils.UserAgent;
/** /**

View File

@ -7,10 +7,10 @@ import org.apache.shiro.subject.Subject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.manager.AsyncManager; import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory; import com.ruoyi.framework.manager.factory.AsyncFactory;
import com.ruoyi.framework.util.MessageUtils;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;

View File

@ -2,6 +2,7 @@ package com.ruoyi.framework.util;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import com.ruoyi.common.constant.PermissionConstants; import com.ruoyi.common.constant.PermissionConstants;
import com.ruoyi.common.utils.MessageUtils;
/** /**
* permission * permission

View File

@ -10,10 +10,10 @@ import com.github.pagehelper.PageInfo;
import com.ruoyi.common.base.AjaxResult; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.page.PageDomain; import com.ruoyi.common.page.PageDomain;
import com.ruoyi.common.page.TableDataInfo; import com.ruoyi.common.page.TableDataInfo;
import com.ruoyi.common.page.TableSupport;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableSupport;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;
/** /**

View File

@ -219,6 +219,7 @@ public class GenUtils
javaTypeMap.put("smallint", "Integer"); javaTypeMap.put("smallint", "Integer");
javaTypeMap.put("mediumint", "Integer"); javaTypeMap.put("mediumint", "Integer");
javaTypeMap.put("int", "Integer"); javaTypeMap.put("int", "Integer");
javaTypeMap.put("number", "Integer");
javaTypeMap.put("integer", "integer"); javaTypeMap.put("integer", "integer");
javaTypeMap.put("bigint", "Long"); javaTypeMap.put("bigint", "Long");
javaTypeMap.put("float", "Float"); javaTypeMap.put("float", "Float");
@ -227,6 +228,7 @@ public class GenUtils
javaTypeMap.put("bit", "Boolean"); javaTypeMap.put("bit", "Boolean");
javaTypeMap.put("char", "String"); javaTypeMap.put("char", "String");
javaTypeMap.put("varchar", "String"); javaTypeMap.put("varchar", "String");
javaTypeMap.put("varchar2", "String");
javaTypeMap.put("tinytext", "String"); javaTypeMap.put("tinytext", "String");
javaTypeMap.put("text", "String"); javaTypeMap.put("text", "String");
javaTypeMap.put("mediumtext", "String"); javaTypeMap.put("mediumtext", "String");