mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
feat(maven-cw-elevator): 增加 starter 模块与可执行发布包
- 新增 cw-elevator-application-starter:repackage 产出 cw-elevator-application-2.0.0.jar - ElevatorApplication:Feign、MapperScan、Async、Cache、AOP、EnableCloudwalkEvent - 父 POM 引入 Spring Cloud Greenwich.SR6 BOM;service 使用 spring-cloud-starter-openfeign - 主类 Start-Class: cn.cloudwalk.elevator.ElevatorApplication Made-with: Cursor Former-commit-id: 2b89dcb5aab7c0f29a1068fc9839de99670f2789
This commit is contained in:
@@ -69,11 +69,9 @@
|
|||||||
<groupId>cn.cloudwalk.intelligent</groupId>
|
<groupId>cn.cloudwalk.intelligent</groupId>
|
||||||
<artifactId>intelligent-cwoscomponent-rest</artifactId>
|
<artifactId>intelligent-cwoscomponent-rest</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- 反编译源码曾引用 netflix.feign;与 Spring Boot 2.1 对齐为 openfeign 注解包 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||||
<version>2.1.5.RELEASE</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>cn.cloudwalk.elevator</groupId>
|
||||||
|
<artifactId>cw-elevator-application-reactor</artifactId>
|
||||||
|
<version>2.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>cw-elevator-application-starter</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>cw-elevator-application-starter</name>
|
||||||
|
<description>可执行 Spring Boot 入口:repackage 为单 JAR 发布包(对齐历史 V1 starter 形态)。</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<alibaba.eclipse.codestyle.path>${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml</alibaba.eclipse.codestyle.path>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-cache</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-aop</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.cloudwalk.elevator</groupId>
|
||||||
|
<artifactId>cw-elevator-application-web</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${elevator.release.finalName}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>net.revelc.code.formatter</groupId>
|
||||||
|
<artifactId>formatter-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
package cn.cloudwalk.elevator;
|
||||||
|
|
||||||
|
import cn.cloudwalk.event.EnableCloudwalkEvent;
|
||||||
|
import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||||
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
|
|
||||||
|
@EnableCloudwalkEvent
|
||||||
|
@EnableAsync
|
||||||
|
@EnableCaching
|
||||||
|
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||||
|
@EnableFeignClients(basePackages = "cn.cloudwalk.elevator")
|
||||||
|
@MapperScan("cn.cloudwalk.elevator")
|
||||||
|
@SpringBootApplication(exclude = {PageHelperAutoConfiguration.class})
|
||||||
|
public class ElevatorApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ElevatorApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
<module>cw-elevator-application-data</module>
|
<module>cw-elevator-application-data</module>
|
||||||
<module>cw-elevator-application-service</module>
|
<module>cw-elevator-application-service</module>
|
||||||
<module>cw-elevator-application-web</module>
|
<module>cw-elevator-application-web</module>
|
||||||
|
<module>cw-elevator-application-starter</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -56,10 +57,21 @@
|
|||||||
<nexus.public.repo>${nexus.baseUrl}/repository/maven-public/</nexus.public.repo>
|
<nexus.public.repo>${nexus.baseUrl}/repository/maven-public/</nexus.public.repo>
|
||||||
<formatter.maven.plugin.version>2.24.1</formatter.maven.plugin.version>
|
<formatter.maven.plugin.version>2.24.1</formatter.maven.plugin.version>
|
||||||
<alibaba.eclipse.codestyle.path>${project.basedir}/../docs/style/alibaba-eclipse-codestyle.xml</alibaba.eclipse.codestyle.path>
|
<alibaba.eclipse.codestyle.path>${project.basedir}/../docs/style/alibaba-eclipse-codestyle.xml</alibaba.eclipse.codestyle.path>
|
||||||
|
<!-- 与 Spring Boot 2.1.18 对齐的 OpenFeign/Cloud 版本(发布包可执行 JAR 需要) -->
|
||||||
|
<spring-cloud.version>Greenwich.SR6</spring-cloud.version>
|
||||||
|
<!-- spring-boot-maven-plugin repackage 产出的可执行 JAR 文件名(不含 .jar) -->
|
||||||
|
<elevator.release.finalName>cw-elevator-application-2.0.0</elevator.release.finalName>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-dependencies</artifactId>
|
||||||
|
<version>${spring-cloud.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.cloudwalk.cloud</groupId>
|
<groupId>cn.cloudwalk.cloud</groupId>
|
||||||
<artifactId>cloudwalk-common-result</artifactId>
|
<artifactId>cloudwalk-common-result</artifactId>
|
||||||
|
|||||||
Reference in New Issue
Block a user