1
hao
2025-05-20 8e24c6fea30d9b179375ee2893710cdec2443b13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.app.base.control;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
 
import com.system.session.service.MySessionService;
 
public abstract class WebController extends BaseController {
 
    protected String autoView(String name) {
        final Resource resource = getApplicationContext().getResource("classpath:/templates/" + name + ".html");
        if (resource != null && resource.exists()) {
            return name;
        }
        return "_" + name;
    }
}