简体   繁体   English

spring 引导项目的 html 网站中的图片未显示在 localhost:8080

[英]Pictures in an html website of a spring Boot project arent shown on localhost:8080

I have a spring Boot project in eclipse on macos, when i run this project (as a spring Boot Application), and in my webrowser(firefox, edge and safari) i see all the Elements of this page, but not the picture i inserted in this page, so what is the problem?? I have a spring Boot project in eclipse on macos, when i run this project (as a spring Boot Application), and in my webrowser(firefox, edge and safari) i see all the Elements of this page, but not the picture i inserted在这个页面中,有什么问题?

@Configuration public class DefaultView extends WebMvcConfigurerAdapter{ @Configuration public class DefaultView 扩展 WebMvcConfigurerAdapter{

@Override
public void addViewControllers( ViewControllerRegistry registry ) {
    registry.addViewController( "/" ).setViewName( "forward:/yourpage.html" );
    registry.setOrder( Ordered.HIGHEST_PRECEDENCE );
    super.addViewControllers( registry );
}

} }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用基本目录运行 Spring Boot 项目 - localhost:8080/demo/ - Run Spring Boot Project with base directory - localhost:8080/demo/ 春季靴子| 本地主机:8080 404错误页面显示 - Spring Boot | localhost: 8080 404 error page displayed Swagger + Spring 引导不显示 API 端点在 http://localhost:8080/home/swagger-ui.html - Swagger + Spring boot doesn't show API end points in http://localhost:8080/home/swagger-ui.html 运行 Spring Boot JAR 应用程序不会使用浏览器打开 URL(https://localhost:8080/) - Running a Spring Boot JAR Application does not open a URL(https://localhost:8080/) with a browser Spring Boot2 Oauth2隐式流 - http:// localhost:8080 / oauth / authorize获取访问被拒绝 - Spring Boot2 Oauth2 Implicit Flow - http://localhost:8080/oauth/authorize getting Access Denied 无法从浏览器访问 localhost:8080 公用文件夹(java spring 启动) - can't access localhost:8080 public folder from browser (java spring boot) 带 Angular 的弹簧靴。 CORS 策略已阻止从源“http://localhost:4200”访问“http://localhost:8080/”处的 XMLHttpRequest - Spring boot with Angular. Access to XMLHttpRequest at 'http://localhost:8080/' from origin 'http://localhost:4200' has been blocked by CORS policy Ktor 项目 localhost:8080 拒绝连接 - Ktor project localhost:8080 refuses to connect Spring Boot 2.0.4 + OAuth2 + JWT-无法获取访问令牌,返回405或仅被映射到localhost:8080 / - Spring Boot 2.0.4 + OAuth2 + JWT - Cannot get Access Token, returns 405 or just gets mapped into localhost:8080/ Spring Boot - 本地主机上的 HTTPS - Spring Boot - HTTPS on localhost
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM