Skip to content

eclipse 下编译代码部署到tomcat 下就会找不到classes/views 下的页面 #2

@xingzheone

Description

@xingzheone

今天大约看了下这个框架.
很初级.设计很粗糙. 竟然用这种方式读取
private File innerCurrentFolder() {

    try {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        URL url = cl.getResource(".");
        System.out.println("启动的tomcat文件夹:"+url.toURI().toString());
        return new File(url.toURI());
    } catch (URISyntaxException e) {
        throw ArgoException.raise(e);
    }

建议作者好好看下 spring resource的设计.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions