Extract code samples from docs

See gh-6313
This commit is contained in:
Phillip Webb
2021-05-02 15:59:28 -07:00
parent 0893df4a01
commit 9aad29da0c
101 changed files with 2502 additions and 579 deletions

View File

@@ -31,7 +31,7 @@ The following listing shows a typical layout:
com
+- example
+- myapplication
+- Application.java
+- MyApplication.java
|
+- customer
| +- Customer.java
@@ -46,21 +46,9 @@ The following listing shows a typical layout:
+- OrderRepository.java
----
The `Application.java` file would declare the `main` method, along with the basic `@SpringBootApplication`, as follows:
The `MyApplication.java` file would declare the `main` method, along with the basic `@SpringBootApplication`, as follows:
[source,java,pending-extract=true,indent=0]
[source,java,indent=0]
----
package com.example.myapplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
include::{docs-java}/using/structuringyourcode/locatingthemainclass/MyApplication.java[]
----