springboot工程pom的两种配置方式

简介:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.hjzgg.simulation</groupId>
    <artifactId>service</artifactId>
    <version>1.0-SNAPSHOT</version>

    <modules>
        <module>provider</module>
        <module>consumer</module>
        <module>register</module>
        <module>common</module>
        <module>api</module>
    </modules>
    <packaging>pom</packaging>

    <name>service</name>
    <url>http://maven.apache.org</url>
  
//这里让 spring boot parent 当做项目的 parent <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>${spring-boot.version}</version> </parent> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> <common.lang3.version>3.4</common.lang3.version> <pagehelper.version>4.1.1</pagehelper.version> <fastjson.version>1.2.17</fastjson.version> <swagger2-version>2.6.1</swagger2-version> <spring-boot.version>1.5.2.RELEASE</spring-boot.version> </properties> <dependencyManagement> <dependencies> <!-- 公共组件 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${common.lang3.version}</version> </dependency> <!--fast json--> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>${fastjson.version}</version> </dependency> <!--swagger2--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>${swagger2-version}</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>${swagger2-version}</version> </dependency>         
//这里,是另一种依赖 spring boot方式
<!--<dependency>--> <!--<groupId>org.springframework.boot</groupId>--> <!--<artifactId>spring-boot-dependencies</artifactId>--> <!--<version>${spring-boot.version}</version>--> <!--<type>pom</type>--> <!--<scope>import</scope>--> <!--</dependency>--> </dependencies> </dependencyManagement> </project>









本文转自 小眼儿 博客园博客,原文链接:http://www.cnblogs.com/hujunzheng/p/7146274.html,如需转载请自行联系原作者
目录
相关文章
|
1月前
|
Java 调度 Spring
SpringBoot实现多线程定时任务动态定时任务配置文件配置定时任务
SpringBoot实现多线程定时任务动态定时任务配置文件配置定时任务
283 0
|
27天前
|
前端开发 Java 应用服务中间件
Springboot对MVC、tomcat扩展配置
Springboot对MVC、tomcat扩展配置
|
4天前
|
Java 微服务 Spring
Spring Boot中获取配置参数的几种方法
Spring Boot中获取配置参数的几种方法
17 2
|
7天前
|
Web App开发 前端开发 Java
SpringBoot配置HTTPS及开发调试
在实际开发过程中,如果后端需要启用https访问,通常项目启动后配置nginx代理再配置https,前端调用时高版本的chrome还会因为证书未信任导致调用失败,通过摸索整理一套开发调试下的https方案,特此分享
15 0
SpringBoot配置HTTPS及开发调试
|
9天前
|
存储 Java 数据库
SpringBoot使用jasypt实现数据库配置加密
这样,你就成功地使用Jasypt实现了Spring Boot中的数据库配置加密,确保敏感信息在配置文件中以加密形式存储,并在应用启动时自动解密。
36 2
|
24天前
|
Java Shell 测试技术
一次配置,多场景适用:Spring Boot多套配置文件的深度剖析
一次配置,多场景适用:Spring Boot多套配置文件的深度剖析
39 0
一次配置,多场景适用:Spring Boot多套配置文件的深度剖析
|
28天前
|
Java 容器
SpringBoot使用配置注解开启自动配置功能&整合spring-boot-configuration-processor
SpringBoot使用配置注解开启自动配置功能&整合spring-boot-configuration-processor
17 0
|
28天前
|
前端开发 Java
Springboot对SpringMVC如何扩展配置
Springboot对SpringMVC如何扩展配置
|
1月前
|
Java 应用服务中间件
Springboot启动的时候初始化的线程池默认配置tomcat
Springboot启动的时候初始化的线程池默认配置tomcat
15 1
|
1月前
|
Java 数据库
SpringBoot数据库连接池常用配置
SpringBoot数据库连接池常用配置
17 0