refactor: 抽离企业级微服务脚手架
- 删除业务特定模块(device-center, order-center, coupon-center, msg-center) - 保留核心通用模块(user-center, file-center, search-center, code-generator) - 创建 demo-center 示例模块 - 清理业务特定文档和前端项目 - 创建数据库初始化脚本 - 更新 README 和快速开始文档 - 保留所有 zlt-commons 公共组件库
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.central.demo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
public class DemoCenterApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DemoCenterApplication.class, args);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.central.demo.controller;
|
||||
|
||||
import com.central.common.model.Result;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/demo")
|
||||
public class DemoController {
|
||||
|
||||
@GetMapping("/hello")
|
||||
public Result<String> hello() {
|
||||
return Result.succeed("Hello from Demo Center!");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
spring:
|
||||
application:
|
||||
name: demo-center
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:localhost}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${NACOS_HOST:localhost}:${NACOS_PORT:8848}
|
||||
file-extension: yml
|
||||
|
||||
server:
|
||||
port: 8100
|
||||
Reference in New Issue
Block a user