Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
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
zhaowei
dlink
Commits
8a90ad7d
Unverified
Commit
8a90ad7d
authored
Sep 01, 2022
by
leo65535
Committed by
GitHub
Sep 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bug] fix the banner of dlink admin app (#977)
* [Bug] fix the banner of dlink admin app * remove banners
parent
521b4d6f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
130 deletions
+14
-130
pom.xml
dlink-admin/pom.xml
+0
-4
BannerInitializer.java
.../main/java/com/dlink/common/banner/BannerInitializer.java
+0
-51
CustomBanner.java
dlink-admin/src/main/java/com/dlink/utils/CustomBanner.java
+0
-59
spring.factories
dlink-admin/src/main/resources/META-INF/spring.factories
+0
-3
banner.txt
dlink-admin/src/main/resources/banner.txt
+14
-7
pom.xml
pom.xml
+0
-6
No files found.
dlink-admin/pom.xml
View file @
8a90ad7d
...
@@ -105,10 +105,6 @@
...
@@ -105,10 +105,6 @@
<groupId>
mysql
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
banner
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
<artifactId>
httpclient
</artifactId>
...
...
dlink-admin/src/main/java/com/dlink/common/banner/BannerInitializer.java
deleted
100644 → 0
View file @
521b4d6f
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
com
.
dlink
.
common
.
banner
;
import
com.dlink.constant.CommonConstant
;
import
com.dlink.utils.CustomBanner
;
import
org.springframework.context.ApplicationContextInitializer
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
com.nepxion.banner.BannerConstant
;
import
com.nepxion.banner.Description
;
import
com.nepxion.banner.LogoBanner
;
import
com.taobao.text.Color
;
/**
* BannerInitializer
*
* @author wenmo
* @since 2021/5/10 21:40
*/
public
class
BannerInitializer
implements
ApplicationContextInitializer
<
ConfigurableApplicationContext
>
{
@Override
public
void
initialize
(
ConfigurableApplicationContext
applicationContext
)
{
if
(!(
applicationContext
instanceof
AnnotationConfigApplicationContext
))
{
LogoBanner
logoBanner
=
new
LogoBanner
(
BannerInitializer
.
class
,
"/dlink/logo.txt"
,
"Welcome to Dinky"
,
5
,
7
,
new
Color
[
5
],
true
);
CustomBanner
.
show
(
logoBanner
,
new
Description
(
BannerConstant
.
VERSION
+
":"
,
CommonConstant
.
PROJECT_VERSION
,
0
,
1
)
,
new
Description
(
"Github:"
,
"https://github.com/DataLinkDC/dlink"
,
0
,
1
)
,
new
Description
(
"公众号:"
,
"DataLink数据中台"
,
0
,
1
)
);
}
}
}
dlink-admin/src/main/java/com/dlink/utils/CustomBanner.java
deleted
100644 → 0
View file @
521b4d6f
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
com
.
dlink
.
utils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.nepxion.banner.BannerConstant
;
import
com.nepxion.banner.Description
;
import
com.nepxion.banner.DescriptionBanner
;
import
com.nepxion.banner.LogoBanner
;
/**
* CustomBanner
*
* @author wenmo
* @since 2021/5/10 21:45
*/
public
class
CustomBanner
{
public
static
void
show
(
LogoBanner
logoBanner
,
Description
...
descriptionList
)
{
String
bannerShown
=
System
.
getProperty
(
BannerConstant
.
BANNER_SHOWN
,
"true"
);
if
(!
Boolean
.
valueOf
(
bannerShown
))
{
return
;
}
System
.
out
.
println
(
""
);
String
bannerShownAnsiMode
=
System
.
getProperty
(
BannerConstant
.
BANNER_SHOWN_ANSI_MODE
,
"false"
);
if
(
Boolean
.
valueOf
(
bannerShownAnsiMode
))
{
System
.
out
.
println
(
logoBanner
.
getBanner
());
}
else
{
System
.
out
.
println
(
logoBanner
.
getPlainBanner
());
}
List
<
Description
>
descriptions
=
new
ArrayList
<>();
for
(
Description
description
:
descriptionList
)
{
descriptions
.
add
(
description
);
}
DescriptionBanner
descriptionBanner
=
new
DescriptionBanner
();
System
.
out
.
println
(
descriptionBanner
.
getBanner
(
descriptions
));
}
}
dlink-admin/src/main/resources/META-INF/spring.factories
View file @
8a90ad7d
org.springframework.context.ApplicationContextInitializer=\
com.dlink.common.banner.BannerInitializer
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.dlink.db.config.MybatisPlusConfigure
com.dlink.db.config.MybatisPlusConfigure
\ No newline at end of file
dlink-admin/src/main/resources/
dlink/logo
.txt
→
dlink-admin/src/main/resources/
banner
.txt
View file @
8a90ad7d
______ _ __
:: Spring Boot :: ${spring-boot.formatted-version}
|_ _ `. (_) [ | _
| | `. \ __ _ .--. | | / ] _ __
______ _ __
| | | |[ | [ `.-. | | '' < [ \ [ ]
|_ _ `. (_) [ | _
_| |_.' / | | | | | | | |`\ \ \ '/ /
| | `. \ __ _ .--. | | / ] _ __
|______.' [___][___||__][__| \_][\_: /
| | | |[ | [ `.-. | | '' < [ \ [ ]
\__.'
_| |_.' / | | | | | | | |`\ \ \ '/ /
|______.' [___][___||__][__| \_][\_: /
\__.'
Version: 0.6.7-SNAPSHOT
Github: https://github.com/DataLinkDC/dlink
公众号: DataLink数据中台
pom.xml
View file @
8a90ad7d
...
@@ -67,7 +67,6 @@
...
@@ -67,7 +67,6 @@
<ojdbc8.version>
12.2.0.1
</ojdbc8.version>
<ojdbc8.version>
12.2.0.1
</ojdbc8.version>
<clickhouse.version>
0.2.6
</clickhouse.version>
<clickhouse.version>
0.2.6
</clickhouse.version>
<postgresql.version>
42.2.14
</postgresql.version>
<postgresql.version>
42.2.14
</postgresql.version>
<banner.version>
1.0.2
</banner.version>
<hibernate-validator.version>
6.2.0.Final
</hibernate-validator.version>
<hibernate-validator.version>
6.2.0.Final
</hibernate-validator.version>
<!--<flyway.version>6.4.4</flyway.version>-->
<!--<flyway.version>6.4.4</flyway.version>-->
<sa-token.version>
1.28.0
</sa-token.version>
<sa-token.version>
1.28.0
</sa-token.version>
...
@@ -173,11 +172,6 @@
...
@@ -173,11 +172,6 @@
<artifactId>
postgresql
</artifactId>
<artifactId>
postgresql
</artifactId>
<version>
${postgresql.version}
</version>
<version>
${postgresql.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
banner
</artifactId>
<version>
${banner.version}
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.hibernate
</groupId>
<groupId>
org.hibernate
</groupId>
<artifactId>
hibernate-validator
</artifactId>
<artifactId>
hibernate-validator
</artifactId>
...
...
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