Browse Source

hello,world 完成

3.x
Yangkai.Shen 3 years ago
parent
commit
84cd41e3a0
3 changed files with 6 additions and 6 deletions
  1. +3
    -3
      demo-helloworld/README.md
  2. +2
    -2
      demo-helloworld/src/main/java/com/xkcoding/helloworld/HelloworldApplication.java
  3. +1
    -1
      demo-helloworld/src/test/java/com/xkcoding/helloworld/SpringBootDemoHelloworldApplicationTests.java

+ 3
- 3
demo-helloworld/README.md View File

@@ -25,15 +25,15 @@
</dependencies> </dependencies>
``` ```


#### 1.2.启动类 Application.java
#### 1.2.启动类 HelloworldApplication.java


```java ```java
@SpringBootApplication @SpringBootApplication
@RestController @RestController
public class Application {
public class HelloworldApplication {


public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args);
SpringApplication.run(HelloworldApplication.class, args);
} }


/** /**


demo-helloworld/src/main/java/com/xkcoding/helloworld/Application.java → demo-helloworld/src/main/java/com/xkcoding/helloworld/HelloworldApplication.java View File

@@ -17,10 +17,10 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@SpringBootApplication @SpringBootApplication
@RestController @RestController
public class Application {
public class HelloworldApplication {


public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args);
SpringApplication.run(HelloworldApplication.class, args);
} }


/** /**

+ 1
- 1
demo-helloworld/src/test/java/com/xkcoding/helloworld/SpringBootDemoHelloworldApplicationTests.java View File

@@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;


@SpringBootTest @SpringBootTest
class ApplicationTests {
class HelloworldApplicationTests {


@Test @Test
void contextLoads() { void contextLoads() {


Loading…
Cancel
Save