**接口不释放需要登陆访问 **注解表示在用户登陆时候访问此接口即可查询出相应数据
@PreAuthorize(“@ss.hasPermi(‘system:declaration:list’)”)
@PreAuthorize("@ss.hasPermi('system:declaration:list')")
@PostMapping("/list")
public TableDataInfo list(ZxPolicyDeclaration zxPolicyDeclaration)
{
startPage();//分页插件
List list = zxPolicyDeclarationService.selectZxPolicyDeclarationList(zxPolicyDeclaration);
return getDataTable(list);
}
**接口释放不需要登陆访问 **还使用一个接口就行,就是换个名称
此注解关闭表示在用户不需要登陆的时候即可查询相应信息数据
//@PreAuthorize(“@ss.hasPermi(‘system:declaration:list’)”)
@PostMapping("/zclist")
public TableDataInfo zclist(ZxPolicyDeclaration zxPolicyDeclaration)
{
startPage();
List list = zxPolicyDeclarationService.selectZxPolicyDeclarationList(zxPolicyDeclaration);
return getDataTable(list);
}
**在配置文件当中释放一下即可**在SecurityConfig.Java的文件当中释放一下zclist这个接口
.antMatchers("/system/noticea/*").anonymous()
.antMatchers("/system/noticeb/*").anonymous()
.antMatchers("/system/noticec/zclist").anonymous()



