当前位置:网站首页>Whitelabel error page access
Whitelabel error page access
2022-06-29 14:46:00 【get-yuan】

function springboot The access interface reports an error when , As shown in the figure above , Back end controller The layer code is as follows :
package com.hu.sprintboot01.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/hello")
public class HelloController {
@GetMapping("/hello")
@ResponseBody
public String hello(){
return "hello";
}
}visit localhost:8080/hello/hello The address will report an exception , It was later found that the cause of the abnormality was IDEA Problems with directory structure ,Application The startup class is in the wrong position , To put Application Class on the outermost side , That is, it contains all sub packages . And my controller It's in the outermost bag . The page cannot be found .

After revising controller layer And then access the interface again , Page display normal .


边栏推荐
猜你喜欢

【jenkins】pipeline控制多job顺序执行,进行定时持续集成

熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊

Opengauss community establishes sig knowledgegraph

Mysql database - general syntax DDL DML DQL DCL

【blackduck】jenkins下配置指定的synopsys-detect扫描版本

知乎热议:一个程序员的水平能差到什么程度?

传输层 用户数据报协议(UDP)

VQA needs not only pictures, but also external knowledge! University of Washington & Microsoft proposed revive, using gpt-3 and wikidata to help answer questions

【Try to Hack】vulnhub DC2

论文学习——考虑场次降雨年际变化特征的年径流总量控制率准确核算
随机推荐
部署搭建decentraland流程讲解
传输层 选择性确认 SACK
Redis的事务机制
你还在用命令看日志?快用 Kibana 吧,一张图胜过千万行日志
关于项目采购管理,这些你需要知道
Kubernetes pod troubleshooting guide
Explanation on deployment and establishment of decentraland process
Redis' data expiration clearing strategy and memory obsolescence strategy
JS will have variable promotion and function promotion
论文学习——考虑场次降雨年际变化特征的年径流总量控制率准确核算
Interview shock 61: tell me about MySQL transaction isolation level?
Configuration tutorial for swagger2
Imitation headline news information DZ template discuz news information business version GBK template source code
Using polymorphism to realize simple calculator
异步神器CompletableFuture
[Jenkins] pipeline controls the sequential execution of multiple jobs for timed continuous integration
熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
Persistence mechanism of redis
《canvas》之第6章 图片操作
第五届中国软件开源创新大赛 | openGauss赛道直播培训