后台配置文件调整 #11

Merged
root merged 4 commits from zzw-one into master 2024-09-13 15:37:35 +08:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 426ca8ebba - Show all commits

View File

@ -128,7 +128,7 @@ public class YudaoWebSecurityConfigurerAdapter {
// 全局共享规则
.authorizeRequests()
// 1.1 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll()
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js","/intelligentForm/selectDynamicDataById","/intelligentForm/selectDynamicDataById").permitAll()
// 1.2 设置 @PermitAll 无需认证
.antMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll()
.antMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll()

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.promotion.controller.admin.dynamic;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicData;
import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicForm;
import cn.iocoder.yudao.module.promotion.service.dynamic.DynamicDataService;
@ -9,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.web.bind.annotation.*;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
@ -45,12 +47,14 @@ public class DynamicDataController {
}
//根据id查询数据
@GetMapping("/selectDynamicDataById")
@PermitAll
public CommonResult<DynamicData> selectDynamicDataById(String id){
return success(dynamicDataService.doSelectDynamicDataById(id));
}
//采集数据
@PostMapping("/collectData")
@PermitAll
public CommonResult<String> collectData(@RequestBody DynamicForm dynamicForm){
dynamicFormService.doCollectData(dynamicForm);
return success("保存成功");