Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
2d4ebee9
Commit
2d4ebee9
authored
Jun 18, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
05b18b58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
WebConfig.java
...ud/src/main/java/com/yanzuoguang/cloud/aop/WebConfig.java
+7
-1
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/WebConfig.java
View file @
2d4ebee9
package
com
.
yanzuoguang
.
cloud
.
aop
;
package
com
.
yanzuoguang
.
cloud
.
aop
;
import
com.yanzuoguang.util.log.Log
;
import
org.springframework.boot.web.servlet.filter.OrderedHiddenHttpMethodFilter
;
import
org.springframework.boot.web.servlet.filter.OrderedHiddenHttpMethodFilter
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
...
@@ -15,14 +16,19 @@ import java.io.IOException;
...
@@ -15,14 +16,19 @@ import java.io.IOException;
/**
/**
* 跨域的支持
* 跨域的支持
*
* @author 颜佐光
* @author 颜佐光
*/
*/
@Configuration
@Configuration
public
class
WebConfig
extends
WebMvcConfigurerAdapter
{
public
class
WebConfig
extends
WebMvcConfigurerAdapter
{
public
WebConfig
()
{
Log
.
info
(
WebConfig
.
class
,
"跨域已开启支持"
);
}
@Bean
@Bean
public
HiddenHttpMethodFilter
hiddenHttpMethodFilter
()
{
public
HiddenHttpMethodFilter
hiddenHttpMethodFilter
()
{
return
new
OrderedHiddenHttpMethodFilter
(){
return
new
OrderedHiddenHttpMethodFilter
()
{
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment