Skip to content

Commit

Permalink
Merge pull request #6 from ClearXs/1.1.x
Browse files Browse the repository at this point in the history
1.1.x
  • Loading branch information
ClearXs authored Feb 21, 2024
2 parents bed49b8 + cb7944c commit 7acf707
Show file tree
Hide file tree
Showing 768 changed files with 19,426 additions and 16,338 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

# 概述

uno('u:no,读wu no)提供基础的组件,来构建大型复杂应用的能力,截止于2023-07-06目前包含如下组件库:
uno('u:no,读wu no)提供基础的组件,来构建大型复杂应用的能力

- <a href="./core.html">core</a>:核心库,提供通用的工具、事件总线、简易的类型系统、元数据转换,通用链式接口声明、简易的Task、Cache机制。
- <a href="./data.html">data</a>:数据处理,包含通用查询模块、orm框架。
- <a href="rule.html">rule</a>:规则引擎。
- <a href="./web.html">web</a>:简易的web工具集,提供系统默认的HTTP请求端点。
- <a href="./test.html">test</a>:基于spring环境方便使用的测试工具集。
- <a href="./docs/core.md">core</a>:核心库,提供通用的工具、事件总线、简易的类型系统、元数据转换,通用链式接口声明、简易的Task、Cache机制。
- <a href="./docs/data.md">data</a>:数据处理,包含通用查询模块、orm框架。
- <a href="./docs/rule.md">rule</a>:规则引擎。
- <a href="./docs/web.md">web</a>:简易的web工具集,提供系统默认的HTTP请求端点。
- <a href="./docs/test.md">test</a>:基于spring环境方便使用的测试工具集。
- gis:构建mybatis的空间数据转换、jackson -> 标准geojson的转换、坐标系转换。
- auto:自动生成spi文件、还包括spring.factories。
- bom:项目包依赖集。
- plugins(未实现):通用的插件工具,包含微内核模式接口声明、jar包等第三方插件包加载与执行。
- components: 组件集合。
- <a href="./components/http.html">http</a>: 构建openapi工具,响应式的http请求响应框架。
- <a href="./docs/components/http.md">http</a>: 构建openapi工具,响应式的http请求响应框架。
- kafka:基于响应式背压封装的kafka。
- media:多媒体组件,基于命令模式提供通用api。
- netty:封装netty,构建无集群模式的RPC框架。
- sequential:时序数据的处理,包含数据接收、转换、处理,基于响应式,背压特性高性能的数据处理。
- websocket:封装websocket,具有数据批推,发布订阅模式,客户端可以使用Topic的路径树化。

- starter:为各个组件编写spring-starter包。
- <a href="./docs/starter.md">starter</a>:为各个组件编写spring-starter包。



50 changes: 2 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>cc.allio</groupId>
<artifactId>uno</artifactId>
<packaging>pom</packaging>
<version>1.1.5.RELEASE</version>
<version>1.1.6-beta.1</version>
<description>构建大型应用需要的基本能力 --- all in one</description>
<url>https://github.com/b6688c/uno</url>

Expand Down Expand Up @@ -36,7 +36,7 @@
<properties>
<java.version>21</java.version>
<reactor-bom>2020.0.12</reactor-bom>
<spring.boot.version>3.2.0</spring.boot.version>
<spring.boot.version>3.2.1</spring.boot.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-plugin.version>3.8.1</maven-plugin.version>
<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
Expand Down Expand Up @@ -200,50 +200,4 @@
</snapshotRepository>
</distributionManagement>

<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</project>
8 changes: 1 addition & 7 deletions uno-auto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
<parent>
<artifactId>uno</artifactId>
<groupId>cc.allio</groupId>
<version>1.1.5.RELEASE</version>
<version>1.1.6-beta.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>uno-auto</artifactId>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
Expand Down
16 changes: 0 additions & 16 deletions uno-auto/src/main/java/cc/allio/uno/auto/AbstractUnoProcessor.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright (c) 2018-2028, DreamLu All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: DreamLu 卢春梦 (596392912@qq.com)
*/
package cc.allio.uno.auto;

import javax.annotation.processing.AbstractProcessor;
Expand Down
16 changes: 0 additions & 16 deletions uno-auto/src/main/java/cc/allio/uno/auto/BootAutoType.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright (c) 2018-2028, DreamLu All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: DreamLu 卢春梦 (596392912@qq.com)
*/
package cc.allio.uno.auto;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright (c) 2018-2028, DreamLu All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: DreamLu 卢春梦 (596392912@qq.com)
*/
package cc.allio.uno.auto.factories;

import cc.allio.uno.auto.AbstractUnoProcessor;
Expand Down Expand Up @@ -47,15 +31,13 @@
@SupportedAnnotationTypes("*")
@SupportedOptions("debug")
public class AutoFactoriesProcessor extends AbstractUnoProcessor {
/**
* The location to look for factories.
* <p>Can be present in multiple JAR files.
*/
private static final String FACTORIES_RESOURCE_LOCATION = "META-INF/spring.factories";
/**
* devtools,有 Configuration 注解的 jar 一般需要 devtools 配置文件
*/
private static final String DEVTOOLS_RESOURCE_LOCATION = "META-INF/spring-devtools.properties";
// Auto Configuration location
private static final String AUTO_CONFIGURATION_LOCATION = "META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports";

/**
* 数据承载
*/
Expand Down Expand Up @@ -123,10 +105,10 @@ private void generateFactoriesFiles() {
}
Filer filer = processingEnv.getFiler();
try {
// 1. spring.factories
FileObject factoriesFile = filer.createResource(StandardLocation.CLASS_OUTPUT, "", FACTORIES_RESOURCE_LOCATION);
FactoriesFiles.writeFactoriesFile(factories, factoriesFile.openOutputStream());
String classesPath = factoriesFile.toUri().toString().split("classes")[0];
// 1. auto configuration file
FileObject autoConfigurationFile = filer.createResource(StandardLocation.CLASS_OUTPUT, "", AUTO_CONFIGURATION_LOCATION);
FactoriesFiles.writeFactoriesFile(factories, autoConfigurationFile.openOutputStream());
String classesPath = autoConfigurationFile.toUri().toString().split("classes")[0];
Path projectPath = Paths.get(new URI(classesPath)).getParent();
// 2. devtools 配置,因为有 @Configuration 注解的需要 devtools
String projectName = projectPath.getFileName().toString();
Expand Down
101 changes: 42 additions & 59 deletions uno-auto/src/main/java/cc/allio/uno/auto/factories/FactoriesFiles.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
/*
* Copyright (c) 2018-2028, DreamLu All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: DreamLu 卢春梦 (596392912@qq.com)
*/
package cc.allio.uno.auto.factories;


import cc.allio.uno.auto.model.MultiSetMap;

import java.io.BufferedWriter;
Expand All @@ -34,48 +17,48 @@
* @author L.cm
*/
class FactoriesFiles {
private static final Charset UTF_8 = StandardCharsets.UTF_8;
private static final Charset UTF_8 = StandardCharsets.UTF_8;

/**
* 写出 spring.factories 文件
* @param factories factories 信息
* @param output 输出流
* @throws IOException 异常信息
*/
static void writeFactoriesFile(MultiSetMap<String, String> factories,
OutputStream output) throws IOException {
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output, UTF_8));
Set<String> keySet = factories.keySet();
for (String key : keySet) {
Set<String> values = factories.get(key);
if (values == null || values.isEmpty()) {
continue;
}
writer.write(key);
writer.write("=\\\n ");
StringJoiner joiner = new StringJoiner(",\\\n ");
for (String value : values) {
joiner.add(value);
}
writer.write(joiner.toString());
writer.newLine();
}
writer.flush();
output.close();
}
/**
* 写出 spring.factories 文件
*
* @param factories factories 信息
* @param output 输出流
* @throws IOException 异常信息
*/
static void writeFactoriesFile(MultiSetMap<String, String> factories,
OutputStream output) throws IOException {
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output, UTF_8));
Set<String> keySet = factories.keySet();
for (String key : keySet) {
Set<String> values = factories.get(key);
if (values == null || values.isEmpty()) {
continue;
}
StringJoiner joiner = new StringJoiner("\n");
for (String value : values) {
joiner.add(value);
}
writer.write(joiner.toString());
writer.newLine();
}
writer.flush();
output.close();
}

/**
* 写出 spring-devtools.properties
* @param projectName 项目名
* @param output 输出流
* @throws IOException 异常信息
*/
static void writeDevToolsFile(String projectName,
OutputStream output) throws IOException {
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output, UTF_8));
String format = "restart.include.%s=/%s[\\\\w-]+\\.jar";
writer.write(String.format(format, projectName, projectName));
writer.flush();
output.close();
}
/**
* 写出 spring-devtools.properties
*
* @param projectName 项目名
* @param output 输出流
* @throws IOException 异常信息
*/
static void writeDevToolsFile(String projectName,
OutputStream output) throws IOException {
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output, UTF_8));
String format = "restart.include.%s=/%s[\\\\w-]+\\.jar";
writer.write(String.format(format, projectName, projectName));
writer.flush();
output.close();
}
}
16 changes: 0 additions & 16 deletions uno-auto/src/main/java/cc/allio/uno/auto/model/MultiSetMap.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright (c) 2018-2028, DreamLu All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: DreamLu 卢春梦 (596392912@qq.com)
*/
package cc.allio.uno.auto.model;

import java.util.*;
Expand Down
16 changes: 0 additions & 16 deletions uno-auto/src/main/java/cc/allio/uno/auto/model/Sets.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright (c) 2018-2028, DreamLu All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: DreamLu 卢春梦 (596392912@qq.com)
*/
package cc.allio.uno.auto.model;

import java.util.Objects;
Expand Down
16 changes: 0 additions & 16 deletions uno-auto/src/main/java/cc/allio/uno/auto/model/TypeHelper.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright (c) 2018-2028, DreamLu All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: DreamLu 卢春梦 (596392912@qq.com)
*/
package cc.allio.uno.auto.model;

import javax.annotation.processing.ProcessingEnvironment;
Expand Down
Loading

0 comments on commit 7acf707

Please sign in to comment.