您好,我遇到此问题的代码:
public class FirstStepsApplication extends Application {
private static final String ROOT_URI = "/";
@Override
public Restlet createInboundRoot() {
Router router = new Router(getContext());
Directory rootDir = new Directory(getContext(), "war:///doc");
rootDir.setIndexName("index.html");
router.attach(ROOT_URI, rootDir);
return router;
}
}
使用Maven运行时,在GAE localhost中运行:$mvn appengine:devserver
没问题。但是在部署时它不再起作用。我已经检查了日志,所有我能看到的是访问/index.html
返回404
答案 0 :(得分:1)