stream-query开源合规

简介: stream-query开源合规


不好的书也像不好的朋友一样,可能把你戕害。——菲尔丁

首先是检查header的github action的ci

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.
name: License Check
on:
  push:
    branches:
      - main
    paths-ignore:
      - '**.md'
  pull_request:
    branches:
      - main
    paths-ignore:
      - '**.md'
jobs:
  license-header:
    if: github.repository == 'dromara/stream-query'
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true
      - name: Check license header
        uses: apache/skywalking-eyes/header@main

放在.github/workflows/license-check.yml

然后是license的

.licenserc.yaml

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
header:
  license:
    spdx-id: Apache-2.0
    copyright-owner: Apache Software Foundation
  paths-ignore:
    - 'dist'
    - 'licenses'
    - '**/*.md'
    - 'LICENSE'
    - 'NOTICE'
    - '**/*.json'
    - '**/*.iml'
    - '**/*.ini'
    - '**/*.svg'
    - '.gitattributes'
    - '**/.gitignore'
    - '**/.gitkeep'
    - 'docs/**'
    - 'mvnw.cmd'
    - '.mvn'
    - '**/known-dependencies.txt'
    - '**/LICENSE'
    - '**/NOTICE'
    - "DISCLAIMER"
    - '**/*.MD'
    - '**/*.ftl'
    - '**/*.tpl'
    - '**/*.pl'
    - '**/*.dict'
    - '**/*.awk'
    - '**/*.php'
    - "**/*.lock"
    - "**/*.svg"
    - '.prettierrc'
    - '.browserslistrc'
    - '.editorconfig'
    - '.helmignore'
    - '**/target/**'
    - '**/*.ini'
    - '**/*.crt'
    - '**/*.pem'
    - 'ssh_config'
    - 'workers'
  comment: on-failure
