提交 46520320 编写于 作者: yesgohome123's avatar yesgohome123

2023年5月28日22:04:28

上级 6508b2d6
ARG VARIANT="11"
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
# [Option] Install Maven
ARG INSTALL_MAVEN="false"
ARG MAVEN_VERSION=""
# [Option] Install Gradle
ARG INSTALL_GRADLE="false"
ARG GRADLE_VERSION=""
RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
&& if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi
{
"name": "app",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "11",
"INSTALL_MAVEN": "true",
"INSTALL_GRADLE": "false",
"NODE_VERSION": "lts/*"
}
},
"settings": {
"java.home": "/docker-java-home"
},
"extensions": [
"vscjava.vscode-java-pack",
"pivotal.vscode-boot-dev-pack"
],
"forwardPorts": [8081],
"remoteUser": "vscode",
"features": {
"docker-in-docker": "latest",
"docker-from-docker": "latest"
}
}
/*
* Copyright 2007-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL =
"https://repo1.maven.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION
+ "/maven-wrapper-"
+ WRAPPER_VERSION
+ ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use
* instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if (mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if (mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if (!outputFile.getParentFile().exists()) {
if (!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '"
+ outputFile.getParentFile().getAbsolutePath()
+ "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(
new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
#
# Copyright 2012-2019 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo1.maven.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
# Changelog
## 0.0.2-SNAPSHOT(Fri ?, 2023)
> Coming soon...
### FEATURES
- 自研流程编排组件,支持配置中心动态刷新流程,详见 [`eweb-flow-compose`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-flow-compose)
- 自研一致性框架,支持 MQ 和 Cache 实现最终一致性,详见 [`eweb-consistency-task`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-consistency-task)
- 自研全链路标记组件,支持常用组件的影子库切换,详见 [`eweb-full-tracing`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-full-tracing)
- 封装授权认证组件,支持 `OAuth2``JWT` 无缝切换,详见 [`eweb-common-security`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-common-security)
- 封装数据审计组件,提供数据比对、数据脱敏功能,详见 [`eweb-data-auditor`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-data-auditor)
- 封装数据过滤组件,提供数据去重、敏感词过滤功能,详见 [`eweb-data-filter`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-data-filter)
- 封装事件审计组件,支持 SpEL 表达式和自定义函数,详见 [`eweb-event-auditor`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-event-auditor)
- 封装 `Excel` 组件,目前阿里的 `EasyExcel` 做的比较好,暂时只接入这块,详见 [`eweb-common-excel`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-common-excel)
### IMPROVEMENTS
- `Nacos` 支持配置 log4j2.yaml,并实现动态刷新,方便您动态扩展 Appender 输出日志位置和日志级别。
- `JSON` 序列化通用组件支持,支持 SPI 扩展,目前内置集成了 `Jackson``Fastjson``Fastjson2`
- `SpEL` 表达式封装,提供简易的调用方法和上下文支持
## 0.0.1-SNAPSHOT(Dec 31, 2022)
### FEATURES
- Maven 依赖管理,封装插件,提供开箱即用的配置,详见 [`eweb-dependencies`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-dependencies)[`eweb-parent`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-parent)
- Spring 官方组件改进,补充官方未提供的 `Spring Boot Starter` 组件,详见 [`eweb-spring-boot-starters`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-spring-boot-starters)
[`eweb-spring-cloud-starters`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-spring-cloud-starters)
- 基于 `Dubbo` 扩展,提供轻量级的扩展点组件,详见 [`eweb-extensions`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-extensions)
- 基于 `COLA4` 扩展,重构 `DTO`、状态机、业务扩展点等组件,详见 [`eweb-cola`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-cola)
- 封装分布式缓存组件,支持 `Redis``Caffeine``Guava` 无缝切换,接入 `JD HotKey` 或者 `Sentinel` 可实现多级缓存动态切换,详见 [`eweb-common-cache`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-common-cache)
- 封装消息队列组件,支持 `RocketMQ``Kafka``Pulsar` 无缝切换,详见 [`eweb-common-mq`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-common-mq)
- 封装分布式锁组件,支持 `Redisson``Jedis``Curator``Zookeeper` 无缝切换,详见 [`eweb-distrubuted-lock`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-distrubuted-lock)
- 封装分布式唯一ID组件,支持 `Leaf``UIDGenerator``TinyId``Snowflake` 无缝切换,详见 [`eweb-distrubuted-uid`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-distrubuted-uid)
- 封装幂等性处理组件,提供 `Token` (校验令牌)或者 `TTL` (过期时间)两种解决方案,详见 [`eweb-idempotent`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-idempotent)
- 封装 SMS 组件,支持阿里云、腾讯云、梦网、亿美等短信平台组件无缝切换,详见 [`eweb-common-sms`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-common-sms)
- 封装 Mail 组件,由于使用较少,目前仅接入 `JavaMail` 组件,详见 [`eweb-common-mail`](https://github.com/shiyindaxiaojie/eweb-architect/tree/main/eweb-components/eweb-solutions/eweb-common-mail)
### IMPROVEMENTS
- `ErrorCode` 错误码通用设计,支持业务自定义错误码和国际化语言,基于 `eweb-extensions` 的 SPI 扩展自定义返回对象,此场景适用于前后端联调
- `MyBatis` 增强,支持日志打印原生 SQL 解析语句和执行耗时
- `Sentinel` 增强,支持 `Web``Dubbo` 等场景的流控,并提供 `Spring Boot Actuator` 监控端点
- `XxlJob` 增强,支持应用动态注册到 XxlJob控制台
- `Sleuth` 增强,增加 `Zipkin` 链路跟踪 HTTP 报文信息
[//]: # (### BUG FIXES)
[//]: # (### BREAKING CHANGES:)
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
<img src="https://cdn.jsdelivr.net/gh/shiyindaxiaojie/images/readme/icon.png" align="right" />
[license-apache2.0]:https://www.apache.org/licenses/LICENSE-2.0.html
[github-action]:https://github.com/shiyindaxiaojie/eweb-architect/actions
[sonarcloud-dashboard]:https://sonarcloud.io/dashboard?id=shiyindaxiaojie_eweb-architect
# Eden* Architect
![](https://cdn.jsdelivr.net/gh/shiyindaxiaojie/images/readme/language-java-blue.svg) [![](https://cdn.jsdelivr.net/gh/shiyindaxiaojie/images/readme/license-apache2.0-red.svg)][license-apache2.0] [![](https://github.com/shiyindaxiaojie/eweb-architect/workflows/build/badge.svg)][github-action] [![](https://sonarcloud.io/api/project_badges/measure?project=shiyindaxiaojie_eweb-architect&metric=alert_status)][sonarcloud-dashboard]
Eden* Architect 致力于提供企业开发的一站式解决方案。此项目包含开发分布式应用服务的必需组件,您只需要添加一些注解和少量配置,就可以将 Spring Boot 应用接入微服务解决方案,通过中间件来迅速搭建分布式应用系统。
> 参考文档请查看 [WIKI](https://github.com/shiyindaxiaojie/eweb-architect/wiki) 。
## 功能特性
* **依赖管理和插件封装**:统一管理依赖版本,解决依赖冲突问题,并提供常用插件的封装,让开发者减少在构建工具所消耗的时间。
* **常用组件集成与封装**:在 Spring 官方的基础上扩展,提供 `XxlJob``CAT``Netty``Arthas` 等组件的集成。
* **组件适配及扩展点**:针对现有主流技术点进行高级抽象,提供 `消息队列``缓存``短信平台``邮件``Excel` 等组件的动态适配。
* **通用场景解决方案**:提供`多级缓存``分布式锁``分布式唯一ID``幂等性处理``业务流程编排``最终一致性``全链路标记` 等解决方案工具。
## 组件构成
![](https://cdn.jsdelivr.net/gh/shiyindaxiaojie/images/eweb-architect/component.png)
* **eweb-dependencies**: 依赖管理组件,管理全局依赖的版本。
* **eweb-parent**: 构建管理组件,封装常用插件,提供开箱即用的配置。
* **eweb-commons**: 基础工具组件,基于 `Apache Commons``Google Guava``HuTool` 扩展。
* **eweb-extensions**: 扩展点组件,参考 `Dubbo` 扩展点改造,轻量级实现组件的扩展。
* **eweb-cola**: `COLA` 组件,在 `COLA` 原生的基础上优化,完善了 `DDD` 领域模型、轻量级状态机、业务扩展点等组件。
* **eweb-solutions**: 解决方案工具集,提供 `多级缓存``分布式锁``分布式唯一ID``数据去重``事件审计` 等场景的设计与实现。
* **eweb-spring-framework**: 基础框架组件,支持自定义错误码、异常解析器。
* **eweb-spring-data**: 数据存储组件,扩展了 `Mybatis``Redis``Flyway``Liquibase` 等组件。
* **eweb-spring-security**: 授权认证组件,扩展了 `Spring Security OAuth2``Jwt``Shiro` 等组件。
* **eweb-spring-integration**: 第三方集成组件,扩展了 `RocketMQ``Kafka``Netty``XxlJob` 等组件。
* **eweb-spring-boot**: `Spring Boot`组件,根据实际的使用场景进行扩展。
* **eweb-spring-boot-starters**: `Spring Boot`组件自动装配,对官方原生组件无感知增强,并扩充未集成的组件。
* **eweb-spring-boot-test**: `Spring Boot`组件测试,对官方原生组件进行扩展。
* **eweb-spring-cloud**: `Spring Cloud`组件,扩展了 `Nacos``Sentinel``Zookeeper` 等组件。
* **eweb-spring-cloud-starters**: `Spring Cloud`组件自动装配,基于 `Spring Cloud Starters` 扩展。
* **eweb-spring-test**: `Spring`测试组件,扩展了 `TestContainer`测试容器和嵌入式的中间件,单元测试。
## 如何构建
由于 `Spring Boot 2.4.x``Spring Boot 3.0.x` 在架构层面有很大的变更,因此我们采取跟 Spring Boot 版本号一致的分支:
* 2.4.x 分支适用于 `Spring Boot 2.4.x`,最低支持 JDK 1.8。
* 2.7.x 分支适用于 `Spring Boot 2.7.x`,最低支持 JDK 11。
* 3.0.x 分支适用于 `Spring Boot 3.0.x`,最低支持 JDK 17。
本项目默认使用 Maven 来构建,最快的使用方式是 `git clone` 到本地,然后执行以下命令:
```bash
./mvnw install -T 4C
```
执行完毕后,项目将被安装到本地 Maven 仓库。
## 如何使用
首先,在您的项目 `pom.xml``parent` 节点引用 `eweb-parent` 父工程。
```xml
<parent>
<groupId>cn.easycode.akina</groupId>
<artifactId>eweb-parent</artifactId>
<version>1.0.1-SNAPSHOT</version>
<relativePath/>
</parent>
```
然后,从 `eweb-spring-boot-starters` 或者 `eweb-spring-cloud-starters` 搜索您需要集成的组件。例如,集成 CAT,您可以在 `dependencies` 节点中添加以下内容:
```xml
<dependencies>
<dependency>
<groupId>cn.easycode.akina</groupId>
<artifactId>eweb-mybatis-spring-boot-starter</artifactId>
</dependency>
</dependencies>
```
> 为了减少繁琐的依赖冲突解决工作,在第一步引入的 `eweb-parent` 组件已经导入了常用的依赖,一般情况下,不需要填写版本号。
在您的项目配置文件如 `application.yml` ,开启相关配置,大多数组件以 `xxx.enabled` 属性项作为开关。
````yaml
cat:
enabled: false # 默认关闭,请按需开启
trace-mode: true # 开启访问观测
support-out-trace-id: false # 允许异构子系统间透传链路ID
home: /tmp
servers: localhost # CAT 地址
tcp-port: 2280
http-port: 8080
````
业务代码无须改动,直接启动您的项目,简单发起HTTP请求和RPC调用,您会发现,我们已经自动帮您完成了 CAT 的埋点。
![](https://cdn.jsdelivr.net/gh/shiyindaxiaojie/images/cat/tracing.png)
## 代码演示
为了演示如何使用,我们提供了 3 种不同架构风格的 Demo
* 面向领域模型的 **COLA 架构**,代码实例可以查看 [eweb-demo-cola](https://github.com/shiyindaxiaojie/eweb-demo-cola)
* 面向数据模型的 **分层架构**,代码实例请查看 [eweb-demo-layer](https://github.com/shiyindaxiaojie/eweb-demo-layer)
* 面向单机模型的 **MVC 架构**,代码实例可以查看 [eweb-demo-mvc](https://github.com/shiyindaxiaojie/eweb-demo-mvc)
## 版本规范
项目的版本号格式为 `x.y.z` 的形式,其中 x 的数值类型为数字,从 0 开始取值,且不限于 0~9 这个范围。项目处于孵化器阶段时,第一位版本号固定使用 0,即版本号为 `0.x.x` 的格式。
* 孵化版本:0.0.1-SNAPSHOT
* 开发版本:1.0.0-SNAPSHOT
* 发布版本:1.0.0
版本迭代规则:
* 1.0.0 <> 1.0.1:兼容
* 1.0.0 <> 1.1.0:基本兼容
* 1.0.0 <> 2.0.0:不兼容
## 变更日志
请查阅 [CHANGELOG.md](https://github.com/shiyindaxiaojie/eweb-architect/blob/main/CHANGELOG.md)
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java-library'
id 'maven-publish'
}
repositories {
mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
group = 'cn.easycode.akina'
version = '0.0.1-SNAPSHOT'
java.sourceCompatibility = JavaVersion.VERSION_1_8
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}
......@@ -8,33 +8,33 @@ title 架构图
'skinparam BackgroundColor transparent
[eden-architect] <<架构>>
[ewebarchitect] <<架构>>
[eden-component] <<组件>>
[eden-dependencies] <<依赖管理>>
[eden-parent] <<父工程>>
[eden-commons] <<工具集>>
[eden-extensions] <<扩展点组件>>
[eden-spring-framework] <<基础框架>>
[eden-spring-data] <<数据存储组件>>
[eden-spring-security] <<授权认证组件>>
[eden-spring-integration] <<第三方集成组件>>
[eden-spring-boot] <<Spring Boot组件>>
[eden-spring-boot-test] <<Spring Boot组件测试>>
[eden-spring-boot-starters] <<Spring Boot组件自动装配>>
[eden-spring-cloud] <<Spring Cloud组件>>
[eden-spring-cloud-starters] <<Spring Cloud组件自动装配>>
[eden-spring-test] <<Spring测试组件>>
[eden-solutions] <<解决方案>>
[eden-cola] <<COLA架构>>
[eden-cola-extensions] <<COLA扩展点>>
[eden-cola-statemachine] <<COLA状态机>>
[eden-plugins] <<插件集合>>
[eden-tests] <<测试集合>>
[eden-deployment-tests] <<部署测试集>>
[eden-integration-tests] <<集成测试集>>
[eden-performance-tests] <<性能测试集>>
[eden-smoke-tests] <<冒烟测试集>>
[ewebcomponent] <<组件>>
[ewebdependencies] <<依赖管理>>
[ewebparent] <<父工程>>
[ewebcommons] <<工具集>>
[ewebextensions] <<扩展点组件>>
[eweb-spring-framework] <<基础框架>>
[eweb-spring-data] <<数据存储组件>>
[eweb-spring-security] <<授权认证组件>>
[eweb-spring-integration] <<第三方集成组件>>
[eweb-spring-boot] <<Spring Boot组件>>
[eweb-spring-boot-test] <<Spring Boot组件测试>>
[eweb-spring-boot-starters] <<Spring Boot组件自动装配>>
[eweb-spring-cloud] <<Spring Cloud组件>>
[eweb-spring-cloud-starters] <<Spring Cloud组件自动装配>>
[eweb-spring-test] <<Spring测试组件>>
[ewebsolutions] <<解决方案>>
[ewebcola] <<COLA架构>>
[ewebcola-extensions] <<COLA扩展点>>
[ewebcola-statemachine] <<COLA状态机>>
[ewebplugins] <<插件集合>>
[ewebtests] <<测试集合>>
[ewebdeployment-tests] <<部署测试集>>
[ewebintegration-tests] <<集成测试集>>
[ewebperformance-tests] <<性能测试集>>
[ewebsmoke-tests] <<冒烟测试集>>
skinparam component {
backgroundColor<<组件>> SkyBlue
......@@ -64,41 +64,41 @@ skinparam component {
backgroundColor<<冒烟测试集>> Khaki
}
[eden-component] --> [eden-architect]
[eden-dependencies] --> [eden-component]
[eden-parent] --> [eden-dependencies]
[eden-commons] --> [eden-parent]
[eden-extensions] --> [eden-commons]
[eden-spring-framework] --> [eden-commons]
[eden-spring-framework] --> [eden-extensions]
[eden-spring-boot] --> [eden-spring-framework]
[eden-spring-data] --> [eden-spring-framework]
[eden-spring-security] --> [eden-spring-framework]
[eden-spring-integration] --> [eden-spring-framework]
[eden-spring-cloud] -l-> [eden-spring-boot]
[eden-spring-cloud] -r-> [eden-spring-security]
[eden-spring-test] <-- [eden-spring-framework]
[eden-spring-test] <-- [eden-spring-data]
[eden-spring-test] <-- [eden-spring-integration]
[eden-spring-boot-starters] --> [eden-spring-boot]
[eden-spring-boot-starters] --> [eden-spring-data]
[eden-spring-boot-starters] --> [eden-spring-security]
[eden-spring-boot-starters] --> [eden-spring-integration]
[eden-spring-boot-test] <-- [eden-spring-boot]
[eden-spring-boot-test] <-- [eden-spring-cloud]
[eden-spring-cloud-starters] --> [eden-spring-cloud]
[eden-solutions] --> [eden-extensions]
[eden-solutions] --> [eden-spring-framework]
[eden-solutions] ..> [eden-spring-integration]
[eden-cola] --> [eden-commons]
[eden-cola] -u-> [eden-spring-framework]
[eden-cola-extensions] -u-> [eden-cola]
[eden-cola-statemachine] -r-> [eden-cola]
[eden-architect] <.u. [eden-plugins]
[eden-architect] <.u. [eden-tests]
[eden-tests] <-u- [eden-deployment-tests]
[eden-tests] <-u- [eden-integration-tests]
[eden-tests] <-u- [eden-performance-tests]
[eden-tests] <-u- [eden-smoke-tests]
[ewebcomponent] --> [ewebarchitect]
[ewebdependencies] --> [ewebcomponent]
[ewebparent] --> [ewebdependencies]
[ewebcommons] --> [ewebparent]
[ewebextensions] --> [ewebcommons]
[eweb-spring-framework] --> [ewebcommons]
[eweb-spring-framework] --> [ewebextensions]
[eweb-spring-boot] --> [eweb-spring-framework]
[eweb-spring-data] --> [eweb-spring-framework]
[eweb-spring-security] --> [eweb-spring-framework]
[eweb-spring-integration] --> [eweb-spring-framework]
[eweb-spring-cloud] -l-> [eweb-spring-boot]
[eweb-spring-cloud] -r-> [eweb-spring-security]
[eweb-spring-test] <-- [eweb-spring-framework]
[eweb-spring-test] <-- [eweb-spring-data]
[eweb-spring-test] <-- [eweb-spring-integration]
[eweb-spring-boot-starters] --> [eweb-spring-boot]
[eweb-spring-boot-starters] --> [eweb-spring-data]
[eweb-spring-boot-starters] --> [eweb-spring-security]
[eweb-spring-boot-starters] --> [eweb-spring-integration]
[eweb-spring-boot-test] <-- [eweb-spring-boot]
[eweb-spring-boot-test] <-- [eweb-spring-cloud]
[eweb-spring-cloud-starters] --> [eweb-spring-cloud]
[ewebsolutions] --> [ewebextensions]
[ewebsolutions] --> [eweb-spring-framework]
[ewebsolutions] ..> [eweb-spring-integration]
[ewebcola] --> [ewebcommons]
[ewebcola] -u-> [eweb-spring-framework]
[ewebcola-extensions] -u-> [ewebcola]
[ewebcola-statemachine] -r-> [ewebcola]
[ewebarchitect] <.u. [ewebplugins]
[ewebarchitect] <.u. [ewebtests]
[ewebtests] <-u- [ewebdeployment-tests]
[ewebtests] <-u- [ewebintegration-tests]
[ewebtests] <-u- [ewebperformance-tests]
[ewebtests] <-u- [ewebsmoke-tests]
@enduml
......@@ -58,7 +58,6 @@
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<optional>true</optional>
</dependency>
<!-- Google Guava -->
<dependency>
......
package cn.easycode.akina.commons.util;
public class Emptys {
private Emptys(){
}
public static final int[] EMPTY_INTS = {};
public static final byte[] EMPTY_BYTES = {};
public static final char[] EMPTY_CHARS = {};
public static final Object[] EMPTY_OBJECTS = {};
public static final Class<?>[] EMPTY_CLASSES = {};
public static final String[] EMPTY_STRINGS = {};
public static final String EMPTY_STRING="";
}
package cn.easycode.akina;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
package cn.easycode.akina;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.easycode.akina.common.sms.model;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
/**
* 短信模型
*
* @author
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@SuperBuilder
......
package cn.easycode.akina.common.sms.model.batch;
import lombok.*;
import java.io.Serializable;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 相同内容群发短信请求
*
* @author
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@Builder
......
......@@ -2,14 +2,18 @@
package cn.easycode.akina.common.sms.model.batch;
import lombok.*;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 相同内容群发短信响应
*
* @author
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@Builder
......
package cn.easycode.akina.common.sms.model.multi;
import com.google.common.collect.Lists;
import lombok.*;
import cn.easycode.akina.common.sms.model.Sms;
import com.google.common.collect.Lists;
import java.io.Serializable;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 个性化群发短信请求
*
* @author
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@Builder
......
package cn.easycode.akina.common.sms.model.multi;
import lombok.*;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 个性化群发短信响应
*
* @author
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@Builder
......
package cn.easycode.akina.common.sms.model.single;
import cn.easycode.akina.common.sms.model.Sms;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import cn.easycode.akina.common.sms.model.Sms;
import java.io.Serializable;
/**
* 发送单条短信请求
*
* @author
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@SuperBuilder
......
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.easycode.akina.common.sms.model.single;
import lombok.*;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 发送单条短信响应
*
* @author
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@Builder
......
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.easycode.akina.common.sms.model.template;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 发送模板短信请求
*
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@ToString
@Data
public class SendTemplateSmsRequest implements Serializable {
/**
* 短信签名
*/
private String signName;
/**
* 手机号码
*/
private List<String> phoneNumbers;
/**
* 短信模板编号
*/
private String templateCode;
/**
* 短信模板参数
*/
private Map<String, String> templateParam;
}
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.easycode.akina.common.sms.model.template;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 发送短信响应
*
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
* @since 2.4.13
*/
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@ToString
@Data
public class SendTemplateSmsResponse implements Serializable {
/**
* 处理成功
*/
private boolean success;
/**
* 错误码
*/
private String errCode;
/**
* 错误描述
*/
private String errMessage;
}
# Ignore everything in this directory
*
# Except this file !.gitkeep
# Ignore everything in this directory
*
# Except this file !.gitkeep
# Ignore everything in this directory
*
# Except this file !.gitkeep
# Ignore everything in this directory
*
# Except this file !.gitkeep
......@@ -3,7 +3,7 @@
<parent>
<artifactId>eweb-architect</artifactId>
<groupId>cn.easycode.akina</groupId>
<version>${reversion}</version>
<version>1.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -16,6 +16,19 @@
<module>eweb-dependencies</module>
<module>eweb-parent</module>
<module>eweb-commons</module>
<module>eweb-cola</module>
<module>eweb-extensions</module>
<module>eweb-solutions</module>
<module>eweb-spring-boot</module>
<module>eweb-spring-boot-starters</module>
<module>eweb-spring-boot-test</module>
<module>eweb-spring-cloud</module>
<module>eweb-spring-cloud-starters</module>
<module>eweb-spring-data</module>
<module>eweb-spring-framework</module>
<module>eweb-spring-integration</module>
<module>eweb-spring-security</module>
<module>eweb-spring-test</module>
</modules>
<properties>
......
package cn.easycode.akina;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
package cn.easycode.akina;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
package cn.easycode.akina;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
package cn.easycode.akina;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
#Organize Import Order
0=java
1=javax
2=org
3=com
4=
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
......@@ -4,7 +4,7 @@
<groupId>cn.easycode.akina</groupId>
<artifactId>eweb-architect</artifactId>
<version>${reversion}</version>
<version>1.0.1-SNAPSHOT</version>
<modules>
<module>eweb-components</module>
<module>eweb-tests</module>
......
此差异已折叠。
package org.example;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
package org.example;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
此差异已折叠。
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册