Skip to content

Commit

Permalink
Merge pull request #90 from WeBankFinTech/dev
Browse files Browse the repository at this point in the history
v1.4.0 dev=>master
  • Loading branch information
CodingCattwo committed Aug 6, 2020
2 parents 3577efe + a11930c commit 93922d1
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -35,5 +35,5 @@ gradle.properties
*.crt
*.key


application-test.properties

19 changes: 19 additions & 0 deletions Changelog.md
@@ -1,3 +1,22 @@
### v1.4.0

(2020-08-06)


**Add**
- 增加返回 Version 版本接口

**兼容性**

- 支持FISCO-BCOS v2.0.0-rc1 版本
- 支持FISCO-BCOS v2.0.0-rc2 版本
- 支持FISCO-BCOS v2.0.0-rc3 版本
- 支持FISCO-BCOS v2.0.0 及以上版本
- WeBASE-Sign v1.4.0+

详细了解,请阅读[**技术文档**](https://webasedoc.readthedocs.io/zh_CN/latest/)


### v1.3.2

(2020-06-17)
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Expand Up @@ -103,6 +103,8 @@ dependencies {
compile "commons-io:commons-io:2.4"
compile "io.shardingsphere:sharding-jdbc-spring-boot-starter:3.1.0"
compile 'org.projectlombok:lombok:1.18.2'
compile 'com.alibaba:druid:1.1.23'
compile ('com.google.guava:guava:20.0'){force = true}
annotationProcessor 'org.projectlombok:lombok:1.18.2'
}

Expand Down
@@ -0,0 +1,30 @@
/**
* Copyright 2014-2020 the original author or authors.
* <p>
* Licensed 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.webank.webase.transaction.base;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
* load 'version' in .yml
*/
@Data
@Component
public class VersionProperties {

@Value("${version}")
private String version;
}
@@ -0,0 +1,45 @@
/**
* Copyright 2014-2020 the original author or authors.
* <p>
* Licensed 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.webank.webase.transaction.version;

import com.webank.webase.transaction.base.VersionProperties;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* return version of local server
*/
@Api(value = "/version", tags = "server version")
@Slf4j
@RestController
@RequestMapping("version")
public class VersionController {

@Autowired
private VersionProperties versionProperties;

/**
* return version
* @return
*/
@GetMapping()
public String getServerVersion() {
return versionProperties.getVersion();
}
}
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
@@ -1,4 +1,6 @@
################################### Basic Configuration ###################################
# 后台服务的版本
version=v1.4.0
# 工程服务端口,端口被占用则修改
server.port=5003
server.context-path=/WeBASE-Transaction
Expand Down

0 comments on commit 93922d1

Please sign in to comment.