一、前言

二、多模块构建

1.工程结构

父工程:weixin-service

子模块:weixin-gz

weixin-qy

2.父工程 weixin-service

(1)build.gradle

buildscript {
ext {
springBootVersion = '2.0.1.RELEASE'
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
//mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
} //配置所有项目
allprojects {
//应用插件
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management' //公共属性
group = 'com.ray.weixin'
version = '0.0.1-SNAPSHOT' //编译属性
sourceCompatibility = 1.8
targetCompatibility = 1.8 } //构建依赖
subprojects { repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
} dependencies {
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('org.springframework.boot:spring-boot-starter-validation')
compile('org.springframework.boot:spring-boot-starter-web')
compileOnly('org.projectlombok:lombok') // 5. jackson
compile ('com.alibaba:fastjson:1.2.44') //6. Redis
compile('org.springframework.boot:spring-boot-starter-data-redis') //7.Quartz
compile('org.springframework.boot:spring-boot-starter-quartz') testCompile('org.springframework.boot:spring-boot-starter-test')
}
} repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
}

(2)settings.gradle

rootProject.name = 'weixin-service'
include 'weixin-gz'
include 'weixin-qy'

3.子模块 weixin-gz

dependencies {

}

4.子模块 weixin-qy

dependencies {

}

三、参考资料

1.

gradle_学习_02_gradle多模块构建实例的更多相关文章

  1. Maven多模块构建实例

    创建coffee-parent项目 New->Maven Project 创建coffee-web项目 右键coffee-parent项目->New->Project... 注意:需 ...

  2. 值得 Web 开发人员学习的20个 jQuery 实例教程

    这篇文章挑选了20个优秀的 jQuery 实例教程,这些 jQuery 教程将帮助你把你的网站提升到一个更高的水平.其中,既有网站中常用功能的的解决方案,也有极具吸引力的亮点功能的实现方法,相信通过对 ...

  3. Spring学习笔记IOC与AOP实例

    Spring框架核心由两部分组成: 第一部分是反向控制(IOC),也叫依赖注入(DI); 控制反转(依赖注入)的主要内容是指:只描述程序中对象的被创建方式但不显示的创建对象.在以XML语言描述的配置文 ...

  4. 学习rollup.js模块文件打包

    学习rollup.js模块文件打包 一:rollup 是什么?Rollup 是一个 JavaScript 模块打包器,可以将小块代码编译成大块复杂的代码. webpack 和 Rollup 对比不同点 ...

  5. Python学习 Part4:模块

    Python学习 Part4:模块 1. 模块是将定义保存在一个文件中的方法,然后在脚本中或解释器的交互实例中使用.模块中的定义可以被导入到其他模块或者main模块. 模块就是一个包含Python定义 ...

  6. input子系统学习笔记六 按键驱动实例分析下【转】

    转自:http://blog.chinaunix.net/uid-20776117-id-3212095.html 本文接着input子系统学习笔记五 按键驱动实例分析上接续分析这个按键驱动实例! i ...

  7. Android单片机与蓝牙模块通信实例代码

    Android单片机与蓝牙模块通信实例代码 参考路径:http://www.jb51.net/article/83349.htm 啦啦毕业了,毕业前要写毕业设计,需要写一个简单的蓝牙APP进行交互,通 ...

  8. Python3学习笔记25-logging模块

    logging模块,Python自带用来记录日志的模块. 因为工作需要用到关于日志的,最近一直都在看关于日志模块的东西,百度了很多文章,可惜都是看的让人一头雾水,最后运气不错,找到一篇很详细的文章.传 ...

  9. 手把手教你学node.js之学习使用外部模块

    学习使用外部模块 目标 建立一个 lesson2 项目,在其中编写代码. 当在浏览器中访问 http://localhost:3000/?q=alsotang 时,输出 alsotang 的 md5 ...

随机推荐

  1. server.xml; lineNumber: 44; columnNumber: 95; 对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾。

    url="jdbc:mysql://192.169.1.201:3306/raker?useUnicode=true&characterEncoding=UTF-8&zero ...

  2. Android-自己定义meta-data扩展数据

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/wwj_748/article/details/25079991 Android-自己定义meta-d ...

  3. Ubuntu Server 16.04安装xfce4图形界面远程控制

    1.首先连接上你的服务器,然后安装vncserver,命令如下 apt-get install vnc4server 2.安装图形界面 apt-get install xfce4如果安装不上,就 ap ...

  4. CoreThink主题开发(九)使用H-ui开发博客主题之用户个人主页

    感谢H-ui.感谢CoreThink!  效果图: 这里使用table布局 /Theme/Blog/User/Index/home.html <extend name="$_home_ ...

  5. MyEclipse工具栏的隐藏与显示及自定义

    Myeclipse的工具栏 1.隐藏 工具栏---->右键---->hide toolbar 2.显示     window ----> show toolbar 3.自定义     ...

  6. win10系统修改Intel VT-x时进入不了BIOS问题

    一般电脑进入BIOS的方式都是在开机的时候不停的按F2或者F12,但是Win10系统由于支持快速启动,当win10系统快速启动的时候,按F12或者F2是没反应的,解决方式: 第一步:修改win10的启 ...

  7. MACHINE_START-内核板级初始化实现机制(linux3.1.0)

    转:https://blog.csdn.net/charliewangg12/article/details/41518549 在驱动开发时,我们都是以一块开发板为基础移植驱动程序.每一块开发板对应一 ...

  8. Struts2笔记02——Struts2 概述(转)

    原始内容:https://www.tutorialspoint.com/struts_2/basic_mvc_architecture.htm Struts2是基于MVC设计模式的一种流行.成熟的We ...

  9. verilog FAQ(zz)

    1. What is the race condition in verilog? Ans :The situation when two expressions are allowed to exe ...

  10. IOS中大文件拷贝算法

    + (void)copyFileFromPath:(NSString *)fromPath toPath:(NSString *)toPath { //每次读取数据大小 #define READ_SI ...