标签:string tap color ram static pre plugins oid nts
<parent> <artifactId>spring-boot-starter-parent</artifactId> <groupId>org.springframework.boot</groupId> <version>1.5.2.RELEASE</version> </parent>
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>
@SpringBootApplication public class Main { public static void main(String[] args) { SpringApplication.run(Main.class, args); } }
@RestController @RequestMapping("/demo") public class DemoController { @RequestMapping("/hello") String home() { return "Hello World!"; } }
SpringBootApplication默认扫描当前包下的RestController。自定义扫描目录时使用ComponentScan扫描指定的包。
https://github.com/darrenkeng/springboot
标签:string tap color ram static pre plugins oid nts
原文地址:http://www.cnblogs.com/darrenkeng/p/7601637.html