添加跨域支持
This commit is contained in:
parent
a1456f6afc
commit
b902d6b63b
|
@ -12,10 +12,7 @@ import com.len.util.JsonUtil;
|
||||||
import com.len.util.ReType;
|
import com.len.util.ReType;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import tk.mybatis.mapper.entity.Condition;
|
import tk.mybatis.mapper.entity.Condition;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
@ -30,6 +27,8 @@ import java.util.List;
|
||||||
* @email 154040976@qq.com
|
* @email 154040976@qq.com
|
||||||
* @date 2018-05-05
|
* @date 2018-05-05
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@CrossOrigin
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/blog")
|
@RequestMapping("/blog")
|
||||||
public class ArticleController {
|
public class ArticleController {
|
||||||
|
|
|
@ -29,6 +29,7 @@ import java.util.stream.Collectors;
|
||||||
* <p>
|
* <p>
|
||||||
* 博客后台业务管理
|
* 博客后台业务管理
|
||||||
*/
|
*/
|
||||||
|
@CrossOrigin
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/blog-admin")
|
@RequestMapping("/blog-admin")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.len.controller;
|
||||||
import com.len.entity.BlogCategory;
|
import com.len.entity.BlogCategory;
|
||||||
import com.len.service.BlogCategoryService;
|
import com.len.service.BlogCategoryService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
@ -16,6 +17,7 @@ import java.util.*;
|
||||||
* @date 2018/9/9.
|
* @date 2018/9/9.
|
||||||
* @email 154040976@qq.com
|
* @email 154040976@qq.com
|
||||||
*/
|
*/
|
||||||
|
@CrossOrigin
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/blog")
|
@RequestMapping("/blog")
|
||||||
public class BlogCategoryController {
|
public class BlogCategoryController {
|
||||||
|
|
|
@ -29,6 +29,7 @@ import java.util.stream.Collectors;
|
||||||
* @date 2018/7/25.
|
* @date 2018/7/25.
|
||||||
* @email 154040976@qq.com
|
* @email 154040976@qq.com
|
||||||
*/
|
*/
|
||||||
|
@CrossOrigin
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/")
|
@RequestMapping("/")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.len.entity.BlogTag;
|
||||||
import com.len.service.BlogArticleService;
|
import com.len.service.BlogArticleService;
|
||||||
import com.len.service.BlogTagService;
|
import com.len.service.BlogTagService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
@ -21,6 +22,7 @@ import java.util.List;
|
||||||
* <p>
|
* <p>
|
||||||
* 标签
|
* 标签
|
||||||
*/
|
*/
|
||||||
|
@CrossOrigin
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/blog")
|
@RequestMapping("/blog")
|
||||||
public class TagController extends BaseController {
|
public class TagController extends BaseController {
|
||||||
|
|
Loading…
Reference in New Issue