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

eladmin引入积木报表无法访问swagger-ui.html页 #777

Closed
NapChen opened this issue Jan 19, 2022 · 3 comments
Closed

eladmin引入积木报表无法访问swagger-ui.html页 #777

NapChen opened this issue Jan 19, 2022 · 3 comments

Comments

@NapChen
Copy link

NapChen commented Jan 19, 2022

版本号:

1.4.2

问题描述:

eladmin在引入报表之前可以正常访问swagger-ui.html,引入报表插件以后无法访问了

错误日志&截图:

image

重现步骤:

1、按照eladmin指引启动项目
2、访问localhost:8000/swagger-ui.html可以访问
3、按照指引引入报表插件再次访问文档地址出现上图的情况

友情提示(为了提高issue处理效率):

  • 积木报表是一款免费报表产品,功能免费源码不开放;
  • 未按格式要求发帖,会被直接删掉;
  • 请针对问题提供报表设计SQL脚本或在官网制作报表示例并提供ID;
  • 针对不好重现的问题,请录制操作视频或详细的重现步骤;
@lvdandan16
Copy link
Collaborator

收录 ty

@tygithub1
Copy link

tygithub1 commented Feb 27, 2022

经测试没有问题,参考这个文档集成:http://report.jeecg.com/2302147。
一般都是springboot项目可以按照这个步骤修改:
1.启动类添加扫描包的路径:@SpringBootApplication(scanBasePackages = {"org.jeecg.modules.jmreport", "me.zhengjie"})
org.jeecg.modules.jmreport是积木报表的包,me.zhengjie是eladmin包的路径
2.报表中使用的持久层是minidao,所以yml文件需要添加minidao的dao文件扫描路径:
minidao :
base-package: org.jeecg.modules.jmreport.desreport.dao*
3.请求资源权限问题,我们jeecgboot用的是shiro,配置为:
//积木报表排除
filterChainDefinitionMap.put("/jmreport/", "anon");
filterChainDefinitionMap.put("/
/.js.map", "anon");
filterChainDefinitionMap.put("/**/
.css.map", "anon");
但是这个eladmin用的是Spring Security,他这个具体需要怎么设置请自己研究。我这边swagger是可以访问的,而且他把积木报表jar里面的请求api显示出来了:
image
image

@zhangdaiscott
Copy link
Member

做了处理,请升级到1.4.4-beta看是否解决问题(需要配置jeecg的maven私服

<dependency>
  <groupId>org.jeecgframework.jimureport</groupId>
  <artifactId>jimureport-spring-boot-starter</artifactId>
  <version>1.4.4-beta</version>
</dependency>

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

4 participants