dependency:
  files:
    - pom.xml
  licenses:
    - name: ch.qos.logback:logback-classic
      license: EPL-1.0, LGPL-2.1
      url: http://logback.qos.ch/logback-classic
    - name: ch.qos.logback:logback-core
      license: EPL-1.0, LGPL-2.1
      url: http://logback.qos.ch/logback-core
    - name: com.alibaba:druid
      license: Apache-2.0
      url: https://github.com/alibaba/druid
    - name: com.alibaba:transmittable-thread-local
      license: Apache-2.0
      url: https://github.com/alibaba/transmittable-thread-local
    - name: com.atomikos:atomikos-util
      license: Atomikos
      url: http://www.atomikos.com/ate/atomikos-util/
    - name: com.atomikos:transactions
      license: Atomikos
      url: http://www.atomikos.com/ate/transactions/
    - name: com.atomikos:transactions-api
      license: Atomikos
      url: http://www.atomikos.com/ate/transactions-api/
    - name: com.atomikos:transactions-jdbc
      license: Atomikos
      url: http://www.atomikos.com/ate/transactions-jdbc/
    - name: com.atomikos:transactions-jta
      license: Atomikos
      url: http://www.atomikos.com/ate/transactions-jta/
    - name: com.baomidou:mybatis-plus
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.baomidou:mybatis-plus-annotation
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.baomidou:mybatis-plus-boot-starter
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.baomidou:mybatis-plus-boot-starter-test
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.baomidou:mybatis-plus-core
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.baomidou:mybatis-plus-extension
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.baomidou:mybatis-plus-spring-boot-autoconfigure
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.baomidou:mybatis-plus-spring-boot-test-autoconfigure
      license: Apache-2.0
      url: https://github.com/baomidou/mybatis-plus
    - name: com.fasterxml.jackson.core:jackson-annotations
      license: Apache-2.0
      url: http://github.com/FasterXML/jackson
    - name: com.fasterxml.jackson.core:jackson-core
      license: Apache-2.0
      url: https://github.com/FasterXML/jackson-core
    - name: com.fasterxml.jackson.core:jackson-databind
      license: Apache-2.0
      url: http://github.com/FasterXML/jackson
    - name: com.fasterxml.jackson.datatype:jackson-datatype-jdk8
      license: Apache-2.0
      url: https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jdk8
    - name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
      license: Apache-2.0
      url: https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310
    - name: com.fasterxml.jackson.module:jackson-module-parameter-names
      license: Apache-2.0
      url: https://github.com/FasterXML/jackson-modules-java8/jackson-module-parameter-names
    - name: com.github.chris2018998:beecp
      license: LGPL-2.1, Apache-2.0
      url: https://github.com/Chris2018998/BeeCP
    - name: com.github.jsqlparser:jsqlparser
      license: Apache-2.0
      url: https://github.com/JSQLParser/JSqlParser
    - name: com.google.protobuf:protobuf-java
      license: BSD-3-Clause
      url: https://developers.google.com/protocol-buffers/protobuf-java/
    - name: com.h2database:h2
      license: EPL-1.0, MPL-2.0
      url: https://h2database.com
    - name: com.jayway.jsonpath:json-path
      license: Apache-2.0
      url: https://github.com/jayway/JsonPath
    - name: com.mysql:mysql-connector-j
      license: GPL-2.0-with-FOSS-exception
      url: http://dev.mysql.com/doc/connector-j/en/
    - name: com.vaadin.external.google:android-json
      license: Apache-2.0
      url: http://developer.android.com/sdk
    - name: com.zaxxer:HikariCP
      license: Apache-2.0
      url: https://github.com/brettwooldridge/HikariCP
    - name: commons-logging:commons-logging
      license: Apache-2.0
      url: http://commons.apache.org/proper/commons-logging/
    - name: jakarta.activation:jakarta.activation-api
      license: EDL-1.0
      url: https://github.com/eclipse-ee4j/jaf/jakarta.activation-api
    - name: jakarta.annotation:jakarta.annotation-api
      license: EPL-2.0, GPL2-with-CPE
      url: https://projects.eclipse.org/projects/ee4j.ca
    - name: jakarta.transaction:jakarta.transaction-api
      license: EPL-2.0, GPL2-with-CPE
      url: https://projects.eclipse.org/projects/ee4j.jta
    - name: jakarta.xml.bind:jakarta.xml.bind-api
      license: EDL-1.0
      url: https://github.com/eclipse-ee4j/jaxb-api/jakarta.xml.bind-api
    - name: net.bytebuddy:byte-buddy
      license: Apache-2.0
      url: https://bytebuddy.net/byte-buddy
    - name: net.bytebuddy:byte-buddy-agent
      license: Apache-2.0
      url: https://bytebuddy.net/byte-buddy-agent
    - name: net.minidev:accessors-smart
      license: Apache-2.0
      url: https://urielch.github.io/
    - name: net.minidev:json-smart
      license: Apache-2.0
      url: https://urielch.github.io/
    - name: org.apache.commons:commons-dbcp2
      license: Apache-2.0
      url: https://commons.apache.org/dbcp/
    - name: org.apache.commons:commons-pool2
      license: Apache-2.0
      url: https://commons.apache.org/proper/commons-pool/
    - name: org.apache.logging.log4j:log4j-api
      license: Apache-2.0
      url: https://logging.apache.org/log4j/2.x/log4j-api/
    - name: org.apache.logging.log4j:log4j-to-slf4j
      license: Apache-2.0
      url: https://logging.apache.org/log4j/2.x/log4j-to-slf4j/
    - name: org.apiguardian:apiguardian-api
      license: Apache-2.0
      url: https://github.com/apiguardian-team/apiguardian
    - name: org.assertj:assertj-core
      license: MIT
      url: https://assertj.github.io/doc/assertj-core/
    - name: org.checkerframework:checker-qual
      license: MIT
      url: https://checkerframework.org/
    - name: org.hamcrest:hamcrest
      license: BSD-3-Clause
      url: http://hamcrest.org/JavaHamcrest/
    - name: org.junit.jupiter:junit-jupiter
      license: EPL-2.0
      url: https://junit.org/junit5/
    - name: org.junit.jupiter:junit-jupiter-api
      license: EPL-2.0
      url: https://junit.org/junit5/
    - name: org.junit.jupiter:junit-jupiter-engine
      license: EPL-2.0
      url: https://junit.org/junit5/
    - name: org.junit.jupiter:junit-jupiter-params
      license: EPL-2.0
      url: https://junit.org/junit5/
    - name: org.junit.platform:junit-platform-commons
      license: EPL-2.0
      url: https://junit.org/junit5/
    - name: org.junit.platform:junit-platform-engine
      license: EPL-2.0
      url: https://junit.org/junit5/
    - name: org.mockito:mockito-core
      license: MIT
      url: https://github.com/mockito/mockito
    - name: org.mockito:mockito-junit-jupiter
      license: MIT
      url: https://github.com/mockito/mockito
    - name: org.mybatis:mybatis
      license: Apache-2.0
      url: https://www.mybatis.org/mybatis-3
    - name: org.mybatis:mybatis-spring
      license: Apache-2.0
      url: http://www.mybatis.org/spring/
    - name: org.objenesis:objenesis
      license: Apache-2.0
      url: http://objenesis.org/objenesis
    - name: org.opentest4j:opentest4j
      license: MIT
      url: https://github.com/ota4j-team/opentest4j
    - name: org.ow2.asm:asm
      license: BSD-3-Clause
      url: http://asm.ow2.io/
    - name: org.postgresql:postgresql
      license: BSD-3-Clause
      url: https://jdbc.postgresql.org
    - name: org.projectlombok:lombok
      license: MIT
      url: https://projectlombok.org
    - name: org.skyscreamer:jsonassert
      license: Apache-2.0
      url: https://github.com/skyscreamer/JSONassert
    - name: org.slf4j:jul-to-slf4j
      license: MIT
      url: http://www.slf4j.org
    - name: org.slf4j:slf4j-api
      license: MIT
      url: http://www.slf4j.org
    - name: org.springframework:spring-aop
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-beans
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-context
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-core
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-expression
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-jcl
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-jdbc
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-test
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-tx
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework:spring-web
      license: Apache-2.0
      url: https://github.com/spring-projects/spring-framework
    - name: org.springframework.boot:spring-boot
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-autoconfigure
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-starter
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-starter-jdbc
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-starter-json
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-starter-logging
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-starter-test
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-test
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.springframework.boot:spring-boot-test-autoconfigure
      license: Apache-2.0
      url: https://spring.io/projects/spring-boot
    - name: org.xmlunit:xmlunit-core
      license: Apache-2.0
      url: https://www.xmlunit.org/
    - name: org.yaml:snakeyaml
      license: Apache-2.0
      url: https://bitbucket.org/snakeyaml/snakeyaml

