Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bee run 访问404 #834

Open
feng-wzf opened this issue Jul 20, 2022 · 6 comments
Open

bee run 访问404 #834

feng-wzf opened this issue Jul 20, 2022 · 6 comments

Comments

@feng-wzf
Copy link

mac OS 12.4
go version go1.18.3 darwin/amd64

bee api my_api // 创建项目
bee run // 运行项目, 我在goland里把代码运行起来, 之前的报错都处理了,正常运行后, 访问 http://localhost:8080, 404找不到页面
image
image

还有 go get github.com/beego/bee/v2 这个命令用不了, go install 也不行

@qizidog
Copy link

qizidog commented Feb 15, 2023

复议

@flycash
Copy link
Collaborator

flycash commented Mar 2, 2023

复议

可以提供一下代码吗?因为我每次本地搞我都不会遇到 404 的问题

@qizidog
Copy link

qizidog commented Mar 2, 2023

C:\Users\administritor> bee version
2023/03/02 10:36:51.191 [W]  init global config instance failed. If you donot use this, just ignore it.  open conf/app.conf: The system cannot find the path specified.

______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v2.0.2

├── GoVersion : go1.17.13
├── GOOS      : windows
├── GOARCH    : amd64
├── NumCPU    : 4
├── GOPATH    : D:\Go\GOPATH
├── GOROOT    : C:\Program Files\Go
├── Compiler  : gc
└── Published : 2022-06-12

C:\Users\administritor> bee api test
C:\Users\administritor> go mod tidy
C:\Users\administritor> bee run

然后访问 localhost:8080 就404了,访问默认提供的两个controller也404(确认注意到了v1命名空间前缀的问题)。

可能和bee、beego的版本有关系。

beego的版本(go.mod文件):

module test

go 1.16

require github.com/beego/beego/v2 v2.0.1

require github.com/smartystreets/goconvey v1.6.4

@flycash
Copy link
Collaborator

flycash commented Mar 30, 2023

我始终无法复现,你试试升级到最新版本?

@jonenet
Copy link

jonenet commented Oct 25, 2023

???神奇,几年了问题还在

@chaegumi
Copy link

可能要放弃beego,文档也不能在线看,我没修改什么东西,莫名其妙现在router就生成不了了
bee v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants