Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
Project
Project
Details
Activity
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
Administrator
browser-backend
Commits
25b93810
Commit
25b93810
authored
Mar 12, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理员充值等功能
parent
54138c3c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
BrowserBackendApplication.java
...a/com/edgec/browserbackend/BrowserBackendApplication.java
+2
-0
ResourceServerConfiguration.java
...owserbackend/auth/config/ResourceServerConfiguration.java
+1
-3
No files found.
src/main/java/com/edgec/browserbackend/BrowserBackendApplication.java
View file @
25b93810
...
...
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.cors.UrlBasedCorsConfigurationSource
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
@SpringBootApplication
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
BrowserBackendApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/edgec/browserbackend/auth/config/ResourceServerConfiguration.java
View file @
25b93810
...
...
@@ -19,10 +19,8 @@ public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter
public
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
()
.
antMatchers
(
"/user/*"
)
.
authenticated
()
.
antMatchers
(
"/oauth/**"
).
permitAll
()
.
antMatchers
(
"/shop/*"
,
"/ip/*"
,
"/group/*"
).
authenticated
()
.
antMatchers
(
"/shop/*"
,
"/ip/*"
,
"/group/*"
,
"/0xadministrator/*"
,
"/user/*"
).
authenticated
()
.
and
()
//关闭跨站请求防护
.
csrf
().
disable
();
...
...
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