关于若依接口释放于不释放

关于若依接口释放于不释放,第1张

  		**接口不释放需要登陆访问 **

注解表示在用户登陆时候访问此接口即可查询出相应数据
@PreAuthorize(“@ss.hasPermi(‘system:declaration:list’)”)

 	/**
     * 查询政策申报列表
     */
    @PreAuthorize("@ss.hasPermi('system:declaration:list')")
    @PostMapping("/list")
    public TableDataInfo list(ZxPolicyDeclaration zxPolicyDeclaration)
    {
        startPage();//分页插件
        List<ZxPolicyDeclaration> list = zxPolicyDeclarationService.selectZxPolicyDeclarationList(zxPolicyDeclaration);
        return getDataTable(list);
    }
  						 **接口释放不需要登陆访问 **

还使用一个接口就行,就是换个名称
此注解关闭表示在用户不需要登陆的时候即可查询相应信息数据
//@PreAuthorize(“@ss.hasPermi(‘system:declaration:list’)”)

      
    @PostMapping("/zclist")
    public TableDataInfo zclist(ZxPolicyDeclaration zxPolicyDeclaration)
    {
        startPage();
        List<ZxPolicyDeclaration> list = zxPolicyDeclarationService.selectZxPolicyDeclarationList(zxPolicyDeclaration);
        return getDataTable(list);
    }
  						**在配置文件当中释放一下即可**

在SecurityConfig.Java的文件当中释放一下zclist这个接口

 .antMatchers("/system/noticea/*").anonymous()
 .antMatchers("/system/noticeb/*").anonymous()
 .antMatchers("/system/noticec/zclist").anonymous()

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/920331.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-16
下一篇2022-05-16

发表评论

登录后才能评论

评论列表(0条)

    保存