如何基于「盘古开发框架」开发垂直分层单体应用

本文介绍如何基于盘古开发框架开发一个单体分层架构的应用。文中所述仅为搭建一个单体应用的基本框架,增加配置中心、数据持久化、缓存等能力请参考开发指南的相关章节。

背景

软件架构的本质是一种在特定资源背景下折中平衡后追求业务增长的一门艺术。虽然盘古框架的标准姿势是分布式微服务开发,但决定技术开发架构选型的因素很多,单体应用依旧有很多应用场景。因此,盘古框架不会绑定用户到一个固定的开发范式和架构上,而是支持随意组合、自动装配、灵活插拔。 既能构建大并发高可用的分布式微服务架构也能搭建小巧的垂直单体分层架构。

安装相关盘古模块



    com.gitee.pulanos.pangu
    pangu-parent
    latest.version.xxx
    



    com.gitee.pulanos.pangu
    pangu-spring-boot-starter



    com.gitee.pulanos.pangu
    pangu-web-spring-boot-starter

本地配置

为便于理解,本文基于本地配置的方式编写。若改为标准的 Nacos 配置中心模式,请参阅:配置中心 章节。

spring.application.name=pangu-examples-empty-web
spring.jackson.time-zone=GMT+8

logging.level.root=INFO
logging.level.com.gitee.pulanos.pangu=INFO

启动入口

@SpringBootApplication
public class EmptyWebPanguApplication {
	public static void main(String[] args) {
		PanGuApplicationBuilder.init(EmptyWebPanguApplication.class).run(args);
	}
}

本文相关范例源码

  • pangu-examples-empty-web:单体分层Web应用范例

下一步

继续阅读其它章节获取你想要的答案或通过我们的 开发者社区 寻求更多帮助。

参考文献

  • 开发架构模式对比
  • 如何开发单体应用

你可能感兴趣的:(盘古开发框架,java,spring,boot,spring)