Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
1e631481
Commit
1e631481
authored
Oct 12, 2022
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
springsecrity
parent
d72a4bff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
4 deletions
+67
-4
WebSecurityConfig.java
...uip/src/main/java/com/yeejoin/amos/WebSecurityConfig.java
+27
-0
application.properties
...ot-system-equip/src/main/resources/application.properties
+7
-2
WebSecurityConfig.java
...jcs/src/main/java/com/yeejoin/amos/WebSecurityConfig.java
+27
-0
application.properties
...boot-system-jcs/src/main/resources/application.properties
+6
-2
No files found.
amos-boot-system-equip/src/main/java/com/yeejoin/amos/WebSecurityConfig.java
0 → 100644
View file @
1e631481
package
com
.
yeejoin
.
amos
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@Configuration
@EnableWebSecurity
public
class
WebSecurityConfig
extends
WebSecurityConfigurerAdapter
{
// 授权
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
()
.
headers
()
.
frameOptions
()
.
disable
()
.
and
()
.
authorizeRequests
()
.
regexMatchers
(
"^(?!/actuator).*$"
).
permitAll
()
.
regexMatchers
(
"/actuator/health"
).
permitAll
()
.
regexMatchers
(
"/actuator/info"
).
permitAll
()
.
anyRequest
().
authenticated
().
and
()
.
formLogin
();
}
}
amos-boot-system-equip/src/main/resources/application.properties
View file @
1e631481
...
...
@@ -118,4 +118,9 @@ redis_equip_type_count = equipTypeAndCount
auth-key-fire-iot-equip
=
fire_iot-equip_info
# app离线同步装备数据开关
auth-open-fire-equip
=
false
\ No newline at end of file
auth-open-fire-equip
=
false
management.security.enabled
=
true
management.endpoint.health.show-details
=
always
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
\ No newline at end of file
amos-boot-system-jcs/src/main/java/com/yeejoin/amos/WebSecurityConfig.java
0 → 100644
View file @
1e631481
package
com
.
yeejoin
.
amos
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@Configuration
@EnableWebSecurity
public
class
WebSecurityConfig
extends
WebSecurityConfigurerAdapter
{
// 授权
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
()
.
headers
()
.
frameOptions
()
.
disable
()
.
and
()
.
authorizeRequests
()
.
regexMatchers
(
"^(?!/actuator).*$"
).
permitAll
()
.
regexMatchers
(
"/actuator/health"
).
permitAll
()
.
regexMatchers
(
"/actuator/info"
).
permitAll
()
.
anyRequest
().
authenticated
().
and
()
.
formLogin
();
}
}
amos-boot-system-jcs/src/main/resources/application.properties
View file @
1e631481
...
...
@@ -127,4 +127,8 @@ management.endpoints.enabled-by-default=false
#阿里云实时语音识别参数
speech-config.access-key-id
=
LTAI5t62oH95jgbjRiNXPsho
speech-config.access-key-secret
=
shy9SpogYgcdDoyTB3bvP21VSRmz8n
speech-config.app-key
=
FC84bGUpbNFrexoL
\ No newline at end of file
speech-config.app-key
=
FC84bGUpbNFrexoL
management.security.enabled
=
true
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
\ No newline at end of file
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