HostInfoController.java 添加跨域注解
This commit is contained in:
@@ -6,10 +6,7 @@ import com.yupi.springbootinit.model.entity.NewHosts;
|
|||||||
import com.yupi.springbootinit.rabbitMQ.MQSender;
|
import com.yupi.springbootinit.rabbitMQ.MQSender;
|
||||||
import com.yupi.springbootinit.service.HostInfoService;
|
import com.yupi.springbootinit.service.HostInfoService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -21,6 +18,7 @@ import java.util.List;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/save_data")
|
@RequestMapping("/save_data")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@CrossOrigin
|
||||||
public class HostInfoController {
|
public class HostInfoController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ mybatis-plus:
|
|||||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
default-executor-type: batch
|
default-executor-type: batch
|
||||||
|
|
||||||
|
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
logic-delete-field: isDelete # 全局逻辑删除的实体字段名
|
logic-delete-field: isDelete # 全局逻辑删除的实体字段名
|
||||||
@@ -105,9 +104,4 @@ knife4j:
|
|||||||
default:
|
default:
|
||||||
api-rule: package
|
api-rule: package
|
||||||
api-rule-resources:
|
api-rule-resources:
|
||||||
- com.yupi.springbootinit.controller
|
- com.yupi.springbootinit.controller
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
org:
|
|
||||||
apache:
|
|
||||||
ibatis: off
|
|
||||||
Reference in New Issue
Block a user