【发布时间】:2019-08-14 02:06:33
【问题描述】:
当我通过 Intellij 运行我的网络应用程序时,它可以正常工作。转到localhost:4567 和 apache 打开 index.html 页面。但是当我部署war文件并使用java -jar project.war运行它时,它会下载index.html页面
我的资源中有文件夹public。 index.html 放在那里
public static void main(String[] args) {
ProcessBuilder process = new ProcessBuilder();
Integer port;
if (process.environment().get("PORT") != null) {
port = Integer.parseInt(process.environment().get("PORT"));
} else {
port = 4567;
}
port(port);
staticFileLocation("/public");
}
我错过了什么?如果您需要任何其他信息,请在 cmets 中告诉我
【问题讨论】:
-
@mazaneicha sparkjava 是一个 Web 框架,而不是一个大数据库
-
那么你真的应该在你的标题中更改“Apache Spark”。 Apache Sparkspark.apache.org只有一个,是一个分布式计算框架。
标签: java spark-java