Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
05a60bae
Commit
05a60bae
authored
Mar 27, 2024
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
漏洞文件漏洞修改 -配置文件随机数
parent
d198539f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
YeeAmosFireAutoSysStart.java
...c/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
+11
-0
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+1
-1
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+1
-1
application-test.properties
...toSysStart/src/main/resources/application-test.properties
+1
-1
No files found.
YeeAmosFireAutoSysStart/src/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
View file @
05a60bae
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos;
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.URISyntaxException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -22,7 +24,10 @@ import org.springframework.context.ApplicationContextAware;
...
@@ -22,7 +24,10 @@ import org.springframework.context.ApplicationContextAware;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
...
@@ -71,6 +76,12 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware {
...
@@ -71,6 +76,12 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware {
*/
*/
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
log
.
info
(
"start Service.........."
);
log
.
info
(
"start Service.........."
);
SpringApplication
application
=
new
SpringApplication
(
YeeAmosFireAutoSysStart
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ApplicationContext
context
=
SpringApplication
.
run
(
YeeAmosFireAutoSysStart
.
class
,
args
);
ApplicationContext
context
=
SpringApplication
.
run
(
YeeAmosFireAutoSysStart
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
Environment
env
=
context
.
getEnvironment
();
String
appName
=
env
.
getProperty
(
"spring.application.name"
);
String
appName
=
env
.
getProperty
(
"spring.application.name"
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
05a60bae
...
@@ -55,7 +55,7 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in=
...
@@ -55,7 +55,7 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in=
## emqx
## emqx
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}
emqx.client-id
=
${spring.application.name}
-${security-random-int}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.broker
=
tcp://172.16.11.201:1883
emqx.client-user-name
=
admin
emqx.client-user-name
=
admin
emqx.client-password
=
ENC(IWhwMSgko6moJ+JDuh5cq41ixOfhyyiaoRiOCw5Iv3f+YAO8Ib5KpWattlT6h57p)
emqx.client-password
=
ENC(IWhwMSgko6moJ+JDuh5cq41ixOfhyyiaoRiOCw5Iv3f+YAO8Ib5KpWattlT6h57p)
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
05a60bae
...
@@ -42,7 +42,7 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in=
...
@@ -42,7 +42,7 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in=
## emqx
## emqx
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}
emqx.client-id
=
${spring.application.name}
-${security-random-int}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.user-name
=
admin
emqx.password
=
ENC(vlnMOpNNk7wWAcVgqh/C61LOajZY3f1XOFZEqcJ774SdtZeKnOCoNL3u4idRVr+S)
emqx.password
=
ENC(vlnMOpNNk7wWAcVgqh/C61LOajZY3f1XOFZEqcJ774SdtZeKnOCoNL3u4idRVr+S)
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-test.properties
View file @
05a60bae
...
@@ -42,7 +42,7 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in=
...
@@ -42,7 +42,7 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in=
## emqx
## emqx
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}
emqx.client-id
=
${spring.application.name}
-${security-random-int}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.user-name
=
admin
emqx.password
=
ENC(JcSMTcnJjJsR/wlfW4MqxYnTVVxymsc7iZN3l+gRadRsplNeScSxFa3gbCv30oDt)
emqx.password
=
ENC(JcSMTcnJjJsR/wlfW4MqxYnTVVxymsc7iZN3l+gRadRsplNeScSxFa3gbCv30oDt)
...
...
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