lingdu1234 / poem_admin

rust poem admin
https://314.iu1314.top/
70 stars 16 forks source link

请教配置 #7

Closed alexnest closed 1 year ago

alexnest commented 1 year ago

运行后报“thread 'main' panicked at 'Invalid route: insertion failed due to conflict with previously registered route: /*privateaxum_nest_tailparam. Note that `nest("/", )conflicts with all routes. UseRouter::fallback` instead', C:\Users\pigev.cargo\registry\src\github.com-1ecc6299db9ec823\axum-0.5.15\src\routing\mod.rs:482:13 stack backtrace:”,如果把“ .nest(&CFG.server.api_prefix, apps::api())”这行删掉就不会报错,是不是cofig.toml这个配置文件的api_prefix配错了,请教下这个参数应该怎么配。目前我的配置是 api_prefix = "alexnest"

alexnest commented 1 year ago

知道了,需要配成 api_prefix = "/api"

lingdu1234 commented 1 year ago

我重新更新了 congfig sample 文件 api_prefix 需要前面加 "/" 像 “/api_v1” 这样的