Update sample to refelect changes from SHL-48
This commit is contained in:
@@ -17,10 +17,10 @@ package org.springframework.shell.samples.helloworld.commands;
|
|||||||
|
|
||||||
import org.springframework.core.Ordered;
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.shell.support.util.StringUtils;
|
|
||||||
import org.springframework.shell.core.CommandMarker;
|
import org.springframework.shell.core.CommandMarker;
|
||||||
import org.springframework.shell.core.annotation.CliCommand;
|
import org.springframework.shell.core.annotation.CliCommand;
|
||||||
import org.springframework.shell.plugin.support.DefaultBannerProvider;
|
import org.springframework.shell.plugin.support.DefaultBannerProvider;
|
||||||
|
import org.springframework.shell.support.util.OsUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,11 +35,11 @@ public class MyBannerProvider extends DefaultBannerProvider
|
|||||||
@CliCommand(value = { "version" }, help = "Displays current CLI version")
|
@CliCommand(value = { "version" }, help = "Displays current CLI version")
|
||||||
public String getBanner() {
|
public String getBanner() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
buf.append("=======================================" + StringUtils.LINE_SEPARATOR);
|
buf.append("=======================================" + OsUtils.LINE_SEPARATOR);
|
||||||
buf.append("* *"+ StringUtils.LINE_SEPARATOR);
|
buf.append("* *"+ OsUtils.LINE_SEPARATOR);
|
||||||
buf.append("* HelloWorld *" +StringUtils.LINE_SEPARATOR);
|
buf.append("* HelloWorld *" +OsUtils.LINE_SEPARATOR);
|
||||||
buf.append("* *"+ StringUtils.LINE_SEPARATOR);
|
buf.append("* *"+ OsUtils.LINE_SEPARATOR);
|
||||||
buf.append("=======================================" + StringUtils.LINE_SEPARATOR);
|
buf.append("=======================================" + OsUtils.LINE_SEPARATOR);
|
||||||
buf.append("Version:" + this.getVersion());
|
buf.append("Version:" + this.getVersion());
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user