Extract code samples from docs
See gh-6313
This commit is contained in:
@@ -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[]
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user