Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
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
wangpeng
dinky
Commits
e506a272
Unverified
Commit
e506a272
authored
Nov 01, 2023
by
ZackYoung
Committed by
GitHub
Nov 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix_version (#2474)
parent
be13e0c0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
5 deletions
+65
-5
Knife4jConfig.java
...dmin/src/main/java/org/dinky/configure/Knife4jConfig.java
+3
-3
application.yml
dinky-admin/src/main/resources/application.yml
+0
-2
pom.xml
dinky-common/pom.xml
+21
-0
DinkyVersion.java
dinky-common/src/main/java/org/dinky/DinkyVersion.java
+39
-0
common.properties
dinky-common/src/main/resources/common.properties
+2
-0
No files found.
dinky-admin/src/main/java/org/dinky/configure/Knife4jConfig.java
View file @
e506a272
...
@@ -19,11 +19,12 @@
...
@@ -19,11 +19,12 @@
package
org
.
dinky
.
configure
;
package
org
.
dinky
.
configure
;
import
org.dinky.DinkyVersion
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties
;
import
org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties
;
import
org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties
;
import
org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties
;
import
org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType
;
import
org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType
;
...
@@ -61,8 +62,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
...
@@ -61,8 +62,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
@Import
(
BeanValidatorPluginsConfiguration
.
class
)
@Import
(
BeanValidatorPluginsConfiguration
.
class
)
public
class
Knife4jConfig
{
public
class
Knife4jConfig
{
@Value
(
"${dinky.version}"
)
private
final
String
dinkyVersion
=
DinkyVersion
.
getVersion
();
private
String
dinkyVersion
;
private
final
OpenApiExtensionResolver
openApiExtensionResolver
;
private
final
OpenApiExtensionResolver
openApiExtensionResolver
;
...
...
dinky-admin/src/main/resources/application.yml
View file @
e506a272
...
@@ -154,8 +154,6 @@ sa-token:
...
@@ -154,8 +154,6 @@ sa-token:
knife4j
:
knife4j
:
enable
:
true
enable
:
true
dinky
:
version
:
${revision}
sms
:
sms
:
is-print
:
false
is-print
:
false
...
...
dinky-common/pom.xml
View file @
e506a272
...
@@ -158,4 +158,25 @@
...
@@ -158,4 +158,25 @@
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<resources>
<!-- Replace maven global variables -->
<resource>
<filtering>
true
</filtering>
<directory>
src/main/resources
</directory>
<includes>
<include>
common.properties
</include>
</includes>
</resource>
<!-- Keep files with variables that are not replaced -->
<resource>
<filtering>
false
</filtering>
<directory>
src/main/resources
</directory>
<excludes>
<exclude>
common.properties
</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
</project>
dinky-common/src/main/java/org/dinky/DinkyVersion.java
0 → 100644
View file @
e506a272
/*
*
* 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
org
.
dinky
;
import
cn.hutool.setting.dialect.Props
;
public
final
class
DinkyVersion
{
private
DinkyVersion
()
{}
/**
* Return the full version string of the present Dinky codebase.
*
* @return the version of Dinky
*/
public
static
String
getVersion
()
{
try
{
return
Props
.
getProp
(
"common.properties"
).
getProperty
(
"version"
);
}
catch
(
Exception
e
)
{
return
"${revision}"
;
}
}
}
dinky-common/src/main/resources/common.properties
0 → 100644
View file @
e506a272
version
=
${project.version}
\ 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