Explorar el Código

oss违规检测

xiongzhu hace 3 años
padre
commit
1175ebd2da

+ 1 - 0
src/main/java/com/izouma/nineth/security/WebSecurityConfig.java

@@ -121,6 +121,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
                 .antMatchers("/sandpay/**").permitAll()
                 .antMatchers("/hmpay/**").permitAll()
                 .antMatchers("/order/calcSettle").permitAll()
+                .antMatchers("/ossNotify").permitAll()
                 // all other requests need to be authenticated
                 .anyRequest().authenticated().and()
                 // make sure we use stateless session; session won't be used to

+ 16 - 0
src/main/java/com/izouma/nineth/web/OSSAuditController.java

@@ -0,0 +1,16 @@
+package com.izouma.nineth.web;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@Slf4j
+public class OSSAuditController {
+
+    @PostMapping("/ossNotify")
+    public String ossNotify(String checksum, String content) {
+        log.info("oss违规检测通知, checksum={}, content={}", checksum, content);
+        return "ok";
+    }
+}