2018-03-26 15:01
@JFinal 还是不行 PathKit.getWebRootPath()这个方法 也是有问题的
2018-03-26 14:35
@JFinal 部署在linux 上去才发现有问题 ,我找了几天的原因 后面 才发现是我的一个类里面调用了 getRootClassPath()
2018-03-26 14:16
@JFinal 是不是我版本有问题
/**
* Copyright (c) 2011-2016, James Zhan 詹波 (jfinal@126.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jfinal.kit;
import java.io.File;
/**
* new File("..\path\abc.txt") 中的三个方法获取路径的方法
* 1: getPath() 获取相对路径,例如 ..\path\abc.txt
* 2: getAbslutlyPath() 获取绝对路径,但可能包含 ".." 或 "." 字符,例如 D:\otherPath\..\path\abc.txt
* 3: getCanonicalPath() 获取绝对路径,但不包含 ".." 或 "." 字符,例如 D:\path\abc.txt
*/
public class PathKit {
2018-03-26 14:14
@JFinal private String classpath = PathKit.getRootClassPath();
private String libDir = PathKit.getWebRootPath() + File.separator + "WEB-INF" + File.separator + "lib";
2018-03-26 14:12
@JFinal 开发是在windows下开发的 ,部署在liunx上去 就跑不起来 ,部署在windows服务器 就可以正常运行