然后是LICENSE.tpl

{{ .LicenseContent }}
=======================================================================
Dromara StreamQuery Subcomponents:
The Dromara StreamQuery project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for the these
subcomponents is subject to the terms and conditions of the following
licenses.
========================================================================
{{ range .Groups }}
========================================================================
{{ .LicenseID }} licenses
========================================================================
The following components are provided under the {{ .LicenseID }} License. See project link for details.
{{- if eq .LicenseID "Apache-2.0" }}
The text of each license is the standard Apache 2.0 license.
{{- else }}
The text of each license is also included in licenses/LICENSE-[project].txt.
{{ end }}
    {{- range .Deps }}
      {{- $groupArtifact := regexSplit ":" .Name -1 }}
      {{- if eq (len $groupArtifact) 2 }}
        {{- $group := index $groupArtifact 0 }}
        {{- $artifact := index $groupArtifact 1 }}
    https://mvnrepository.com/artifact/{{ $group }}/{{ $artifact }}/{{ .Version }} {{ .LicenseID }}
      {{- else }}
    https://npmjs.com/package/{{ .Name }}/v/{{ .Version }} {{ .Version }} {{ .LicenseID }}
      {{- end }}
    {{- end }}
{{ end }}

然后使用license-eye,我是用brew install license-eye

license-eye dependency resolve --summary ./LICENSE.tpl

然后还编写了一个脚本用于单独存放licenserc.sh

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
# 创建licenses目录
mkdir -p licenses
# 假设license-eye输出已重定向到此文件
license_eye_output="license-eye-output.txt"
# 处理license-eye输出
while IFS='|' read -r dependency license version; do
  # 清理读取的值
  dependency=$(echo "$dependency" | awk '{print $1}' | tr '.' '-' | tr ':' '-')
  license=$(echo "$license" | xargs)
  # 为每个依赖创建文件,这里简化处理,直接使用许可证信息
  echo "License: $license" > "licenses/license-$dependency.txt"
done < "$license_eye_output"
echo "License files have been generated in the licenses directory."

