—
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MyApplication {
public static void main(String[] args) throws Exception {
SpringApplication.run(MyApplication.class, args);
}
}
—
@Controller
@RequestMapping(“/test”)
public class TestController {
@RequestMapping(“/helloWorld”)
public String helloWorld(){
return “helloWorld!”;
}
}
—
pom.xml
1.3.3.RELEASE
org.springframework.boot
spring-boot-starter-web
${spring.boot.version}
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
repackage
—
请求URL http://localhost:8080/test/he