Phase 1 #17: Spring Cloud Alibaba 微服务框架搭建
- Maven 父工程 wm-parent (Spring Boot 3.3.5 + Cloud 2023.0.3 + Alibaba 2023.0.1) - 12个子模块: wm-common/gateway/base/iot/data-engine/bpm/production/revenue/patrol/bi/notify/job - wm-common: 统一响应 R<T> + 全局异常处理 + BusinessException - wm-gateway: Spring Cloud Gateway 路由配置(7个微服务路由) - 集成: Nacos(注册/配置) + PostgreSQL + Redis + Kafka + Sa-Token + MyBatis-Plus + Knife4j - docker-compose.yml: 一键启动10个中间件(PG+PostGIS/TDengine/Redis/Kafka/EMQX/Nacos/ES/Kibana/MinIO/GeoServer)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package com.water.patrol;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class PatrolApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PatrolApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
server:
|
||||
port: 8087
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: wm-patrol
|
||||
datasource:
|
||||
url: jdbc:postgresql://${PG_HOST:127.0.0.1}:5432/water_management
|
||||
username: ${PG_USER:water}
|
||||
password: ${PG_PASS:water123}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:127.0.0.1}:8848
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:/mapper/**/*.xml
|
||||
Reference in New Issue
Block a user