Skip to content

Commit c94c44e

Browse files
committed
Update README.adoc
1 parent 35cd1ff commit c94c44e

File tree

1 file changed

+15
-42
lines changed

1 file changed

+15
-42
lines changed

README.adoc

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ Here is a quick teaser of a complete Spring Shell application in Java:
2828
----
2929
import org.springframework.boot.SpringApplication;
3030
import org.springframework.boot.autoconfigure.SpringBootApplication;
31-
import org.springframework.shell.command.annotation.Command;
31+
import org.springframework.shell.core.command.annotation.Command;
3232
3333
@SpringBootApplication
34-
@Command
35-
public class DemoApplication {
34+
public class SpringShellApplication {
3635
3736
@Command
3837
public String hi() {
3938
return "hi";
4039
}
4140
4241
public static void main(String[] args) {
43-
SpringApplication.run(DemoApplication.class, args);
42+
SpringApplication.run(SpringShellApplication.class, args);
4443
}
44+
4545
}
4646
----
4747

@@ -52,31 +52,25 @@ Running it as an executable _jar_ in an interactive mode:
5252
$ java -jar demo.jar
5353
5454
shell:>help
55-
AVAILABLE COMMANDS
56-
55+
Available commands:
5756
Built-In Commands
58-
help: Display help about available commands
59-
clear: Clear the shell screen.
60-
quit, exit: Exit the shell.
61-
history: Display or save the history of previously run commands
62-
version: Show version info
63-
script: Read and execute commands from a file.
64-
65-
Demo Application
66-
hi:
57+
clear: Clear the terminal screen
58+
version: Show version info
59+
help: Display help about available commands
60+
SpringShellApplication Commands
61+
hi: N/A
6762
6863
shell:>hi
6964
hi
7065
----
7166

72-
Or running it in a non-interactive mode:
67+
== Tutorials and Sample apps
7368

74-
[source,bash]
75-
----
76-
$ java -jar demo.jar hi
69+
You can find complete tutorials and sample applications in the `spring-shell-samples` repository:
7770

78-
hi
79-
----
71+
- https://github.com/spring-projects/spring-shell/tree/main/spring-shell-samples/spring-shell-sample-hello-world[Hello World Spring Shell application]
72+
- https://github.com/spring-projects/spring-shell/tree/main/spring-shell-samples/spring-shell-sample-spring-boot[Hello World Spring Shell application with Spring Boot]
73+
- https://github.com/spring-projects/spring-shell/tree/main/spring-shell-samples/spring-shell-sample-petclinic[Spring Pet Clinic CLI application]
8074

8175
== Getting Help
8276
Are you having trouble with Spring Shell? We want to help!
@@ -104,27 +98,6 @@ Building and running tests:
10498
./mvnw install
10599
----
106100

107-
If you want to build the project in a Docker container, you can proceed as follows:
108-
109-
[source,bash]
110-
----
111-
docker run -it --mount type=bind,source="$(pwd)",target=/spring-shell maven:3-openjdk-17 bash
112-
cd spring-shell
113-
./mvnw install
114-
----
115-
116-
This will mount the source code that you cloned previously on the host inside the container.
117-
If you want to work on a copy of the source code inside the container (no side effects on the host),
118-
you can proceed as follows:
119-
120-
[source,bash]
121-
----
122-
docker run -it maven:3-openjdk-17 bash
123-
git clone https://github.com/spring-projects/spring-shell.git
124-
cd spring-shell
125-
./mvnw install
126-
----
127-
128101
== Building the Documentation
129102

130103
The documentation is built using Antora and can be run using the Antora Maven plugin.

0 commit comments

Comments
 (0)