-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
微服务框架下的定时任务和字典项查询无权限 #2662
Comments
` /**
服务间调用的时候 没有token该如何处理这种情况? |
感谢平台,感谢作者,感谢开源。 |
定时任务没有登录状态,肯定获取不到token,为什么不直接调用service或者dao层 |
感谢回复,因为这个service归另外一个服务所有 |
查询字典项功能是system模块中的,其他模块想调用的话不就得走Feign 服务调用机制,但是我没有token怎么查询呢? |
实在需求,你可以自己实现模拟登录,获取token |
我之前是这么写的,但是我觉得太low了,所以想请教一下有没有奇思淫巧可以解决的? |
微服务之间调用免Token方案 |
|
@zhangdaiscott 按文档一步步操作的,不知道是什么原因在FeignConfig里面就是获不到在微服务的业务层里面用UserTokenContext设置的token |
版本号:
最新
问题描述:
在module_dome模块下一个公开的接口 如何调用系统的查询字典项功能?
截图&代码:
[500] during [GET] to [http://jeecg-system/sys/api/translateDictFromTable?table=region&text=region_name&code=region_name&key=shqx] [ISysBaseAPI#translateDictFromTable(String,String,String,String)]: [{"timestamp":"2021-06-17 10:31:53","status":500,"error":"Internal Server Error","exception":"org.apache.shiro.authc.AuthenticationException","trace":"org.apache.shiro.authc.AuthenticationException: To... (7075 bytes)]
友情提示: 未按格式要求发帖,会直接删掉。
The text was updated successfully, but these errors were encountered: