您好,我在这段代码中遇到了这个问题:
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的访问权限