Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize: add version to the console banner #6417

Open
wants to merge 12 commits into
base: 2.x
Choose a base branch
from
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6393](https://github.com/apache/incubator-seata/pull/6393)] determine the version before sync metadata and add retry mechanism
- [[#6387](https://github.com/apache/incubator-seata/pull/6387)] optimize tcc use compatible
- [[#6402](https://github.com/apache/incubator-seata/pull/6402)] optimize rm-datasource use compatible
- [[#6417](https://github.com/apache/incubator-seata/pull/6417)] add version to the console banner

### refactor:
- [[#6269](https://github.com/apache/incubator-seata/pull/6269)] standardize Seata Exception
Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
- [[#6393](https://github.com/apache/incubator-seata/pull/6393)] 元数据同步前判断版本,并增加重试功能
- [[#6387](https://github.com/apache/incubator-seata/pull/6387)] 优化tcc使用兼容
- [[#6402](https://github.com/apache/incubator-seata/pull/6402)] 优化rm-datasource向下兼容
- [[#6417](https://github.com/apache/incubator-seata/pull/6417)] 控制台banner添加版本号


### refactor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,32 @@

import java.io.IOException;

import org.apache.seata.core.protocol.Version;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
* Server Application
*/
@SpringBootApplication(scanBasePackages = {"org.apache.seata"})
public class ServerApplication {
public static void main(String[] args) throws IOException {
// run the spring-boot application
SpringApplication.run(ServerApplication.class, args);
SpringApplication app = new SpringApplication(ServerApplication.class);
// set the banner and version information
app.setBanner((environment, sourceClass, out) -> {
out.println("====================================================================");
out.println(" _ _____ _ \n" +
lightClouds917 marked this conversation as resolved.
Show resolved Hide resolved
" /\\ | | / ____| | | \n" +
" / \\ _ __ __ _ ___| |__ ___ | (___ ___ __ _| |_ __ _ \n" +
" / /\\ \\ | '_ \\ / _` |/ __| '_ \\ / _ \\ \\___ \\ / _ \\/ _` | __/ _` |\n" +
" / ____ \\| |_) | (_| | (__| | | | __/ ____) | __/ (_| | || (_| |\n" +
"/_/ \\_\\ .__/ \\__,_|\\___|_| |_|\\___| |_____/ \\___|\\__,_|\\__\\__,_|\n" +
" | | \n" +
" |_| \n");
out.println(" Current Version: " + Version.getCurrent());
out.println("====================================================================");
});
app.run(args);
}
}
7 changes: 0 additions & 7 deletions server/src/main/resources/banner.txt

This file was deleted.

Loading