Polish doc code samples
See gh-6313
This commit is contained in:
@@ -147,11 +147,11 @@ If you run `mvn dependency:tree` again, you see that there are now a number of a
|
||||
[[getting-started.first-application.code]]
|
||||
=== Writing the Code
|
||||
To finish our application, we need to create a single Java file.
|
||||
By default, Maven compiles sources from `src/main/java`, so you need to create that directory structure and then add a file named `src/main/java/Example.java` to contain the following code:
|
||||
By default, Maven compiles sources from `src/main/java`, so you need to create that directory structure and then add a file named `src/main/java/MyApplication.java` to contain the following code:
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
include::{docs-java}/gettingstarted/firstapplication/code/Example.java[]
|
||||
include::{docs-java}/gettingstarted/firstapplication/code/MyApplication.java[]
|
||||
----
|
||||
|
||||
Although there is not much code here, quite a lot is going on.
|
||||
@@ -222,7 +222,7 @@ You should see output similar to the following:
|
||||
....... . . .
|
||||
....... . . . (log output here)
|
||||
....... . . .
|
||||
........ Started Example in 2.222 seconds (JVM running for 6.514)
|
||||
........ Started MyApplication in 2.222 seconds (JVM running for 6.514)
|
||||
----
|
||||
|
||||
If you open a web browser to `http://localhost:8080`, you should see the following output:
|
||||
@@ -322,7 +322,7 @@ To run that application, use the `java -jar` command, as follows:
|
||||
....... . . .
|
||||
....... . . . (log output here)
|
||||
....... . . .
|
||||
........ Started Example in 2.536 seconds (JVM running for 2.864)
|
||||
........ Started MyApplication in 2.536 seconds (JVM running for 2.864)
|
||||
----
|
||||
|
||||
As before, to exit the application, press `ctrl-c`.
|
||||
|
||||
Reference in New Issue
Block a user