从spring-boot官网上看的例子,自己试着写了一个 返回name和id的小接口,一开始访问http://localhost:8080/getPerson报错 :
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Dec 14 16:35:25 CST 2016
There was an unexpected error (type=Not Found, status=404).
No message available
很像是没有读到你要访问的地址。
原因是【Application启动类放的位置不对】要将Application放在最外层,也就是要包含所有子包。
比如你的groupId是com.google,子包就是所谓的com.google.xxx,所以要将Application放在com.google包下。
请参考以下结论:spring-boot会自动加载启动类所在包下及其子包下的所有组件.
分享到:
相关推荐
下载文件 https://www.google.com/recaptcha/api.js 和这个文件中包含的另外一个文件 https://www.gstatic.com/recaptcha/api2/r20160531110558/recaptcha__zh_cn.js
Spring Fu is an incubator for new Spring features related to explicit configuration and runtime efficiency. While regular Spring Boot applications are configured using annotations, conventions and ...
org.springframework.boot spring-boot-devtools true idea默认是没有自动编译的,我们这里需要添加修改配置.打开设置 (1)File-Settings-Compiler-Build Project automatically (2)ctrl + shift + alt + /,...
alternating-direction implicit (ADI)–FDTD method, this HIE–FDTD method has higher accuracy, especially for larger time step size. At each time step, the HIE–FDTD method requires the solution of two...
explicit_defaults_for_timestamp=true 12. MySQL 安装并初始化: 进入 mysql 的 bin 目录下:cd bin 执行命令:./mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data/ --basedir=/usr/local/mysql...
This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Jan 23 15:20:18 CST 2019 There was an unexpected error (type=Internal Server Error, status=500). An error...
WARNING: This application contains sexually explicit content that is not suitable for minors. You can download release version from here: https://github.com/fython/NHentai-android/releases Suspension ...
explicit_defaults_for_timestamp=true includedir /etc/my.cnf.d ``` 4. 初始化数据库 进入 MySQL 的 bin 目录,执行命令 `./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/soft/mysql/ --datadir=/...
and explicit Delphi import units (16/32-bit compatible) for C DLL header files. Please note that HeadConv is not perfect (it will fail on complex structures) and on average "only" has a 85-90% correct...
NATS-Go 客户端NATS 消息系统...安装# Go clientgo get github.com/nats-io/nats.go/# Servergo get github.com/nats-io/nats-server使用或转换到 Go 模块支持时# Go client latest or explicit versiongo get github....
Kotlin多平台库提供显式类型(Kotlin multiplatform library providing explicit types.,) 说明:Kotlin多平台库提供显式类型。, (Kotlin multiplatform library providing explicit types.,) 文件列表: ....
NATS-Go客户客户端。安装# Go clientgo get github.com/nats-io/nats.go/# Servergo get github.com/nats-io/nats-server 使用或转换为Go模块支持时: # Go client latest or explicit versiongo get github....
explicit LoginDialog(QWidget *parent = nullptr); ~LoginDialog(); private: // 声明界面上的部件 QLineEdit *usernameLineEdit; QLineEdit *passwordLineEdit; QLabel *messageLabel; QPushButton *...
《PyPI官网下载 | invenio-explicit-acls-2.0.6.tar.gz》 在信息技术领域,PyPI(Python Package Index)是Python开发者最重要的资源库之一,它提供了大量可重复使用的Python软件包。本资源`invenio-explicit-acls-...
### Eclipse 设置编码详解 在开发过程中,我们经常会遇到文件编码的问题,特别是在处理中文等多语言环境时,如果不正确地设置编码格式,很容易出现乱码的情况。本文将详细介绍如何在 Eclipse IDE 中设置编码,以...
(Kotlin multiplatform library providing explicit types.,) 说明:Kotlin多平台库提供显式类型。, (Kotlin multiplatform library providing explicit types.,) 文件列表: .editorconfig (521, 2023-12-19) .run/...
explicit_defaults_for_timestamp=true 五、初始化 MySQL 数据库 1. 初始化解压后的 MySQL 文件 cd /usr/local/mysql/bin/ ./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql/ --datadir=/data/...
Option Explicit Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long Private Type RECT '用户自定义类型 Left As Long Top As Long Right As Long Bottom As Long End Type Dim mouse ...
explicit_defaults_for_timestamp=true ``` 六、初始化MySQL 使用cd命令切换到MySQL安装目录,然后使用mysqld命令初始化MySQL,命令如下: ``` cd /opt/mysql ./bin/mysqld --initialize --user=mysql --basedir=/...