springboot源码编译、发布和文档的处理方式

源码和文档的处理方式是事先约定在程序里面的。对其源码的处理默认执行了三次约定应用,他们分别是Java开发环境的约定、基于的代码约定和基于ASCIIdoctor的文档生成约定。
对应的插件类源码如下:

/**
 * Plugin to apply conventions to projects that are part of  Boot's build.
 * Conventions are applied in response to various plugins being applied.
 *
 * When the {@link JavaBasePlugin} is applied, the conventions in {@link JavaConventions}
 * are applied.
 *
 * When the {@link MavenPublishPlugin} is applied, the conventions in
 * {@link MavenPublishingConventions} are applied.
 *
 * When the {@link AsciidoctorJPlugin} is applied, the conventions in
 * {@link AsciidoctorConventions} are applied.
 *
 * @author Andy Wilkinson
 * @author Christoph Dreis
 * @author Mike Smithson
 */
public class ConventionsPlugin implements Plugin {

	@Override
	public void apply(Project project) {
		// 应用Java约定
		new JavaConventions().apply(project);
		// 应用Maven发布约定
		new MavenPublishingConventions().apply(project);
		// 应用ASCII文档约定
		new AsciidoctorConventions().apply(project);
	}
}

有了这三个方面的约定,维护其源码的和文档就得心应手了,可以借鉴实现自己的产品库。

声明: 除非转自他站(如有侵权,请联系处理)外,本文采用 BY-NC-SA 协议进行授权 | 智乐兔
转载请注明:转自《springboot源码编译、发布和文档的处理方式
本文地址:https://www.zhiletu.com/archives-10637.html
关注公众号:智乐兔

赞赏

wechat pay微信赞赏alipay pay支付宝赞赏

上一篇
下一篇

相关文章

在线留言

你必须 登录后 才能留言!

在线客服
在线客服 X

售前: 点击这里给我发消息
售后: 点击这里给我发消息

智乐兔官微