first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.sprint.jacoco.jacocodemo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class JacocodemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(JacocodemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.sprint.jacoco.jacocodemo.com.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class jacoco {
|
||||
@RequestMapping("/")
|
||||
public String hello() {
|
||||
return "Hello Word";
|
||||
}
|
||||
|
||||
@RequestMapping("/index")
|
||||
public String login() {
|
||||
return "欢迎来到登录首页!";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/b")
|
||||
public String contrastB() {
|
||||
int a = 5;
|
||||
int b = 5;
|
||||
if (a > b) {
|
||||
return "a<b";
|
||||
} else {
|
||||
return "b>a";
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping("/a")
|
||||
public String contrastA() {
|
||||
int a = 5;
|
||||
int b = 1;
|
||||
if (a > b) {
|
||||
return "a>b";
|
||||
} else {
|
||||
return "b>a";
|
||||
}
|
||||
}
|
||||
}
|
||||
1
src/main/resources/application.properties
Normal file
1
src/main/resources/application.properties
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.sprint.jacoco.jacocodemo;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class JacocodemoApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user