spring boot maven管理--使用spring-boot-starter-parent
2016-11-18 00:00
459 查看
springboot官方推荐我们使用spring-boot-starter-parent,spring-boot-starter-parent包含了以下信息:
1、使用java8编译级别
2、使用utf-8编码
3、实现了通用的测试框架 (JUnit, Hamcrest, Mockito).
4、智能资源过滤
5、智能的插件配置(exec plugin, surefire, Git commit ID, shade).
使用时在pom.xml添加
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.6.RELEASE</version> </parent>
即可,非常方便,如果你需要改变java的编译级别则可以添加属性:
<properties> <java.version>1.8</java.version> </properties>
当然,任何一个成熟的框架都是可灵活配置的,我们也可以不使用spring-boot-starter-parent,可以自己配置
<dependencyManagement> <dependencies> <dependency> <!-- Import dependency management from Spring Boot --> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.6.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
相关文章推荐
- 初识spring boot maven管理--使用spring-boot-starter-parent
- 不使用 spring-boot-starter-parent 构建 spring boot 应用
- 3.玩转Spring Boot 不使用spring-boot-starter-parent构建
- 使用SwaggerSpringBootStarter展示web项目api接口
- Spring Boot 不使用默认的 parent,改用自己的项目的 parent
- spring-boot-starter-data-jpa 中的 Eaxmple 如何使用
- Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.4.RELEASE
- RabbitMQ的Java应用(3) -- 使用spring-boot-starter-amqp开发生产者应用
- Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.4.RELEASE
- 使用spring-boot-starter-data-jpa 怎么配置使运行时输出SQL语句
- spring-boot-starter-actuator(健康监控)配置和使用
- springboot学习1-使用 Spring Starter Project快速创建基于spring-boot的web项目
- 不使用springboot的parent构建springboot程序
- 使用spring-boot-starter-actuator http://localhost:8080/info无法获取到相应信息
- Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.2.RELEASE
- Spring boot不使用官方默认的parent
- 使用spring-boot-starter-data-jpa 怎么配置使运行时输出SQL语句
- 自定义Spring Boot starter并使用EnableAutoConfiguration装配
- Spring Boot 不使用默认的 parent,改用自己的项目的 parent
- springboot1.5.4 配置druid1.1.0(使用druid-spring-boot-starter)