Skip to content

Commit

Permalink
V1_1:测试代码安全
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelei.yang committed Nov 12, 2024
1 parent da0b5f8 commit a5c7331
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/java/com/example/demo/controller/DemoController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import com.example.demo.utils.DemoUtil;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

import java.util.List;

Expand All @@ -19,8 +17,9 @@
@Validated
public class DemoController {

@GetMapping("/create")
public List<String> createMapPlatformPatent() {
return DemoUtil.buildScopes("sdfwe dfsfd");
@PostMapping("/create")
public List<String> createMapPlatformPatent(@RequestParam(value = "scope", required = false) String scope) {
List<String> scopes = DemoUtil.buildScopes(scope);
return DemoUtil.buildScopes(scope);
}
}

0 comments on commit a5c7331

Please sign in to comment.