JWTRefreshTokenBundle,Class gesdinet.jwtrefreshtoken 不存在

JWTRefreshTokenBundle, Class gesdinet.jwtrefreshtoken does not exist

我得到了刷新令牌,但是当我调用 jwt 刷新路径时,响应是 500(Class gesdinet.jwtrefreshtoken 不存在。(500 内部服务器错误)) composer.json

`"require"` : {
        "php" : ">=7.1",
        "symfony/symfony" : "3.4.*",
        "doctrine/orm" : "^2.5",
        "doctrine/doctrine-bundle" : "^1.6",
        "doctrine/doctrine-cache-bundle" : "^1.3",
        ....
        "lexik/jwt-authentication-bundle": "^2.4",
        "gesdinet/jwt-refresh-token-bundle": "^0.5.2"
    },

配置与文档完全相同,谁能帮忙? https://github.com/gesdinet/JWTRefreshTokenBundle#jwtrefreshtokenbundle

请尝试删除您的缓存, 在您的 CLI 上启动:

composer dump-autoload

确保已将包添加到您的内核中(这取决于您使用的是 symfony 3 还是 4)

文档中有错误,

# app/config/routing.yml
gesdinet_jwt_refresh_token:
    path:     /api/token/refresh
    defaults: { _controller: gesdinet.jwtrefreshtoken::refresh }
# ...

我们需要单冒号:

defaults: { _controller: gesdinet.jwtrefreshtoken:refresh }

https://github.com/gesdinet/JWTRefreshTokenBundle/issues/116