源码地址:stream-query: 允许完全摆脱Mapper的mybatis-plus体验!可以使用类似“工具类”这样的静态函数进行数据库操作

相关文章
|
Java 容器
如何在SpringBoot项目中使用过滤器和拦截器
过滤器和拦截器是日常开发中常用技术,用于对特定请求进行增强处理,如插入自定义代码以实现特定功能。过滤器在请求到达 `servlet` 前执行,而拦截器在请求到达 `servlet` 后执行。`SpringBoot` 中的拦截器依赖于 `SpringBoot` 容器,过滤器则由 `servlet` 提供。通过实现 `Filter` 接口并重写 `doFilter()` 方法可实现过滤器;通过实现 `HandlerInterceptor` 接口并重写相应方法可实现拦截器。两者的主要区别在于执行时机的不同,需根据具体场景选择使用。
1168 4
如何在SpringBoot项目中使用过滤器和拦截器
|
NoSQL 调度 数据中心
|
边缘计算 容灾 网络性能优化
算力流动的基石:边缘网络产品技术升级与实践探索
本文介绍了边缘网络产品技术的升级与实践探索,由阿里云专家分享。内容涵盖三大方面:1) 云编一体的混合组网方案,通过边缘节点实现广泛覆盖和高效连接;2) 基于边缘基础设施特点构建一网多态的边缘网络平台,提供多种业务形态的统一技术支持;3) 以软硬一体的边缘网关技术实现多类型业务网络平面统一,确保不同网络间的互联互通。边缘网络已实现全球覆盖、差异化连接及云边互联,支持即开即用和云网一体,满足各行业需求。
870 4
|
域名解析 人工智能 机器人
AppFlow:企业微信支持流式群聊机器人
企业微信近日更新,新增群聊机器人功能,支持与自定义大模型对话。通过@机器人,可实现流式输出,提升交互效率。只需简单配置,即可将AI能力集成至群聊,完成即时消息解析与业务联动。
3919 1
AppFlow:企业微信支持流式群聊机器人
此用户不允许自调用(isv.self-invoke-forbidden)-处理方案
说明   如果您在调用蚂蚁金服接口出现这个错误,说明您请求的appid(年份开头)属于第三方应用不允许自己appid请求蚂蚁金服接口   简单来说:如果您出现这个报错说明不可以自调用,只能走以下两个方案进行接口测试。
4832 12
|
机器学习/深度学习 人工智能 算法
模型即产品:万字详解RL驱动的AI Agent模型如何巨震AI行业范式
未来 AI 智能体的发展方向还得是模型本身,而不是工作流(Work Flow)。像 Manus 这样基于「预先编排好的提示词与工具路径」构成的工作流智能体,短期或许表现不错,但长期必然遇到瓶颈。这种「提示驱动」的方式无法扩展,也无法真正处理那些需要长期规划、多步骤推理的复杂任务。下一代真正的LLM智能体,则是通过「强化学习(RL)与推理(Reasoning)的结合」来实现的。
1024 10
模型即产品:万字详解RL驱动的AI Agent模型如何巨震AI行业范式
|
Java Maven 开发者
Maven的依赖作用域和依赖传递
Maven的依赖作用域和依赖传递
1525 0
Maven的依赖作用域和依赖传递
|
监控 Java 调度
若依修改定时任务,定时任务在系统监控的定时任务当中,宕机情况都不会去管,涉及到定时任务
若依修改定时任务,定时任务在系统监控的定时任务当中,宕机情况都不会去管,涉及到定时任务
|
供应链 监控 安全
业务上云的主要安全风险及网络安全防护建议
业务上云面临数据泄露、配置错误、IAM风险、DDoS攻击、合规与审计、供应链及内部威胁等安全挑战。建议采取全生命周期加密、自动化配置检查、动态权限管理、流量清洗、合规性评估、供应链可信验证及操作审批等措施,构建“预防-检测-响应”一体化安全体系,确保数据保护、权限收敛、合规审计和弹性防护,保障云端业务安全稳定运行。
2106 1
|
存储 监控 Java
OpenFeign请求拦截器组件RequestInterceptor原理与使用场景
该文章讲述了OpenFeign中的请求拦截器组件RequestInterceptor的原理及其常见使用场景。
OpenFeign请求拦截器组件RequestInterceptor原理与使用场景