我已经启动了我的Spring boot应用程序,当我看到控制台时,该应用程序已经启动了,但是当我尝试打开浏览器运行时,它显示没有找到网址为的网页。这里的问题是什么?以下是我的代码
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String
我使用Spring工具来开发我的网站。在此网站上,管理员可以上传图像和其他文件,如PDF和CSV,客户可以稍后下载这些文件。 在使用Spring工具时,我设置了用于上传新图片的目标文件夹静态/ images /,它工作得很好。但是在我的Linux服务器上部署了这个jar之后,Spring boot找不到静态文件夹,所以我使用了我找到的这个函数:How to get spring boot application jar parent folder path dynamically? 此函数将图像保存到classes/static/images文件夹中,该文件夹也是使用.jar创建的。然而,通
我是Spring框架和Spring Boot的新手。
我已经实现了一个非常简单的RESTful Spring Boot web应用程序。
您可以在另一个问题中看到几乎完整的源代码:
应用程序如何服务外部静态HTML、css js文件?
例如,目录结构可能如下所示:
MyApp\
MyApp.jar (this is the Spring Boot app that services the static files below)
static\
index.htm
images\
logo.jpg
js\
我已经启动了spring boot,并试图创建这个基本程序,但它给出了白色错误页面:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Mar 21 23:06:15 IST 2018
There was an unexpected error (type=Not Found, status=404).
No message available
以下是pom.xml文件的依赖项部分
<dependenci