Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
jasypt
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3fec1885
authored
Jul 07, 2020
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加运行参数,添加ignore
1 parent
9e77058f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
.gitignore
src/main/java/com/viontech/ViontechApplication.java
src/main/java/com/viontech/domain/ViontechPropertyPlaceholderConfigurer.java
.gitignore
View file @
3fec188
**/**/target/
**/**/.idea/
**/**/*.iml
\ No newline at end of file
src/main/java/com/viontech/ViontechApplication.java
View file @
3fec188
package
com
.
viontech
;
import
com.viontech.domain.ViontechAESUtil
;
import
com.viontech.domain.ViontechPropertyPlaceholderConfigurer
;
import
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
javax.annotation.Resource
;
@SpringBootApplication
(
scanBasePackages
=
{
"com.viontech.*"
})
public
class
ViontechApplication
extends
SpringBootServletInitializer
{
public
static
void
main
(
String
[]
args
)
{
if
(
args
.
length
==
0
)
{
return
;
}
String
str
=
args
[
0
];
String
[]
split
=
str
.
split
(
","
);
for
(
String
s
:
split
)
{
if
(
s
!=
null
)
{
System
.
out
.
println
(
ViontechPropertyPlaceholderConfigurer
.
KEY
+
ViontechAESUtil
.
getEncryptString
(
s
));
}
}
SpringApplication
.
run
(
ViontechApplication
.
class
,
args
);
}
@Bean
public
static
PropertyPlaceholderConfigurer
properties
(){
public
static
PropertyPlaceholderConfigurer
properties
()
{
return
new
ViontechPropertyPlaceholderConfigurer
();
}
}
src/main/java/com/viontech/domain/ViontechPropertyPlaceholderConfigurer.java
View file @
3fec188
...
...
@@ -15,7 +15,7 @@ import java.util.Properties;
@Configuration
@Component
(
value
=
"viontechPropertyConfigurer"
)
public
class
ViontechPropertyPlaceholderConfigurer
extends
PropertyPlaceholderConfigurer
{
p
rivate
final
String
KEY
=
"VIONTECH"
;
p
ublic
static
final
String
KEY
=
"VIONTECH"
;
@Override
public
void
postProcessBeanFactory
(
ConfigurableListableBeanFactory
beanFactory
)
throws
BeansException
{
try
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment