添加跨域支持

This commit is contained in:
meng 2018-12-12 22:05:45 +08:00
parent a1456f6afc
commit b902d6b63b
5 changed files with 9 additions and 4 deletions

View File

@ -12,10 +12,7 @@ import com.len.util.JsonUtil;
import com.len.util.ReType;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import tk.mybatis.mapper.entity.Condition;
import javax.servlet.http.HttpServletRequest;
@ -30,6 +27,8 @@ import java.util.List;
* @email 154040976@qq.com
* @date 2018-05-05
*/
@CrossOrigin
@RestController
@RequestMapping("/blog")
public class ArticleController {

View File

@ -29,6 +29,7 @@ import java.util.stream.Collectors;
* <p>
* 博客后台业务管理
*/
@CrossOrigin
@RestController
@RequestMapping("/blog-admin")
@Slf4j

View File

@ -3,6 +3,7 @@ package com.len.controller;
import com.len.entity.BlogCategory;
import com.len.service.BlogCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -16,6 +17,7 @@ import java.util.*;
* @date 2018/9/9.
* @email 154040976@qq.com
*/
@CrossOrigin
@RestController
@RequestMapping("/blog")
public class BlogCategoryController {

View File

@ -29,6 +29,7 @@ import java.util.stream.Collectors;
* @date 2018/7/25.
* @email 154040976@qq.com
*/
@CrossOrigin
@RestController
@RequestMapping("/")
@Slf4j

View File

@ -8,6 +8,7 @@ import com.len.entity.BlogTag;
import com.len.service.BlogArticleService;
import com.len.service.BlogTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -21,6 +22,7 @@ import java.util.List;
* <p>
* 标签
*/
@CrossOrigin
@RestController
@RequestMapping("/blog")
public class TagController extends BaseController {