mybatis3.3.0和mybatis3.3.1中的org.apache.ibatis.io.DefaultVFS中的logger的參數錯誤
private static final Log log = LogFactory.getLog(ResolverUtil.class);
應該是
private static final Log log = LogFactory.getLog(DefaultVFS.class);
這個bug在3.4.2中已經修復
=============================
出現這個問題的原因是logback記日志的時候亂碼
ResolverUtil - Not a JAR: file:。。。。。。
ResolverUtil - Reader entry: ����
結果在ResolverUtil中根本找不到logger,后來用search and replace搜索jar包才找到這個bug,暈死
亂碼的問題還是沒解決,看了DefaultVFS的源碼,應該是
中的InputStreamReader沒有傳第二個參數導致
private static final Log log = LogFactory.getLog(ResolverUtil.class);
應該是
private static final Log log = LogFactory.getLog(DefaultVFS.class);
這個bug在3.4.2中已經修復
=============================
出現這個問題的原因是logback記日志的時候亂碼
ResolverUtil - Not a JAR: file:。。。。。。
ResolverUtil - Reader entry: ����
結果在ResolverUtil中根本找不到logger,后來用search and replace搜索jar包才找到這個bug,暈死
亂碼的問題還是沒解決,看了DefaultVFS的源碼,應該是
- /*
- * Some servlet containers allow reading from directory resources like a
- * text file, listing the child resources one per line. However, there is no
- * way to differentiate between directory and file resources just by reading
- * them. To work around that, as each line is read, try to look it up via
- * the class loader as a child of the current resource. If any line fails
- * then we assume the current resource is not a directory.
- */
- is = url.openStream();
- BufferedReader reader = new BufferedReader(new InputStreamReader(is));
- List<String> lines = new ArrayList<String>();
- for (String line; (line = reader.readLine()) != null;) {
- if (log.isDebugEnabled()) {
- log.debug("Reader entry: " + line);
- }
- lines.add(line);
- if (getResources(path + "/" + line).isEmpty()) {
- lines.clear();
- break;
- }
- }
中的InputStreamReader沒有傳第二個參數導致