java - 如何在springboot中修改graphql端点URL
问题描述
我在 springboot 中创建了一个简单的 graphql 实现。
现在,要获取 API,我必须使用 URL http://localhost:XXXX/graphql
,但我想在http://localhost:XXXX/api/graphql
. 我想api/
在它之前追加。怎么做?
我尝试了所有在线解决方案来在 application.ymls 中编写代码,例如
使用网址
**graphiql:
url: /api/graphql
enabled: true
或修改端点
graphiql:
endpoint:
graphql: /api/graphql
enabled: true**
没有任何效果。
解决方案
推荐阅读
- class - 使变量等于类中的 Arraylist 值(处理)
- javascript - 在 try 块中抛出异常后,catch 块不会立即执行
- c# - PDB文件未与exe和源代码配对
- ansible - 生成的 podman systemd 文件无法启用
- c# - 将泛型类型的属性列表传递给函数
- c++ - 从链接到另一个 dll 的 dll 使用我的 exe 时,访问冲突执行位置 0x0000
- kubernetes - 在同一台机器上运行两个 K3S 实例
- mongodb - 如何更新根目录和内部文档以及 mongoDB 中存在的字段?
- c++ - ome-cmake-superbuild 无法编译,无法修补 bzip2
- android - 限制用户仅进行指纹认证