Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
cc8aa753
Commit
cc8aa753
authored
Dec 23, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic Banner to CLI Shell
parent
cccb5d46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ShellCommand.java
...va/org/springframework/boot/cli/command/ShellCommand.java
+9
-0
No files found.
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/ShellCommand.java
View file @
cc8aa753
...
...
@@ -44,6 +44,8 @@ public class ShellCommand extends AbstractCommand {
final
PrintStream
sysout
=
System
.
out
;
final
PrintStream
syserr
=
System
.
err
;
printBanner
();
System
.
setIn
(
console
.
getInput
());
PrintStream
out
=
new
PrintStream
(
new
OutputStream
()
{
@Override
...
...
@@ -161,6 +163,13 @@ public class ShellCommand extends AbstractCommand {
}
}
private
void
printBanner
()
{
String
version
=
ShellCommand
.
class
.
getPackage
().
getImplementationVersion
();
version
=
(
version
==
null
?
""
:
" (v"
+
version
+
")"
);
System
.
out
.
println
(
"Spring Boot CLI"
+
version
);
System
.
out
.
println
(
"Hit TAB to complete. Type 'help' and hit RETURN for help."
);
}
public
void
pushPrompt
(
String
prompt
)
{
this
.
prompts
.
push
(
this
.
prompt
);
this
.
prompt
=
prompt
;
...
...
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