full_name
stringlengths 7
70
| description
stringlengths 4
590
⌀ | created_at
stringlengths 20
20
| last_commit
float64 | readme
stringlengths 14
559k
⌀ | label
int64 0
1
|
---|---|---|---|---|---|
KOHGYLW/kiftd-source | kiftd: An open source sky driver or cloud driver server application! 欢迎访问kiftd源代码资源库!您可以在此获取kiftd源代码,并自由地进行下载和查看。该源代码仓库同时也是开发仓库,因此其版本可能比发行版靠前(但绝不会滞后)。 | 2018-07-30T02:14:38Z | null | ## 欢迎访问kiftd源代码资源库!
### Welcome to visit source of kiftd!
_当前版本:v1.2.0-RELEASE_
### 简介
_kiftd——一款便捷、开源、功能完善的个人&团队&小型团队网盘服务器系统。_
------
[![kiftd-mainpage.png](https://i.postimg.cc/gjyQRFVZ/kiftd-mainpage.png)](https://postimg.cc/dZ15PfSs)
------
kiftd能够帮助您快速搭建起一个面向家庭、团队或组织的网盘系统,它操作简单、高效且功能多样。这里是kiftd的源代码资源库,您可以在这里获得kiftd的源代码,并对其进行下载、阅读与重构。
注:如果您仅仅希望得到一份拿来即用的软件,kiftd也提供了一个完整的、解压即用的编译版。您可以根据其说明在3分钟内快速安装并开始使用。如果您需要该版本,请转到以下位置进行浏览和下载:
[kiftd-官方主页](https://kohgylw.github.io/)
### 构建说明
_下列条目为kiftd开发环境的基本信息,如需对源代码进行查看及编译,推荐使用所列配置。_
+ JDK版本:1.8.0
+ 项目管理框架:Maven(m2e 1.8.0 for Eclipse),Archetype:mavem-archetype-quickstart 1.1。
+ 编码格式:UTF-8
+ 项目资源及配置:Spring Boot+MyBatis+H2 DB,详见pom.xml文档。
### 快速开始
+ 使用Eclipse(javaEE)以项目方式导入本资源文件夹,并设置构建路径中的JDK版本。
+ 使用Maven选项更新项目,并确保pom文件中引入的所有外部资源能够正确引入至本地。
+ 打开kohgylw.kiftd.mc.MC类,进行测试运行。
+ 右键项目,执行Run with选项中的Maven install操作以在target文件夹内编译生成jar程序。
+ 将生成的jar程序拷贝到项目主目录下(即与libs等文件夹同级)并开始使用。
_提示:源代码路径下包含了一些程序运行所需的非源代码资源(例如程序图标等),某些集成式开发环境(例如IDEA)在编译过程中可能会自动忽略非源代码资源。您需要设置并保证这些资源也能够被正确打包至最终的jar程序内,否则将会导致编译出的程序无法顺利运行。_
### 程序基本结构说明
+ 源代码资源文件夹:/src/main/java/
+ 入口类:kohgylw.kiftd.mc.MC
+ web界面请求处理包:kohgylw.kiftd.server.controller、kohgylw.kiftd.server.filter
+ web界面操作逻辑包:kohgylw.kiftd.server.service
+ 核心功能及文件系统实现包:kohgylw.server.util、kohgylw.kiftd.server.listener、kohgylw.kiftd.server.mapper、kohgylw.kiftd.server.model
+ 服务器行为控制类:kohgylw.server.ctl.KiftdCtl
+ 服务器界面相关包:kohgylw.kiftd.ui、kohgylw.kiftd.printer
+ 独立文件管理模块相关包:kohgylw.kiftd.util.file_system_manager
+ 第三方工具使用许可证包:kohgylw.kiftd.util.licenses
+ web页面静态资源文件夹:/webContext/
+ mybatis映射表文件夹:/mybatisResource/
+ 外部引用资源(编译后生成)文件夹:/libs/
+ 引用字体文件夹:/fonts/
+ 设置文件(程序第一次运行后生成)文件夹:/conf/
+ 日志文件夹:/logs/
+ 编译输出文件夹:/target/
+ maven配置文件:/pom.xml
### 常见问题&解决方案
+ 使用IDEA导入项目后无法以图形界面方式运行
> 在默认情况下,IDEA可能会自动忽略位于项目源代码路径内的所有非源代码文件,从而导致图形界面需要的某些图标文件(例如png文件)无法被识别和打包。如遇此问题,请修改IDEA设置,确保项目源代码路径下的所有文件均会被识别和打包。
+ 启动源代码项目时出现“Error creating bean with name org.mybatis.spring.mapper.MapperScannerConfigurer”
> 如遇该问题,请尝试将pom.xml文件中引入的`mybatis`资源和`mybatis-spring`资源移除并重新添加`mybatis-spring-boot-starter`资源,从而避免默认整合方式可能导致的Spring Boot框架插件兼容性问题(特别鸣谢:用户 michael)。
### 使用许可(下载该源代码资源即视为接受以下许可)
当前版本的kiftd使用自带的许可文件进行分发。您应该先阅读该文件(获取方式:前往kiftd发行版主页下载一份kiftd发行版并在其中获得,详见 https://github.com/KOHGYLW/kiftd ),并在同意其中的所有条款后再下载该源代码。其大致内容如下:
+ 您可以免费获得该源代码的原版拷贝。
+ 您可以自由地对该源代码进行分发、重构并运用于任何领域。
+ 作者对于使用该源代码造成的任何后果均无需负责。
+ 作者对该源代码具有版权。
### 关于该源代码...
该源代码为目前发布的kiftd解压即用版的原始编译来源,二者保持一致性(有时源码版本可能会略微超前),作者将在今后对其逐步进行整理以便于用户阅读,由此带来的不便敬请谅解。
### 联系作者?
如有任何需要(例如对该资源有疑问、意见或建议),请发件联系作者: kohgylw@163.com (青阳龙野),随时恭候您的来信!
青阳龙野@kohgylw by 2024年05月11日
| 0 |
reneargento/algorithms-sedgewick-wayne | Solutions to all the exercises of the Algorithms book by Robert Sedgewick and Kevin Wayne | 2016-11-27T17:54:25Z | null | # Algorithms
Solutions to the exercises of the Algorithms book by Robert Sedgewick and Kevin Wayne (4th editon).
- [English](README.md)
- [简体中文](README.ch.md)
<a href="url"><img src="resources/book_cover.png" align="right" height="280" width="200" ></a>
I found the book to be an excellent resource to learning algorithms and data structures. Since there are not many (almost none) solutions of the exercises on the Internet and the only ones available are incomplete, I decided to share my work on the exercises. Hopefully this will help students and professionals to validate their exercise solutions and learn more about the book content.
To the best of my knowledge, these solutions are correct.</br>
If you find anything incorrect feel free to create an issue or to open a pull request.
Many of these exercises are used as homework assignments in universities. If you have to do any of these exercises as homework make sure you understand the problem and solution instead of simply copying it. Understanding these algorithms and data structures will be extremelly valuable in your career.
The exercises answered on this repository are based on the seventh printing of the book (of September 2015).
Other printings of the book (especially older ones) may have exercises in a slightly different order.
<b>Update (November 26 2018):</b></br>
It took me 2 and a half years of work, but the repository is now complete!</br>
You can now find here the solutions to all the exercises in the book.
| 0 |
apache/maven-mvnd | Apache Maven Daemon | 2019-09-21T17:49:30Z | null | null | 0 |
logicalclocks/hopsworks | Hopsworks - Data-Intensive AI platform with a Feature Store | 2018-07-26T08:13:34Z | null | <p align="center">
<a href="https://hopsworks.ai">
<img src="https://uploads-ssl.webflow.com/5f6353590bb01cacbcecfbac/6202a13e7cafec5553703f6b_logo.svg" width="55%" >
</a>
</p>
<br />
<p align="center">
<a href="https://hopsworks.ai" alt="hopsworks.ai">
<img src="https://img.shields.io/badge/hopsworks-ai-brightgreen" /></a>
<a href="https://app.hopsworks.ai" alt="app">
<img src="https://img.shields.io/badge/Hopsworks-app-green" /></a>
<a href="https://docs.hopsworks.ai" alt="docs.hopsworks.ai">
<img src="https://img.shields.io/badge/hopsworks-docs-orange" /></a>
<a href="https://community.hopsworks.ai" alt="community.hopsworks.ai">
<img src="https://img.shields.io/badge/hopsworks-community-blueviolet" /></a>
<a href="https://twitter.com/hopsworks" alt="Hopsworks Twitter">
<img src="https://img.shields.io/badge/hopsworks-twitter-blue" /></a>
<a href="https://bit.ly/publichopsworks" alt="Hopsworks Slack">
<img src="https://img.shields.io/static/v1?label=Hopsworks&message=Slack&color=36C5F0" /></a>
</p>
<a name="what"></a>
# What is Hopsworks?
Hopsworks is a data platform for ML with a **Python-centric Feature Store** and MLOps capabilities. Hopsworks is a modular platform. You can use it as a standalone Feature Store, you can use it to manage, govern, and serve your models, and you can even use it to develop and operate feature pipelines and training pipelines. Hopsworks brings collaboration for ML teams, providing a secure, governed platform for developing, managing, and sharing ML assets - features, models, training data, batch scoring data, logs, and more.
<br />
<p align="center" style="background-color:white; border-radius:4px;">
<img src="https://uploads-ssl.webflow.com/5f6353590bb01cacbcecfbac/62f21c38bc47b2d313fbf76d_Marchitecture%20-%20readme.svg" width="90%">
</p>
<br />
<a name="quick"></a>
# 🚀 Quickstart
## **APP - Serverless (beta)**
### → **Go to [app.hopsworks.ai](https://app.hopsworks.ai)**
Hopsworks is available as a serverless app, simply head to [app.hopsworks.ai](https://app.hopsworks.ai) and register with your **Gmail** or **Github** accounts. You will then be able to run a tutorial or access Hopsworks directly and try yourself. This is the prefered way to first experience the platform before diving into more advanced uses and installation requirements.
## **Azure, AWS & GCP**
[Managed Hopsworks](https://managed.hopsworks.ai) is our platform for running Hopsworks and the Feature Store in the cloud and integrates directly with the customer AWS/Azure/GCP environment. It also integrates seamlessly with third party platforms such as Databricks, SageMaker and KubeFlow.
If you wish to run Hopsworks on your Azure, AWS or GCP environement, follow one of the following guides in our documentation:
- [AWS Guide](https://docs.hopsworks.ai/3.0/setup_installation/aws/getting_started/#step-1-connecting-your-aws-account)
- [Azure Guide](https://docs.hopsworks.ai/3.0/setup_installation/azure/getting_started/#step-1-connecting-your-azure-account)
- [GCP Guide](https://docs.hopsworks.ai/3.0/setup_installation/gcp/getting_started/#step-1-connecting-your-gcp-account)
## **Installer - On-premise**
### → **Follow the [installation instructions](https://docs.hopsworks.ai/3.0/setup_installation/on_prem/hopsworks_installer/).**
The hopsworks-installer.sh script downloads, configures, and installs Hopsworks. It is typically run interactively, prompting the user about details of what is installed and where. It can also be run non-interactively (no user prompts) using the '-ni' switch.
### **Requirements**
You need at least one server or virtual machine on which Hopsworks will be installed with at least the following specification:
- Centos/RHEL 7.x or Ubuntu 18.04;
- at least 32GB RAM,
- at least 8 CPUs,
- 100 GB of free hard-disk space,
- outside Internet access (if this server is air-gapped, contact us for support),
- a UNIX user account with sudo privileges.
<br />
<a name="docs"></a>
# 🎓 Documentation and API
### **Documentation**
[Hopsworks documentation](https://docs.hopsworks.ai) includes user guides, feature store documentation and an administration guide. We also include concepts to help user navigates the abstractions and logics of the feature stores and MLOps in general:
- **Feature Store:** [https://docs.hopsworks.ai/3.0/concepts/fs/](https://docs.hopsworks.ai/3.0/concepts/fs/)
- **Projects:** [https://docs.hopsworks.ai/3.0/concepts/projects/governance/](https://docs.hopsworks.ai/3.0/concepts/projects/governance/)
- **MLOps:** [https://docs.hopsworks.ai/3.0/concepts/mlops/prediction_services/](https://docs.hopsworks.ai/3.0/concepts/mlops/prediction_services/)
### **APIs**
Hopsworks API documentation is divided in 3 categories; Hopsworks API covers project level APIs, Feature Store API covers covers feature groups, feature views and connectors, and finally MLOps API covers Model Registry, serving and deployment.
- **Hopsworks API** - [https://docs.hopsworks.ai/hopsworks-api/3.0.1/generated/api/connection/](https://docs.hopsworks.ai/hopsworks-api/3.0.1/generated/api/connection/)
- **Feature Store API** - [https://docs.hopsworks.ai/feature-store-api/3.0.0/generated/api/connection_api/](https://docs.hopsworks.ai/feature-store-api/3.0.0/generated/api/connection_api/)
- **MLOps API** - [https://docs.hopsworks.ai/machine-learning-api/3.0.0/generated/connection_api/](https://docs.hopsworks.ai/machine-learning-api/3.0.0/generated/connection_api/)
### **Tutorials**
Most of the tutorials require you to have at least an account on [app.hopsworks.ai](https://app.hopsworks.ai). You can explore the dedicated [https://github.com/logicalclocks/hopsworks-tutorials](https://github.com/logicalclocks/hopsworks-tutorials) repository containing our tutorials or jump directly in one of the existing use cases:
- Fraud (batch): [https://github.com/logicalclocks/hopsworks-tutorials/tree/master/fraud_batch](https://github.com/logicalclocks/hopsworks-tutorials/tree/master/fraud_batch)
- Fraud (online): [https://github.com/logicalclocks/hopsworks-tutorials/tree/master/fraud_online](https://github.com/logicalclocks/hopsworks-tutorials/tree/master/fraud_online)
- Churn prediction [https://github.com/logicalclocks/hopsworks-tutorials/tree/master/churn](https://github.com/logicalclocks/hopsworks-tutorials/tree/master/churn)
<br />
<a name="features"></a>
# 📦 Main Features
### **Project-based Multi-Tenancy and Team Collaboration**
Hopsworks provides projects as a secure sandbox in which teams can collaborate and share ML assets. Hopsworks' unique multi-tenant project model even enables sensitive data to be stored in a shared cluster, while still providing fine-grained sharing capabilities for ML assets across project boundaries. Projects can be used to structure teams so that they have end-to-end responsibility from raw data to managed features and models. Projects can also be used to create development, staging, and production environments for data teams. All ML assets support versioning, lineage, and provenance provide all Hopsworks users with a complete view of the MLOps life cycle, from feature engineering through model serving.
### **Development and Operations**
Hopsworks provides development tools for Data Science, including conda environments for Python, Jupyter notebooks, jobs, or even notebooks as jobs. You can build production pipelines with the bundled Airflow, and even run ML training pipelines with GPUs in notebooks on Airflow. You can train models on as many GPUs as are installed in a Hopsworks cluster and easily share them among users. You can also run Spark, Spark Streaming, or Flink programs on Hopsworks, with support for elastic workers in the cloud (add/remove workers dynamically).
### **Available on any Platform**
Hopsworks is available as a both managed platform in the cloud on AWS, Azure, and GCP, and can be installed on any Linux-based virtual machines (Ubuntu/Redhat compatible), even in air-gapped data centers. Hopsworks is also available as a serverless platform that manages and serves both your features and models.
<br />
<a name="community"></a>
# 🧑🤝🧑 Community
### **Contribute**
We are building the most complete and modular ML platform available in the market, and we count on your support to continuously improve Hopsworks. Feel free to give us suggestions, [report bugs](https://github.com/logicalclocks/hopsworks/issues) and [add features to our library](https://github.com/logicalclocks/feature-store-api) anytime.
### **Join the community**
- Ask questions and give us feedback in the [Hopsworks Community](https://community.hopsworks.ai/)
- Join our Public [Slack Channel](https://join.slack.com/t/public-hopsworks/shared_invite/zt-24fc3hhyq-VBEiN8UZlKsDrrLvtU4NaA)
- Follow us on [Twitter](https://twitter.com/hopsworks)
- Check out all our latest [product releases](https://github.com/logicalclocks/hopsworks/releases)
### **Open-Source**
Hopsworks is available under the **AGPL-V3 license**. In plain English this means that you are free to use Hopsworks and even build paid services on it, but if you modify the source code, you should also release back your changes and any systems built around it as AGPL-V3.
| 0 |
xmolecules/jmolecules | Libraries to help developers express architectural abstractions in Java code | 2020-02-03T13:08:24Z | null | null | 0 |
vigna/fastutil | fastutil extends the Java™ Collections Framework by providing type-specific maps, sets, lists and queues. | 2015-05-11T16:59:13Z | null | # Welcome to fastutil
[fastutil](http://fastutil.di.unimi.it/) extends the Java Collections
Framework by providing type-specific maps, sets, lists, and queues with a
small memory footprint and fast access and insertion; it provides also big
(64-bit) arrays, sets, and lists, sorting algorithms, fast, practical I/O
classes for binary and text files, and facilities for memory mapping large
files.
Since version 8.5.5, fastutil is split into two jars for convenience:
- `fastutil-core.jar` contains data structures based on integers, longs,
doubles, and objects;
- `fastutil.jar` is the classic distribution, containing all classes.
Note that core classes are duplicated in the standard jar, so if you are
depending on both (for example, because of transitive dependencies) you
should exclude the core jar.
Previous split versions would provide different classes in different jars,
but managing sensibly dependencies turned out to be impossible.
You can also create a small, customized fastutil jar (which you can put in
your repo, local maven repo, etc.) using the `find-deps.sh` shell script.
It has mild prerequisites, as only the `jdeps` tool is required (bundled
with JDK 8). It can be used to identify all fastutil classes your project
uses and build a minimized jar only containing the necessary classes.
## Building
First, you have to `make sources` to get the actual Java sources.
After that, `ant jar` will generate a single jar file; `ant javadoc` will
generate the API documentation; `ant junit` will run the unit tests.
If you want to obtain the three jars above, you have to run the script
`split.sh`, and then `ant osgi-rest`.
The Java sources are generated using a C preprocessor. The `gencsource.sh`
script reads in a driver file, that is, a Java source that uses some
preprocessor-defined symbols and some conditional compilation, and produces a
(fake) C source, which includes the driver code and some definitions that
customize the environment.
* seba (<mailto:sebastiano.vigna@unimi.it>)
* https://groups.google.com/g/fastutil
| 0 |
DerekYRC/mini-spring | mini-spring是简化版的spring框架,能帮助你快速熟悉spring源码和掌握spring的核心原理。抽取了spring的核心逻辑,代码极度简化,保留spring的核心功能,如IoC和AOP、资源加载器、事件监听器、类型转换、容器扩展点、bean生命周期和作用域、应用上下文等核心功能。 | 2020-11-17T11:59:18Z | null | # <img src="assets/spring-framework.png" width="80" height="80"> mini-spring
[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/DerekYRC/mini-spring)
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Stars](https://img.shields.io/github/stars/DerekYRC/mini-spring)](https://img.shields.io/github/stars/DerekYRC/mini-spring)
[![Forks](https://img.shields.io/github/forks/DerekYRC/mini-spring)](https://img.shields.io/github/forks/DerekYRC/mini-spring)
**[English](./README_en.md) | 简体中文**
**姊妹版:**[**mini-spring-cloud**](https://github.com/DerekYRC/mini-spring-cloud) **(简化版的spring cloud框架)**
## 关于
**mini-spring**是简化版的spring框架,能帮助你快速熟悉spring源码和掌握spring的核心原理。抽取了spring的核心逻辑,**代码极度简化,保留spring的核心功能**,如IoC和AOP、资源加载器、事件监听器、类型转换、容器扩展点、bean生命周期和作用域、应用上下文等核心功能。
如果本项目能帮助到你,请给个**STAR,谢谢!!!**
## 功能
#### 基础篇
* [IoC](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#基础篇IoC)
* [实现一个简单的容器](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#最简单的bean容器)
* [BeanDefinition和BeanDefinitionRegistry](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#BeanDefinition和BeanDefinitionRegistry)
* [Bean实例化策略InstantiationStrategy](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#Bean实例化策略InstantiationStrategy)
* [为bean填充属性](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#为bean填充属性)
* [为bean注入bean](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#为bean注入bean)
* [资源和资源加载器](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#资源和资源加载器)
* [在xml文件中定义bean](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#在xml文件中定义bean)
* [容器扩展机制BeanFactoryPostProcess和BeanPostProcessor](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#BeanFactoryPostProcess和BeanPostProcessor)
* [应用上下文ApplicationContext](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#应用上下文ApplicationContext)
* [bean的初始化和销毁方法](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#bean的初始化和销毁方法)
* [Aware接口](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#Aware接口)
* [bean作用域,增加prototype的支持](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#bean作用域增加prototype的支持)
* [FactoryBean](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#FactoryBean)
* [容器事件和事件监听器](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#容器事件和事件监听器)
* [AOP](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#基础篇AOP)
* [切点表达式](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#切点表达式)
* [基于JDK的动态代理](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#基于JDK的动态代理)
* [基于CGLIB的动态代理](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#基于CGLIB的动态代理)
* [AOP代理工厂ProxyFactory](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#AOP代理工厂)
* [几种常用的Advice: BeforeAdvice/AfterAdvice/AfterReturningAdvice/ThrowsAdvice](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#几种常用的AdviceBeforeAdviceAfterAdviceAfterReturningAdviceThrowsAdvice)
* [PointcutAdvisor:Pointcut和Advice的组合](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#pointcutadvisorpointcut和advice的组合)
* [动态代理融入bean生命周期](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#动态代理融入bean生命周期)
#### 扩展篇
* [PropertyPlaceholderConfigurer](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#propertyplaceholderconfigurer)
* [包扫描](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#包扫描)
* [@Value注解](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#value注解)
* [基于注解@Autowired的依赖注入](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#autowired注解)
* [类型转换(一)](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#类型转换一)
* [类型转换(二)](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#类型转换二)
#### 高级篇
* [解决循环依赖问题(一):没有代理对象](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#解决循环依赖问题一没有代理对象)
* [解决循环依赖问题(二):有代理对象](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#解决循环依赖问题二有代理对象)
#### 其他
* [没有为代理bean设置属性(discovered and fixed by kerwin89)](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#bug-fix没有为代理bean设置属性discovered-and-fixed-by-kerwin89)
* [支持懒加载和多切面增强(by zqczgl)](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md#支持懒加载和多切面增强by-zqczgl)
## 使用方法
阅读[changelog.md](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md)
[视频教程(完整版)](https://www.bilibili.com/video/BV1nb4y1A7YJ)
## 提问
[**点此提问**](https://github.com/DerekYRC/mini-spring/issues/4)
## 贡献
欢迎Pull Request
## 关于我
[**点此了解**](https://github.com/DerekYRC)
手机/微信:**15521077528** 邮箱:**15521077528@163.com**
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=DerekYRC/mini-spring&type=Date)](https://star-history.com/#DerekYRC/mini-spring&Date)
## 版权说明
未取得本人书面许可,不得将该项目用于商业用途
## 参考
- [《Spring源码深度解析》](https://book.douban.com/subject/25866350/)
- [《Spring 源码解析》](http://svip.iocoder.cn/categories/Spring)
- [《精通Spring 4.x》](https://book.douban.com/subject/26952826/)
- [《tiny-spring》](https://github.com/code4craft/tiny-spring)
| 0 |
spring-projects/spring-authorization-server | Spring Authorization Server | 2020-03-17T17:28:57Z | null | null | 0 |
remkop/picocli | Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc. | 2017-02-01T16:38:41Z | null | <p align="center"><img src="docs/images/logo/horizontal-400x150.png" alt="picocli" height="150px"></p>
[![GitHub Release](https://img.shields.io/github/release/remkop/picocli.svg)](https://github.com/remkop/picocli/releases)
[![Maven Central](https://img.shields.io/maven-central/v/info.picocli/picocli.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22info.picocli%22%20AND%20a:%22picocli%22)
[![GitHub Actions Build Status](https://github.com/remkop/picocli/actions/workflows/ci.yml/badge.svg)](https://github.com/remkop/picocli/actions/workflows/ci.yml)
[![Tests](https://gist.githubusercontent.com/remkop/36bc8a3b4395f2fbdb9bc271e97ba2dd/raw/badge.svg)](https://github.com/remkop/picocli/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/remkop/picocli/branch/master/graph/badge.svg)](https://codecov.io/gh/remkop/picocli)
[![Follow @remkopopma](https://img.shields.io/twitter/follow/remkopopma.svg?style=social)](https://twitter.com/intent/follow?screen_name=remkopopma)
[![Follow @picocli](https://img.shields.io/twitter/follow/picocli.svg?style=social)](https://twitter.com/intent/follow?screen_name=picocli)
[![Follow picocli on StackShare](https://img.shields.io/badge/Follow%20on-StackShare-blue.svg?logo=stackshare&style=flat)](https://stackshare.io/picocli)
# picocli - a mighty tiny command line interface
Picocli aims to be the easiest-to-use way to create rich command line applications that can run on and off the JVM.
Considering picocli? Check [what happy users say](https://github.com/remkop/picocli/wiki/Feedback-from-Users) about picocli.
Picocli is a modern library and framework, written in Java, that contains both an annotations API and a programmatic API. It features usage help with [ANSI colors and styles](https://picocli.info/#_ansi_colors_and_styles), [TAB autocompletion](https://picocli.info/autocomplete.html) and nested subcommands.
In a single file, so you can include it _in source form_.
This lets users run picocli-based applications without requiring picocli as an external dependency.
Picocli-based applications can be ahead-of-time compiled to a <img src="https://www.graalvm.org/resources/img/logo-colored.svg" alt="GraalVM">
[native image](https://picocli.info/#_graalvm_native_image), with extremely fast startup time and lower memory requirements,
which can be distributed as a single executable file.
Picocli comes with an [annotation processor](https://picocli.info/#_annotation_processor) that automatically Graal-enables your jar during compilation.
Picocli applications can be very compact with no boilerplate code: your command (or subcommand) can be executed with a [single line of code](#example "(example below)").
Simply implement `Runnable` or `Callable`, or put the business logic of your command in a `@Command`-annotated method.
<a id="picocli_demo"></a>
![Picocli Demo help message with ANSI colors](docs/images/picocli.Demo.png?raw=true)
Picocli makes it easy to follow [Command Line Interface Guidelines](https://clig.dev/#guidelines).
How it works: annotate your class and picocli initializes it from the command line arguments,
converting the input to strongly typed data. Supports git-like [subcommands](https://picocli.info/#_subcommands)
(and nested [sub-subcommands](https://picocli.info/#_nested_sub_subcommands)),
any option prefix style, POSIX-style [grouped short options](https://picocli.info/#_short_posix_options),
custom [type converters](https://picocli.info/#_custom_type_converters),
[password options](https://picocli.info/#_interactive_password_options) and more.
Picocli distinguishes between [named options](https://picocli.info/#_options) and
[positional parameters](https://picocli.info/#_positional_parameters) and allows _both_ to be
[strongly typed](https://picocli.info/#_strongly_typed_everything).
[Multi-valued fields](https://picocli.info/#_multiple_values) can specify
an exact number of parameters or a [range](https://picocli.info/#_arity) (e.g., `0..*`, `1..2`).
Supports [Map options](https://picocli.info/#_maps) like `-Dkey1=val1 -Dkey2=val2`, where both key and value can be strongly typed.
Parser [tracing](https://picocli.info/#_tracing) facilitates troubleshooting.
Command-line [argument files](https://picocli.info/#AtFiles) (@-files) allow applications to handle very long command lines.
Generates polished and easily tailored [usage help](https://picocli.info/#_usage_help)
and [version help](https://picocli.info/#_version_help),
using [ANSI colors](https://picocli.info/#_ansi_colors_and_styles) where possible.
Requires at minimum Java 5, but is designed to facilitate the use of Java 8 lambdas. Tested on all [Java versions between 5 and 18-ea](https://github.com/remkop/picocli/actions/workflows/ci.yml) (inclusive).
Picocli-based command line applications can have [TAB autocompletion](https://picocli.info/autocomplete.html),
interactively showing users what options and subcommands are available.
When an option has [`completionCandidates`](https://picocli.info/#_completion_candidates_variable) or has an `enum` type, autocompletion can also suggest option values.
Picocli can generate completion scripts for bash and zsh, and offers [`picocli-shell-jline2`](picocli-shell-jline2/README.md) and [`picocli-shell-jline3`](picocli-shell-jline3/README.md) modules with JLine `Completer` implementations for building interactive shell applications.
Unique features in picocli include support for [negatable options](https://picocli.info/#_negatable_options),
advanced [quoted values](https://picocli.info/#_quoted_values),
and [argument groups](https://picocli.info/#_argument_groups).
Argument groups can be used to create mutually [exclusive](https://picocli.info/#_mutually_exclusive_options) options,
mutually [dependent](https://picocli.info/#_mutually_dependent_options) options,
option [sections](https://picocli.info/#_option_sections_in_usage_help) in the usage help message
and [repeating composite arguments](https://picocli.info/#_repeating_composite_argument_groups) like
`([-a=<a> -b=<b> -c=<c>] (-x | -y | -z))...`.
For advanced use cases, applications can access the picocli command object model with the
[`@Spec` annotation](https://picocli.info/#spec-annotation), and
implement [custom parameter processing](https://picocli.info/#_custom_parameter_processing) for option parameters if the built-in logic is insufficient.
Picocli-based applications can easily [integrate](https://picocli.info/#_dependency_injection) with Dependency Injection containers.
The [Micronaut](https://micronaut.io/) microservices framework has [built-in support](https://docs.micronaut.io/latest/guide/index.html#commandLineApps) for picocli.
[Quarkus](https://quarkus.io/) has a [Command Mode with Picocli](https://quarkus.io/guides/picocli) extension for facilitating the creation of picocli-based CLI applications with Quarkus.
Picocli ships with a [`picocli-spring-boot-starter` module](https://github.com/remkop/picocli/tree/main/picocli-spring-boot-starter)
that includes a `PicocliSpringFactory` and Spring Boot auto-configuration to use Spring dependency injection in your picocli command line application.
The user manual has examples of integrating with [Guice](https://picocli.info/#_guice_example), [Spring Boot](https://picocli.info/#_spring_boot_example), [Micronaut](https://picocli.info/#_micronaut_example), [Quarkus](https://picocli.info/#_quarkus_example) and with containers that comply to [CDI 2.0 specification](https://picocli.info/#_cdi_2_0_jsr_365) (JSR 365).
### Releases
* [All Releases](https://github.com/remkop/picocli/releases)
* Latest: 4.7.6 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.7.6)
* Older: Picocli 4.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.0.0)
* Older: Picocli 3.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v3.0.0)
* Older: Picocli 2.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v2.0.0)
### Documentation
* [4.x User manual: https://picocli.info](https://picocli.info)
* [4.x Quick Guide](https://picocli.info/quick-guide.html)
* [4.x API Javadoc](https://picocli.info/apidocs/)
* [PREVIEW: Modular Javadoc for all artifacts (4.7.6-SNAPSHOT)](https://picocli.info/apidocs-all/)
* [Command line autocompletion](https://picocli.info/autocomplete.html)
* [Programmatic API](https://picocli.info/picocli-programmatic-api.html)
* [FAQ](https://github.com/remkop/picocli/wiki/FAQ)
* [GraalVM AOT Compilation to Native Image](https://picocli.info/picocli-on-graalvm.html) <img src="https://www.graalvm.org/resources/img/logo-colored.svg" >
### Older
* ~~[3.x User manual](https://picocli.info/man/3.x)~~
* ~~[3.x Quick Guide](https://picocli.info/man/3.x/quick-guide.html)~~
* ~~[3.x API Javadoc](https://picocli.info/man/3.x/apidocs/)~~
* ~~[2.x User manual](https://picocli.info/man/2.x)~~
* ~~[2.x API Javadoc](https://picocli.info/man/2.x/apidocs/)~~
* ~~[1.x User manual](https://picocli.info/man/1.x)~~
### Articles & Presentations
#### English
* [6 things you can do with JBang but you can’t with Shell](http://www.mastertheboss.com/java/jbang-vs-jshell/) (2022-02-28) by [F.Marchioni](http://www.mastertheboss.com/author/admin/).
* [VIDEO][Kotlin, CLIs and StarWars! - An introduction to creating CLI applications with Kotlin using Picocli](https://fosdem.org/2022/schedule/event/kotlin_clis_and_starwars/?utm_medium=social&utm_source=twitter&utm_campaign=postfity&utm_content=postfity77511) (2022-02-05) by [Julien Lengrand-Lambert](https://fosdem.org/2022/schedule/speaker/julien_lengrand_lambert/).
* [VIDEO][Autocomplete Java CLI using Picocli](https://www.youtube.com/watch?v=tCrQqgOYszQ) (2022-01-24) by [raksrahul](https://www.youtube.com/channel/UCpYkDrjOq3xtt0Uyg9tEqvw).
* [Picocli – Easiness for CLI arguments in Java](https://blog.adamgamboa.dev/picocli-easiness-for-cli-arguments-in-java/) (2021-10-27) by [agamboa](https://blog.adamgamboa.dev/author/agamboa/).
* [Building Command Line Interfaces with Kotlin using picoCLI](https://foojay.io/today/building-command-line-interfaces-with-kotlin-using-picocli/) (2021-09-23) by [Julien Lengrand-Lambert](https://foojay.io/today/author/jlengrand/).
* [VIDEO][Create Java CLI applications with picocli](https://www.youtube.com/watch?v=PaxBXABJIzY) (2021-09-14) by [coder4life](https://www.youtube.com/channel/UCt9lHt5bMpafypEDwj6J2WQ).
* [PICOCLI](https://www.linkedin.com/pulse/picocli-sybren-boland/) (2021-06-30) by [Sybren Boland](https://www.linkedin.com/in/sybrenboland/).
* [Picocli | Create your first Kotlin /JVM CLI application with GraalVM](https://manserpatrice.medium.com/picocli-create-your-first-kotlin-jvm-cli-application-with-graalvm-a7fea4da7e2) (2021-02-13) by [manserpatrice](https://manserpatrice.medium.com/).
* [VIDEO] [Building kubectl plugins with Quarkus, picocli, fabric8io and jbang](https://www.youtube.com/watch?v=ZL29qrpk_Kc) (2021-01-22) by [Sébastien Blanc](https://twitter.com/sebi2706).
* [VIDEO] [J-Fall Virtual 2020: Julien Lengrand - An introduction to creating CLI applications using picoCLI](https://www.youtube.com/watch?v=Rc_D4OTKidU&list=PLpQuPreMkT6D36w9d13uGpIPi5nf9I_0c&index=13) (2020-12-07) by [Julien Lengrand-Lambert](https://twitter.com/jlengrand). This was the top rated talk for [@nljug](https://twitter.com/nljug) #jfall virtual 2020! Congrats, Julien!
* [Paginate results in a command line application using picoCLI](https://lengrand.fr/paginate-results-in-a-jvm-cli-application-using-picocli/) (2020-11-17) by [Julien Lengrand-Lambert](https://twitter.com/jlengrand).
* [CLI applications with GraalVM Native Image](https://medium.com/graalvm/cli-applications-with-graalvm-native-image-d629a40aa0be) (2020-11-13) by [Oleg Šelajev](https://twitter.com/shelajev).
* [Picocli subcommands - One program, many purposes](https://aragost.com/blog/java/picocli-subcommands.html) (2020-09-22) by [Jonas Andersen](https://twitter.com/PrimusAlgo).
* [Native CLI with Picocli and GraalVM](https://dev.to/jbebar/native-cli-with-picocli-and-graalvm-566m) (2020-08-20) by [jbebar](https://dev.to/jbebar).
* [How to build a CLI app in Java using jbang and picocli](https://www.twilio.com/blog/cli-app-java-jbang-picocli) (2020-08-13) by [Matthew Gilliard](https://twitter.com/MaximumGilliard).
* [Building a GitHub Dependents Scraper with Quarkus and Picocli](https://blog.marcnuri.com/github-dependents-scraper-quarkus-picocli/) (2020-07-31) by [Marc Nuri](https://twitter.com/MarcNuri).
* [Building a decent Java CLI](https://atextor.de/2020/07/27/building-a-decent-java-cli.html) (2020-07-27) by [Andreas Textor](https://twitter.com/atextor).
* [VIDEO] (Another very well-produced video by Szymon Stepniak) [Implementing OAuth 2.0 in a Java command-line app using Micronaut, Picocli, and GraalVM](https://www.youtube.com/watch?v=js5H9UbmmMY) (2020-07-23) by [Szymon Stepniak](https://e.printstacktrace.blog/) ([YouTube channel](https://www.youtube.com/channel/UCEf8e5YAYnowq-2deW4tpsw)).
* [Micronaut, Picocli, and GraalVM](https://e.printstacktrace.blog/building-stackoverflow-cli-with-java-11-micronaut-picocli-and-graalvm/) (2020-07-08) by [Szymon Stepniak](https://e.printstacktrace.blog/).
* [VIDEO] (Extremely well-produced and informative, recommended!) [Building command-line app with Java 11, Micronaut, Picocli, and GraalVM](https://www.youtube.com/watch?v=Xdcg4Drg1hc) (2020-07-01) by [Szymon Stepniak](https://e.printstacktrace.blog/) ([YouTube channel](https://www.youtube.com/channel/UCEf8e5YAYnowq-2deW4tpsw)).
* [AUDIO] [Scala Valentines #2](https://scala.love/scala-valentines-2/) (2020-06-21) Podcast talks about picocli (from 18:11).
* [How to create a command line tool using Java?](https://fullstackdeveloper.guru/2020/06/18/how-to-create-a-command-line-tool-using-java/) (2020-06-18) by [Vijay SRJ](https://twitter.com/FullStackDevel6).
* [Command-line tools with Quarkus and Picocli](https://quarkify.net/command-line-tools-with-quarkus-and-picocli/) (2020-06-08) by [Dmytro Chaban](https://twitter.com/dmi3coder).
* Quarkus guide for [Quarkus command mode with picocli](https://quarkus.io/guides/picocli), thanks to a picocli extension by [Michał Górniewski](https://github.com/mgorniew) included in [Quarkus 1.5](https://quarkus.io/blog/quarkus-1-5-final-released/) (2020-06-03).
* [Native images with Micronaut and GraalVM](https://dev.to/stack-labs/native-images-with-micronaut-and-graalvm-4koe) (2020-06-01) by [Λ\: Olivier Revial](https://twitter.com/pommeDouze).
* [CLI applications with Micronaut and Picocli](https://dev.to/stack-labs/cli-applications-with-micronaut-and-picocli-4mc8) (2020-06-01) by [Λ\: Olivier Revial](https://twitter.com/pommeDouze).
* [Picocli introduction - Modern Java command-line parsing](https://aragost.com/blog/java/picocli-introduction.html) (2020-05-19) by [Jonas Andersen](https://twitter.com/PrimusAlgo).
* [Building Native Covid19 Tracker CLI using Java, PicoCLI & GraalVM](https://aboullaite.me/java-covid19-cli-picocli-graalvm/) (2020-05-11) by [Mohammed Aboullaite](https://aboullaite.me/author/mohammed/).
* [Quarkus Command mode with Picocli](https://quarkify.net/quarkus-command-mode-with-picocli/) (2020-04-27) by [Dmytro Chaban](https://twitter.com/dmi3coder).
* [Creating CLI tools with Scala, Picocli and GraalVM](https://medium.com/@takezoe/creating-cli-tools-with-scala-picocli-and-graalvm-ffde05bbd01d) (2020-03-09) by [Naoki Takezoe](https://twitter.com/takezoen)
* [Building native Java CLIs with GraalVM, Picocli, and Gradle](https://medium.com/@mitch.seymour/building-native-java-clis-with-graalvm-picocli-and-gradle-2e8a8388d70d) (2020-03-08) by [Mitch Seymour](https://medium.com/@mitch.seymour)
* [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/) (2020-03-07)
* [Picocli Structured Objects](https://gist.github.com/hanslovsky/8276da86c53bc6d95bf01447cd5cb2b7#file-00_picocli-structured-objects-md) (2019-09-10) by [Philipp Hanslovsky](https://gist.github.com/hanslovsky) explains how to use picocli's support for repeating argument groups to add or configure structured objects from the command line.
* [Create a Java Command Line Program with Picocli|Baeldung](https://www.baeldung.com/java-picocli-create-command-line-program) (2019-05-07) by [François Dupire](https://www.baeldung.com/author/francois-dupire/).
* A whirlwind tour of picocli [JAX Magazine "Putting the spotlight on Java tools"](https://jaxenter.com/jax-mag-java-tools-157592.html) (2019-04-08).
* [An Introduction to PicoCLI](https://devops.datenkollektiv.de/an-introduction-to-picocli.html) (2019-02-10) by [devop](https://devops.datenkollektiv.de/author/devop.html).
* [Corda CLI UX (User Experience) Guide](https://docs.corda.net/head/cli-ux-guidelines.html) (2018 by R3 Limited) gives useful advice.
* [Develop a CLI tool using groovy scripts](https://medium.com/@chinthakadinadasa/develop-a-cli-tool-using-groovy-scripts-a7d545eecddd) (2018-10-26) by [Chinthaka Dinadasa](https://medium.com/@chinthakadinadasa).
* [Migrating from Commons CLI to picocli](https://picocli.info/migrating-from-commons-cli.html). You won't regret it! :-) (also on: [DZone](https://dzone.com/articles/migrating-from-commons-cli-to-picocli) and [Java Code Geeks](https://www.javacodegeeks.com/2018/11/migrating-commons-cli-picocli.html)).
* [Groovy 2.5 CliBuilder Renewal](https://picocli.info/groovy-2.5-clibuilder-renewal.html) (also on [blogs.apache.org](https://blogs.apache.org/logging/entry/groovy-2-5-clibuilder-renewal)). In two parts: [Part 1](https://picocli.info/groovy-2.5-clibuilder-renewal-part1.html) (also on: [DZone](https://dzone.com/articles/groovy-25-clibuilder-renewal), [Java Code Geeks](https://www.javacodegeeks.com/2018/06/groovy-clibuilder-renewal-part-1.html)), [Part 2](https://picocli.info/groovy-2.5-clibuilder-renewal-part2.html) (also on: [DZone](https://dzone.com/articles/groovy-25-clibuilder-renewal-part-2), [Java Code Geeks](https://www.javacodegeeks.com/2018/06/groovy-clibuilder-renewal-part-2.html)).
* Micronaut user manual for running microservices [standalone with picocli](https://docs.micronaut.io/snapshot/guide/index.html#commandLineApps).
* [Java Command-Line Interfaces (Part 30): Observations](https://marxsoftware.blogspot.jp/2017/11/java-cmd-line-observations.html) by Dustin Marx about picocli 2.0.1 (also on: [DZone](https://dzone.com/articles/java-command-line-interfaces-part-30-finale-observations), [Java Code Geeks](https://www.javacodegeeks.com/2017/11/java-command-line-interfaces-part-30-observations.html))
* [Java Command-Line Interfaces (Part 10): Picocli](https://marxsoftware.blogspot.jp/2017/08/picocli.html) by Dustin Marx about picocli 0.9.7 (also on: [DZone](https://dzone.com/articles/java-command-line-interfaces-part-10-picocli), [Java Code Geeks](https://www.javacodegeeks.com/2017/08/java-command-line-interfaces-part-10-picocli.html))
* [Picocli 2.0: Groovy Scripts on Steroids](https://picocli.info/picocli-2.0-groovy-scripts-on-steroids.html) (also on: [DZone](https://dzone.com/articles/picocli-v2-groovy-scripts-on-steroids), [Java Code Geeks](https://www.javacodegeeks.com/2018/01/picocli-2-0-groovy-scripts-steroids.html))
* [Picocli 2.0: Do More With Less](https://picocli.info/picocli-2.0-do-more-with-less.html) (also on: [DZone](https://dzone.com/articles/whats-new-in-picocli-20), [Java Code Geeks](https://www.javacodegeeks.com/2018/01/picocli-2-0-less.html))
* [Announcing picocli 1.0](https://picocli.info/announcing-picocli-1.0.html) (also on: [DZone](https://dzone.com/articles/announcing-picocli-10))
#### русский
* [Выбор необходимых опций Picocli на основе основного варианта](https://coderoad.ru/61665865/%D0%92%D1%8B%D0%B1%D0%BE%D1%80-%D0%BD%D0%B5%D0%BE%D0%B1%D1%85%D0%BE%D0%B4%D0%B8%D0%BC%D1%8B%D1%85-%D0%BE%D0%BF%D1%86%D0%B8%D0%B9-Picocli-%D0%BD%D0%B0-%D0%BE%D1%81%D0%BD%D0%BE%D0%B2%D0%B5-%D0%BE%D1%81%D0%BD%D0%BE%D0%B2%D0%BD%D0%BE%D0%B3%D0%BE-%D0%B2%D0%B0%D1%80%D0%B8%D0%B0%D0%BD%D1%82%D0%B0) (2020-05-07)
* [Интерфейсы командной строки Java: picocli](https://habr.com/ru/company/otus/blog/419401/) (2018-08-06): Russian translation by [MaxRokatansky](https://habr.com/ru/users/MaxRokatansky/) of Dustin Marx' blog post.
#### Español
* [picocli, un poderoso framework para la creación de aplicaciones de línea de comandos](https://laboratoriolinux.es/index.php/-noticias-mundo-linux-/software/34261-picocli-un-poderoso-framework-para-la-creacion-de-aplicaciones-de-linea-de-comandos.html) (2023-09-09) by [Darkcrizt](https://ubunlog.com/author/darkcrizt/)
* [picocli, un poderoso framework para la creación de aplicaciones de línea de comandos](https://ubunlog.com/picocli-un-poderoso-framework-para-la-creacion-de-aplicaciones-de-linea-de-comandos/) (2023-09-09) by [Darkcrizt](https://ubunlog.com/author/darkcrizt/)
* [Quarkus + Picocli: Web scaper para extraer proyectos dependientes en GitHub](https://blog.marcnuri.com/quarkus-picocli-web-scaper-dependientes-github/) (2020-08-15) by [Marc Nuri](https://twitter.com/MarcNuri).
* [Quarkus - Introducción: picocli](https://gerardo.dev/aws-quarkus-picocli.html) (2020-06-15) by [Gerardo Arroyo](https://twitter.com/codewarrior506).
* [VIDEO] [Picocli - Spring Boot example](https://youtu.be/y9ayfjfrTF4) (2020-05-24) 7-minute quick introduction by Gonzalo H. Mendoza.
#### Français
* [Application mobile: Créez de superbes applications CLI natives en Java avec Graalvm et Picocli](https://seodigitalmarketing.net/application-mobile-creez-de-superbes-applications-cli-natives-en-java-avec-graalvm-et-picocli/) (2020-05-07) Translation of [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/) by [bouf1450](https://seodigitalmarketing.net/author/bouf1450/).
* [VIDEO] [Des applications en ligne de commande avec Picocli et GraalVM (N. Peters)](https://www.youtube.com/watch?v=8ENbMwkaFyk) (2019-05-07): 15-minute presentation by Nicolas Peters during Devoxx FR. Presentation slides are [available on GitHub](https://t.co/tXhtpTpAff?amp=1).
#### Português
* [Desenvolva aplicações CLI nativas em Java com Graalvm e Picocli](https://www.infoq.com/br/articles/java-native-cli-graalvm-picocli/) (2020-08-28): Portuguese translation of [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/), thanks to [Rodrigo Ap G Batista](https://www.infoq.com/br/profile/Rodrigo-Ap-G-Batista/).
* [VIDEO] [Quarkus #40: Command Mode com Picocli](https://www.youtube.com/watch?v=LweGDh-Jxlc) (2020-06-23): 13-minute presentation by [Vinícius Ferraz](https://www.youtube.com/channel/UCJNOHl-pTTTj4S9yq60Ps9A) (@viniciusfcf).
#### 日本語
* [CLI applications with GraalVM Native Image](https://logico-jp.io/2020/11/21/cli-applications-with-graalvm-native-image/) (2020-11-21) translation by [Logico_jp](https://logico-jp.io/who-is-logico/) of Oleg Šelajev's [post](https://medium.com/graalvm/cli-applications-with-graalvm-native-image-d629a40aa0be).
* [Picocli + Kotlin + graalvm-native-image plugin でネイティブツールを作る](https://mike-neck.hatenadiary.com/entry/2020/04/24/090000) (2020-04-24) blog post by [mike-neck](https://mike-neck.hatenadiary.com/about) ([引きこもり持田](https://twitter.com/mike_neck) on Twitter).
* [pythonのArgumentParserような使い心地!picocliのご紹介](https://lab.astamuse.co.jp/entry/2020/04/15/115000) (2020-04-15) by [@astamuseLab](https://lab.astamuse.co.jp/)
* [Javaのコマンドラインアプリケーション向けのフレームワーク、picocliで遊ぶ](https://kazuhira-r.hatenablog.com/entry/2020/03/07/013626) (2020-03-07) blog post by [かずひら](https://twitter.com/kazuhira_r).
* [KuromojiのCLIコマンドとpicocliとGraalVM](https://blog.johtani.info/blog/2020/02/28/kuromoji-cli/) (2020-02-28) blog post by [@johtani](https://twitter.com/johtani).
* [GraalVM, PicocliとJavaでときめくネイティブコマンドラインアプリを作ろう](https://remkop.github.io/presentations/20191123/) (2019-11-23) Slides for my presentation at Japan Java User Group's [JJUG CCC 2019 Fall](https://ccc2019fall.java-users.jp/) conference.
* [Picocliを使用してJavaコマンドラインプログラムを作成する - 開発者ドキュメント](https://ja.getdocs.org/java-picocli-create-command-line-program/) (2019-10-18)
* [GraalVM と Picocliで Javaのネイティブコマンドラインアプリを作ろう](https://remkop.github.io/presentations/20190906/) (2019-09-06) Slides for my lightning talk presentation at [【東京】JJUG ナイトセミナー: ビール片手にLT大会 9/6(金)](https://jjug.doorkeeper.jp/events/95987)
* [Picocli+Spring Boot でコマンドラインアプリケーションを作成してみる](https://ksby.hatenablog.com/entry/2019/07/20/092721) (2019-07-20) by [かんがるーさんの日記](https://ksby.hatenablog.com/).
* [GraalVM の native image を使って Java で爆速 Lambda の夢を見る](https://qiita.com/kencharos/items/69e43965515f368bc4a3) (2019-05-02) by [@kencharos](https://qiita.com/kencharos)
#### 中文
* [Java命令行界面(第10部分):picocli](https://blog.csdn.net/dnc8371/article/details/106702365) (2020-06-07) translation by [dnc8371](https://blog.csdn.net/dnc8371).
* [如何借助 Graalvm 和 Picocli 构建 Java 编写的原生 CLI 应用](https://www.infoq.cn/article/4RRJuxPRE80h7YsHZJtX) (2020-03-26): Chinese translation of [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/), thanks to [张卫滨](https://www.infoq.cn/profile/1067660).
* [从Commons CLI迁移到Picocli](https://blog.csdn.net/genghaihua/article/details/88529409) (2019-03-13): Chinese translation of Migrating from Commons CLI to picocli, thanks to [genghaihua](https://me.csdn.net/genghaihua).
* [Picocli 2.0: Steroids上的Groovy脚本](https://picocli.info/zh/picocli-2.0-groovy-scripts-on-steroids.html)
* [Picocli 2.0: 以少求多](https://picocli.info/zh/picocli-2.0-do-more-with-less.html)
### Mailing List
Join the [picocli Google group](https://groups.google.com/d/forum/picocli) if you are interested in discussing anything picocli-related and receiving announcements on new releases.
### Credit
<img src="https://picocli.info/images/logo/horizontal-400x150.png" height="100">
[Reallinfo](https://github.com/reallinfo) designed the picocli logo! Many thanks!
### Commitments
| This project follows [semantic versioning](https://semver.org/) and adheres to the **[Zero Bugs Commitment](https://github.com/classgraph/classgraph/blob/f24fb4e8f2e4f3221065d755be6e65d59939c5d0/Zero-Bugs-Commitment.md)**. |
|------------------------|
## Adoption
<div>
<img src="https://picocli.info/images/groovy-logo.png" height="50"> <!--groovy--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://objectcomputing.com/files/3416/2275/4315/micronaut_horizontal_black.svg" height="50"><!--micronaut--><img src="https://picocli.info/images/1x1.png" width="10"><img src="https://avatars.githubusercontent.com/u/47638783?s=200&v=4" height="50"><!--quarkus--><img src="https://picocli.info/images/1x1.png" width="10"><img src="https://picocli.info/images/junit5logo-172x50.png" height="50"><!--junit5--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://picocli.info/images/debian-logo-192x50.png" height="50"> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/8433081?s=200&v=4" height="50"><!--intel--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/4430336?s=200&v=4" height="50"><!--oracle--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/1666512?s=200&v=4" height="50"><!--JOOQ--> <img src="https://picocli.info/images/1x1.png" width="10"><img src="https://avatars.githubusercontent.com/u/545988?s=200&v=4" height="50"><!--SonarSource--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/47359?s=200&v=4" height="50"><!--Apache--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/3287599?s=200&v=4" height="50"><!--ESA--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/438548?s=200&v=4" height="50"><!--Liquibase--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/8976946?s=200&v=4" height="50"><!--Harvard PL--> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://avatars.githubusercontent.com/u/2810941?s=200&v=4" height="50"><!--Google Cloud services--> <img src="https://picocli.info/images/1x1.png" width="10">
<img src="https://avatars.githubusercontent.com/u/317776?s=200&v=4" height="50"><!--Spring-->
<img src="https://avatars0.githubusercontent.com/u/3299148?s=200&v=4" height="50">
<img src="https://avatars3.githubusercontent.com/u/39734771?s=200&v=4" height="50">
<img src="https://avatars3.githubusercontent.com/u/1453152?s=200&v=4" height="50">
<img src="https://avatars1.githubusercontent.com/u/201120?s=200&v=4" height="50">
<img src="https://avatars0.githubusercontent.com/u/6154722?s=200&v=4" height="50">
<img src="https://avatars3.githubusercontent.com/u/453694?s=200&v=4" height="50">
<img src="https://avatars0.githubusercontent.com/u/82592?s=200&v=4" height="50">
<img src="https://avatars0.githubusercontent.com/u/9312489?s=200&v=4" height="50">
<img src="https://avatars0.githubusercontent.com/u/59439283?s=200&v=4" height="50">
<img src="https://avatars1.githubusercontent.com/u/4186383?s=200&v=4" height="50">
<img src="https://redis.com/wp-content/uploads/2021/08/redis-logo.png" height="50">
<img src="https://picocli.info/images/karate-logo.png" height="50" width="50"/> <img src="https://picocli.info/images/checkstyle-logo-260x50.png" height="50"><img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://picocli.info/images/ballerina-logo.png" height="40"><img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://picocli.info/images/apache-hive-logo.png" height="50"><img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://hadoop.apache.org/hadoop-logo.jpg" height="50"><img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://picocli.info/images/apache-ozone-logo.png" height="50"> <img src="https://picocli.info/images/1x1.png" width="10"> <img src="https://picocli.info/images/stackshare-logo.png" height="50"> <img src="https://ignite.apache.org/images/Ignite_tm_Logo_blk_RGB.svg" height="50"> <img src="https://camo.githubusercontent.com/501aae78d282faf7a904bbb92f46eb8d19445ad5/687474703a2f2f736c696e672e6170616368652e6f72672f7265732f6c6f676f732f736c696e672e706e67" height="50">
<img src="https://avatars1.githubusercontent.com/u/541152?s=200&v=4" height="50"> <img src="https://camo.qiitausercontent.com/ec81e80366e061c8488b25c013003267b7a578d4/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f3939352f33323331306534352d303537332d383534322d373035652d6530313138643434323632302e706e67" height="50">
<img src="https://mk0upserved13l70iwek.kinstacdn.com/media/Upserve_LS_Lockup_000000_RGB_Vertical.svg" height="50">
<img src="https://www.kloudtek.com/logo-dark.png" height="50">
<img src="https://www.schemacrawler.com/images/schemacrawler_logo.svg" height="50">
<img src="https://avatars1.githubusercontent.com/u/22600631?s=200&v=4" height="50">
<img src="https://fisco-bcos-documentation.readthedocs.io/en/latest/_static/images/FISCO_BCOS_Logo.svg" height="50">
<img src="https://avatars0.githubusercontent.com/u/35625214?s=200&v=4" height="50">
<img src="https://avatars1.githubusercontent.com/u/2386734?s=200&v=4" height="50">
<img src="https://www.e-contract.be/images/logo.svg" height="50">
<img src="https://present.co/images/logn-new@2x.png" height="50">
<img src="https://avatars2.githubusercontent.com/u/13641167?s=200&v=4" height="50">
<img src="https://concord.walmartlabs.com/assets/img/logo.png" height="50">
<img src="https://res-3.cloudinary.com/crunchbase-production/image/upload/c_lpad,h_120,w_120,f_auto,b_white,q_auto:eco/etxip1k2sx4sphvwgkdu" height="50">
<img src="https://avatars.githubusercontent.com/u/1390178?s=200&v=4" height="50"><!-- minecraft forge-->
</div>
* Picocli is now part of Groovy. From Groovy 2.5, all Groovy command line tools are picocli-based, and picocli is the underlying parser for Groovy's [CliBuilder DSL](https://groovy-lang.org/dsls.html#_clibuilder).
* Picocli is now part of Micronaut. The Micronaut CLI has been rewritten with picocli, and Micronaut has dedicated support for running microservices [standalone with picocli](https://docs.micronaut.io/snapshot/guide/index.html#commandLineApps). See also [Micronaut Picocli Guide](https://micronaut-projects.github.io/micronaut-picocli/latest/guide/).
* Quarkus now offers [Command mode with picocli](https://quarkus.io/guides/picocli).
* Picocli is now part of JUnit 5. JUnit 5.3 migrated its `ConsoleLauncher` from jopt-simple to picocli to support @-files (argument files); this helps users who need to specify many tests on the command line and run into system limitations.
* Debian now offers a [libpicocli-java package](https://tracker.debian.org/pkg/picocli). Thanks to [Miroslav Kravec](https://udd.debian.org/dmd/?kravec.miroslav%40gmail.com).
* Picocli is used in the Intuit [Karate](https://github.com/intuit/karate) standalone JAR / executable.
* Picocli is part of [Ballerina](https://ballerina.io/). Ballerina uses picocli for all its command line utilities.
* Picocli is used in the [CheckStyle](https://checkstyle.org/cmdline.html) standalone JAR / executable from Checkstyle 8.15.
* Picocli is included in the [OpenJDK Quality Outreach](https://wiki.openjdk.java.net/display/quality/Quality+Outreach) list of Free Open Source Software (FOSS) projects that actively test against OpenJDK builds.
* Picocli is used in the Apache Hadoop Ozone/HDDS command line tools, the Apache Hive benchmark CLI, Apache [Ignite TensorFlow](https://github.com/apache/ignite), and Apache Sling [Feature Model Converter](https://github.com/apache/sling-org-apache-sling-feature-modelconverter).
* Picocli is listed on [StackShare](https://stackshare.io/picocli). Please add it to your stack and add/upvote reasons why you like picocli!
* Picocli is used in Pinterest [ktlint](https://ktlint.github.io/).
* Picocli is used in Spring IO [nohttp-cli](https://github.com/spring-io/nohttp/tree/main/nohttp-cli).
* The [MinecraftPicocli](https://github.com/Rubydesic/MinecraftPicocli) library facilitates the use of picocli in [Minecraft Forge](https://files.minecraftforge.net/).
* [Simple Java Mail](https://www.simplejavamail.org/) now offers a picocli-based [CLI](https://www.simplejavamail.org/cli.html#navigation).
* [jbang](https://github.com/maxandersen/jbang) not only uses picocli internally, but also has a CLI template to generate an initial script: use `jbang --init=cli helloworld.java` to generate a sample picocli-enabled jbang script. See [asciinema](https://asciinema.org/a/AVwA19yijKRNKEO0bJENN2ME3?autoplay=true&speed=2).
* Picocli is the main library used in the CookieTemple [cli-java template](https://cookietemple.readthedocs.io/en/latest/available_templates/available_templates.html#cli-java) for building GraalVM native CLI executables in Java. See [this preview](https://user-images.githubusercontent.com/21954664/86740903-474a3000-c037-11ea-9ae3-1a8f7bf1743f.gif).
* Picocli is [mentioned](https://clig.dev/#the-basics) in [Command Line Interface Guidelines](https://clig.dev/).
<img src="https://picocli.info/images/downloads-202011.png">
Glad to see more people are using picocli. We must be doing something right. :-)
### Contribute by helping to promote picocli
If you like picocli, help others discover picocli:
#### Easy and impactful :sweat_smile:
* Give picocli a star on GitHub!
* Upvote my [StackOverflow answer](https://stackoverflow.com/a/43780433/1446916) to "How do I parse command line arguments in Java?"
* Upvote my [Quora answer](https://www.quora.com/What-is-the-best-way-to-parse-command-line-arguments-with-Java/answer/Remko-Popma) to "What is the best way to parse command-line arguments with Java?"
#### Spread the joy! :tada:
* Tweet about picocli! What do you like about it? How has it helped you? How is it different from the alternatives?
* Mention that your project uses picocli in the documentation of your project.
* Show that your GitHub project uses picocli, with this badge in your README.md: [![picocli](https://img.shields.io/badge/picocli-4.7.6-green.svg)](https://github.com/remkop/picocli)
```
[![picocli](https://img.shields.io/badge/picocli-4.7.6-green.svg)](https://github.com/remkop/picocli)
```
#### Preach it! :muscle:
* Perhaps the most impactful way to show people how picocli can make their life easier is to write a blog post or article, or even do a video!
## Example
Annotate fields with the command line parameter names and description. Optionally implement `Runnable` or `Callable` to delegate error handling and requests for usage help or version help to picocli. For example:
```java
import picocli.CommandLine;
import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;
import java.io.File;
@Command(name = "example", mixinStandardHelpOptions = true, version = "Picocli example 4.0")
public class Example implements Runnable {
@Option(names = { "-v", "--verbose" },
description = "Verbose mode. Helpful for troubleshooting. Multiple -v options increase the verbosity.")
private boolean[] verbose = new boolean[0];
@Parameters(arity = "1..*", paramLabel = "FILE", description = "File(s) to process.")
private File[] inputFiles;
public void run() {
if (verbose.length > 0) {
System.out.println(inputFiles.length + " files to process...");
}
if (verbose.length > 1) {
for (File f : inputFiles) {
System.out.println(f.getAbsolutePath());
}
}
}
public static void main(String[] args) {
// By implementing Runnable or Callable, parsing, error handling and handling user
// requests for usage help or version help can be done with one line of code.
int exitCode = new CommandLine(new Example()).execute(args);
System.exit(exitCode);
}
}
```
Implement `Runnable` or `Callable`, and your command can be [executed](https://picocli.info/#execute) in one line of code. The example above uses the `CommandLine.execute` method to parse the command line, handle errors, handle requests for usage and version help, and invoke the business logic. Applications can call `System.exit` with the returned exit code to signal success or failure to their caller.
```bash
$ java Example -v inputFile1 inputFile2
2 files to process...
```
The `CommandLine.execute` method automatically prints the usage help message if the user requested help or when the input was invalid.
![Usage help message with ANSI colors](docs/images/ExampleUsageANSI.png?raw=true)
This can be customized in many ways. See the user manual [section on Executing Commands](https://picocli.info/#execute) for details.
## Usage Help with ANSI Colors and Styles
Colors, styles, headers, footers and section headings are easily [customized with annotations](https://picocli.info/#_ansi_colors_and_styles).
For example:
![Longer help message with ANSI colors](docs/images/UsageHelpWithStyle.png?raw=true)
See the [source code](https://github.com/remkop/picocli/blob/v0.9.4/src/test/java/picocli/Demo.java#L337).
## Usage Help API
Picocli annotations offer many ways to customize the usage help message.
If annotations are not sufficient, you can use picocli's [Help API](https://picocli.info/#_usage_help_api) to customize even further.
For example, your application can generate help like this with a custom layout:
![Usage help message with two options per row](docs/images/UsageHelpWithCustomLayout.png?raw=true)
See the [source code](https://github.com/remkop/picocli/blob/main/src/test/java/picocli/CustomLayoutDemo.java#L61).
## Download
You can add picocli as an external dependency to your project, or you can include it as source.
See the [source code](https://github.com/remkop/picocli/blob/main/src/main/java/picocli/CommandLine.java). Copy and paste it into a file called `CommandLine.java`, add it to your project, and enjoy!
### Gradle
```
implementation 'info.picocli:picocli:4.7.6'
```
### Maven
```
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.7.6</version>
</dependency>
```
### Scala SBT
```
libraryDependencies += "info.picocli" % "picocli" % "4.7.6"
```
### Ivy
```
<dependency org="info.picocli" name="picocli" rev="4.7.6" />
```
### Grape
```groovy
@Grapes(
@Grab(group='info.picocli', module='picocli', version='4.7.6')
)
```
### Leiningen
```
[info.picocli/picocli "4.7.6"]
```
### Buildr
```
'info.picocli:picocli:jar:4.7.6'
```
### JBang
```
//DEPS info.picocli:picocli:4.7.6
```
| 0 |
codecentric/spring-boot-admin | Admin UI for administration of spring boot applications | 2014-07-25T11:39:13Z | null | # Spring Boot Admin by [codecentric](https://codecentric.de)
[![Apache License 2](https://img.shields.io/badge/license-ASF2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt)
![Build Status](https://github.com/codecentric/spring-boot-admin/actions/workflows/build-main.yml/badge.svg?branch=master)
[![codecov](https://codecov.io/gh/codecentric/spring-boot-admin/branch/master/graph/badge.svg?token=u5SWsZpj5S)](https://codecov.io/gh/codecentric/spring-boot-admin)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.codecentric/spring-boot-admin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.codecentric/spring-boot-admin/)
[![Gitter](https://badges.gitter.im/codecentric/spring-boot-admin.svg)](https://gitter.im/codecentric/spring-boot-admin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
This community project provides an admin interface for [Spring Boot <sup>®</sup>](http://projects.spring.io/spring-boot/ "Official Spring-Boot website") web applications that expose actuator endpoints.
Monitoring Python applications is available using [Pyctuator](https://github.com/SolarEdgeTech/pyctuator).
## Compatibility Matrix
In the Spring Boot Admin Server App, the Spring Boot Admin's version matches the major and minor versions of Spring Boot.
| Spring Boot Version | Spring Boot Admin |
|---------------------|--------------------|
| 2.6 | 2.6.Y |
| 2.7 | 2.7.Y |
| 3.0 | 3.0.Y |
| 3.1 | 3.1.Y |
| 3.2 | 3.2.Y |
Nevertheless, it is possible to monitor any version of a Spring Boot service independently of the underlying Spring Boot version in the service.
Hence, it is possible to run Spring Boot Admin Server version 2.6 and monitor a service that is running on Spring Boot 2.3 using Spring Boot Admin Client version 2.3.
## Getting Started
[A quick guide](https://docs.spring-boot-admin.com/current/getting-started.html) to get started can be found in our docs.
There are introductory talks available on YouTube:
<a href="https://youtu.be/Ql1Gnz4L_-c" target="_blank"><img src="https://i.ytimg.com/vi/Ql1Gnz4L_-c/maxresdefault.jpg"
alt="Cloud Native Spring Boot® Admin by Johannes Edmeier @ Spring I/O 2019" width="240" height="135" border="10" /></a><br>
**Cloud Native Spring Boot® Admin by Johannes Edmeier @ Spring I/O 2019**
<a href="https://youtu.be/__zkypwjSMs" target="_blank"><img src="https://i.ytimg.com/vi/__zkypwjSMs/maxresdefault.jpg"
alt="Monitoring Spring Boot® Applications with Spring Boot Admin @ Spring I/O 2018" width="240" height="135" border="10" /></a><br>
**Monitoring Spring Boot® Applications with Spring Boot Admin @ Spring I/O 2018**
<a href="https://goo.gl/2tRiUi" target="_blank"><img src="https://i.ytimg.com/vi/PWd9Q8_4OFo/maxresdefault.jpg"
alt="Spring Boot® Admin - Monitoring and Configuring Spring Boot Applications at Runtime" width="240" height="135" border="10" /></a><br>
**Spring Boot® Admin - Monitoring and Configuring Spring Boot Applications at Runtime**
## Getting Help
Having trouble with codecentric's Spring Boot Admin? We’d like to help!
* Check the [reference documentation](http://codecentric.github.io/spring-boot-admin/current/).
* Ask a question on [stackoverflow.com](http://stackoverflow.com/questions/tagged/spring-boot-admin) - we monitor questions tagged with `spring-boot-admin`.
* Ask for help in our [spring-boot-admin Gitter chat](https://gitter.im/codecentric/spring-boot-admin)
* Report bugs at http://github.com/codecentric/spring-boot-admin/issues.
## Reference Guide
### Translated versions
The following reference guides have been translated by users of Spring Boot Admin and are not part of the official bundle.
The maintainers of Spring Boot Admin will not update and maintain the guides mentioned below.
[Version 2.6.6 (Chinese translated by @qq253498229)](https://consolelog.gitee.io/docs-spring-boot-admin-docs-chinese/)
## Trademarks and licenses
The source code of codecentric's Spring Boot Admin is licensed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
Spring, Spring Boot and Spring Cloud are trademarks of [Pivotal Software, Inc.](https://pivotal.io/) in the U.S. and other countries.
## Snapshot builds
You can access snapshot builds from the github snapshot repository by adding the following to your `repositories`:
```xml
<repository>
<id>sba-snapshot</id>
<name>Spring Boot Admin Snapshots</name>
<url>https://maven.pkg.github.com/codecentric/spring-boot-admin</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) file.
| 0 |
egzosn/pay-java-parent | 第三方支付对接全能支付Java开发工具包.优雅的轻量级支付模块集成支付对接支付整合(微信,支付宝,银联,友店,富友,跨境支付paypal,payoneer(P卡派安盈)易极付)app,扫码,网页刷脸付刷卡付条码付转账服务商模式,微信分账,微信合单支付、支持多种支付类型多支付账户,支付与业务完全剥离,简单几行代码即可实现支付,简单快速完成支付模块的开发,可轻松嵌入到任何系统里 目前仅是一个开发工具包(即SDK),只提供简单Web实现,建议使用maven或gradle引用本项目即可使用本SDK提供的各种支付相关的功能 | 2016-05-18T12:52:36Z | null | 全能第三方支付对接Java开发工具包.优雅的轻量级支付模块集成支付对接支付整合(微信,支付宝,银联,友店,富友,跨境支付paypal,payoneer(P卡派安盈)易极付)app,扫码,网页支付刷卡付条码付刷脸付转账红包服务商模式,微信分账,合并支付、支持多种支付类型多支付账户,支付与业务完全剥离,简单几行代码即可实现支付,简单快速完成支付模块的开发,可轻松嵌入到任何系统里 目前仅是一个开发工具包(即SDK),只提供简单Web实现,建议使用maven或gradle引用本项目即可使用本SDK提供的各种支付相关的功能
### 特性
1. 不依赖任何 mvc 框架,依赖极少:httpclient,fastjson,log4j,com.google.zxing,项目精简,不用担心项目迁移问题
2. 也不依赖 servlet,仅仅作为工具使用,可轻松嵌入到任何系统里(项目例子利用spring mvc的 @PathVariable进行,推荐使用类似的框架)
3. 支付请求调用支持HTTP和异步、支持http代理,连接池
4. 简单快速完成支付模块的开发
5. 支持多种支付类型多支付账户扩展
### 本项目包含 4 个部分:
1. pay-java-common 公共lib,支付核心与规范定义
2. pay-java-web-support web支持包,目前已实现回调相关
2. pay-java-demo 具体的支付demo
3. pay-java-* 具体的支付实现库
### Maven配置
具体支付模块 "{module-name}" 为具体的支付渠道的模块名 pay-java-ali,pay-java-wx等
```xml
<dependency>
<groupId>com.egzosn</groupId>
<artifactId>{module-name}</artifactId>
<version>2.14.7</version>
</dependency>
```
#### 本项目在以下代码托管网站
* 码云:https://gitee.com/egzosn/pay-java-parent
* GitHub:https://github.com/egzosn/pay-java-parent
#### 基于spring-boot实现自动化配置的支付对接,让你真正做到一行代码实现支付聚合,让你可以不用理解支付怎么对接,只需要专注你的业务 全能第三方支付对接spring-boot-starter-pay开发工具包
* 码云:https://gitee.com/egzosn/pay-spring-boot-starter-parent
* GitHub:https://github.com/egzosn/pay-spring-boot-starter-parent
##### 开源中国项目地址
如果你觉得项目对你有帮助,也点击下进入后点击收藏呗
* 基础支付聚合组件[pay-java-parent](https://www.oschina.net/p/pay-java-parent)
* spring-boot-starter自动化配置支付聚合组件 [pay-spring-boot-starter](https://www.oschina.net/p/spring-boot-starter-pay)
###### 支付教程
* [基础模块支付宝微信讲解](https://gitee.com/egzosn/pay-java-parent/wikis/Home)
* [微信V3,查看demo/WxV3PayController](pay-java-demo?dir=1&filepath=pay-java-demo)
* [微信合并支付,查看demo/WxV3CombinePayController](pay-java-demo?dir=1&filepath=pay-java-demo)
* [微信分账,查看demo/WxV3ProfitSharingController](pay-java-demo?dir=1&filepath=pay-java-demo)
* [银联](pay-java-union?dir=1&filepath=pay-java-union)
* [payoneer](pay-java-payoneer?dir=1&filepath=pay-java-payoneer)
* [paypal](pay-java-paypal?dir=1&filepath=pay-java-paypal)
* [友店微信](pay-java-wx-youdian?dir=1&filepath=pay-java-youdian)
* [富友](pay-java-fuiou?dir=1&filepath=pay-java-fuiou)
支付整合》服务端+网页端详细使用与简单教程请看 [pay-java-demo](pay-java-demo?dir=1&filepath=pay-java-demo)
android 例子 [pay-java-android](https://gitee.com/egzosn/pay-java-android)
## 交流
很希望更多志同道合友友一起扩展新的的支付接口。
开发者
[ouyangxiangshao](https://github.com/ouyangxiangshao)、[ZhuangXiong](https://github.com/ZhuangXiong) 、[Actinian](http://gitee.com/Actinia517) 、[Menjoe](https://gitee.com/menjoe-z)
也感谢各大友友同学帮忙进行接口测试
非常欢迎和感谢对本项目发起Pull Request的同学,不过本项目基于git flow开发流程,因此在发起Pull Request的时候请选择develop分支。
作者公众号(未来输出)
![公众号](https://gitee.com/egzosn/pay-java-parent/raw/develop/pay-java-demo/src/main/webapp/gzh.png "gzh.png")
E-Mail:egan@egzosn.com
**QQ群:**
1. pay-java(1群): 542193977(已满)
2. pay-java(2群):766275051
微信群: 加我前拜托伸个小手关注公众号
![微信群](https://egzosn.gitee.io/pay-java-parent/wx.jpg "wx.jpg")
| 0 |
dromara/hutool | 🍬A set of tools that keep Java sweet. | 2014-04-13T07:23:51Z | null | <p align="center">
<a href="https://hutool.cn/"><img src="https://cdn.jsdelivr.net/gh/looly/hutool-site/images/logo.jpg" width="45%"></a>
</p>
<p align="center">
<strong>🍬A set of tools that keep Java sweet.</strong>
</p>
<p align="center">
👉 <a href="https://hutool.cn">https://hutool.cn/</a> 👈
</p>
<p align="center">
<a target="_blank" href="https://search.maven.org/artifact/cn.hutool/hutool-all">
<img src="https://img.shields.io/maven-central/v/cn.hutool/hutool-all.svg?label=Maven%20Central" />
</a>
<a target="_blank" href="https://license.coscl.org.cn/MulanPSL2">
<img src="https://img.shields.io/:license-MulanPSL2-blue.svg" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
<img src="https://img.shields.io/badge/JDK-8+-green.svg" />
</a>
<a target="_blank" href="https://travis-ci.com/dromara/hutool">
<img src="https://travis-ci.com/dromara/hutool.svg?branch=v5-master" />
</a>
<a href="https://www.codacy.com/gh/dromara/hutool/dashboard?utm_source=github.com&utm_medium=referral&utm_content=dromara/hutool&utm_campaign=Badge_Grade">
<img src="https://app.codacy.com/project/badge/Grade/8a6897d9de7440dd9de8804c28d2871d"/>
</a>
<a href="https://codecov.io/gh/dromara/hutool">
<img src="https://codecov.io/gh/dromara/hutool/branch/v5-master/graph/badge.svg" />
</a>
<a target="_blank" href="https://gitter.im/hutool/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
<img src="https://badges.gitter.im/hutool/Lobby.svg" />
</a>
<a target="_blank" href='https://gitee.com/dromara/hutool/stargazers'>
<img src='https://gitee.com/dromara/hutool/badge/star.svg?theme=gvp' alt='star'/>
</a>
<a target="_blank" href='https://github.com/dromara/hutool'>
<img src="https://img.shields.io/github/stars/dromara/hutool.svg?style=social" alt="github star"/>
</a>
</p>
<br/>
<p align="center">
<a href="https://qm.qq.com/cgi-bin/qm/qr?k=QtsqXLkHpLjE99tkre19j6pjPMhSay1a&jump_from=webapi">
<img src="https://img.shields.io/badge/QQ%E7%BE%A4%E2%91%A6-715292493-orange"/></a>
</p>
-------------------------------------------------------------------------------
<p align="center">
<a href="#"><img style="width: 45%" alt="" src="https://plus.hutool.cn/images/zanzhu.jpg"/></a>
</p>
-------------------------------------------------------------------------------
[**🌎English Documentation**](README-EN.md)
-------------------------------------------------------------------------------
## 📚简介
`Hutool`是一个功能丰富且易用的**Java工具库**,通过诸多实用工具类的使用,旨在帮助开发者快速、便捷地完成各类开发任务。
这些封装的工具涵盖了字符串、数字、集合、编码、日期、文件、IO、加密、数据库JDBC、JSON、HTTP客户端等一系列操作,
可以满足各种不同的开发需求。
### 🎁Hutool名称的由来
Hutool = Hu + tool,是原公司项目底层代码剥离后的开源库,“Hu”是公司名称的表示,tool表示工具。Hutool谐音“糊涂”,一方面简洁易懂,一方面寓意“难得糊涂”。
### 🍺Hutool理念
`Hutool`既是一个工具集,也是一个知识库,我们从不自诩代码原创,大多数工具类都是**搬运**而来,因此:
- 你可以引入使用,也可以**拷贝**和修改使用,而**不必标注任何信息**,只是希望能把bug及时反馈回来。
- 我们努力健全**中文**注释,为源码学习者提供良好地学习环境,争取做到人人都能看得懂。
-------------------------------------------------------------------------------
## 🛠️包含组件
一个Java基础工具类,对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装,组成各种Util工具类,同时提供以下组件:
| 模块 | 介绍 |
| -------------------|---------------------------------------------------------------------------------- |
| hutool-aop | JDK动态代理封装,提供非IOC下的切面支持 |
| hutool-bloomFilter | 布隆过滤,提供一些Hash算法的布隆过滤 |
| hutool-cache | 简单缓存实现 |
| hutool-core | 核心,包括Bean操作、日期、各种Util等 |
| hutool-cron | 定时任务模块,提供类Crontab表达式的定时任务 |
| hutool-crypto | 加密解密模块,提供对称、非对称和摘要算法封装 |
| hutool-db | JDBC封装后的数据操作,基于ActiveRecord思想 |
| hutool-dfa | 基于DFA模型的多关键字查找 |
| hutool-extra | 扩展模块,对第三方封装(模板引擎、邮件、Servlet、二维码、Emoji、FTP、分词等) |
| hutool-http | 基于HttpUrlConnection的Http客户端封装 |
| hutool-log | 自动识别日志实现的日志门面 |
| hutool-script | 脚本执行封装,例如Javascript |
| hutool-setting | 功能更强大的Setting配置文件和Properties封装 |
| hutool-system | 系统参数调用封装(JVM信息等) |
| hutool-json | JSON实现 |
| hutool-captcha | 图片验证码实现 |
| hutool-poi | 针对POI中Excel和Word的封装 |
| hutool-socket | 基于Java的NIO和AIO的Socket封装 |
| hutool-jwt | JSON Web Token (JWT)封装实现 |
可以根据需求对每个模块单独引入,也可以通过引入`hutool-all`方式引入所有模块。
-------------------------------------------------------------------------------
## 📝文档
[📘中文文档](https://doc.hutool.cn/pages/index/)
[📘中文备用文档](https://plus.hutool.cn/)
[📙参考API](https://apidoc.gitee.com/dromara/hutool/)
[🎬视频介绍](https://www.bilibili.com/video/BV1bQ4y1M7d9?p=2)
-------------------------------------------------------------------------------
## 🪙支持Hutool
### 💳捐赠
如果你觉得Hutool不错,可以捐赠请维护者吃包辣条~,在此表示感谢^_^。
[Gitee上捐赠](https://gitee.com/dromara/hutool)
### 👕周边商店
你也可以通过购买Hutool的周边商品来支持Hutool维护哦!
我们提供了印有Hutool Logo的周边商品,欢迎点击购买支持:
👉 [Hutool 周边商店](https://market.m.taobao.com/apps/market/content/index.html?wh_weex=true&contentId=331724720170) 👈
-------------------------------------------------------------------------------
## 📦安装
### 🍊Maven
在项目的pom.xml的dependencies中加入以下内容:
```xml
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.27</version>
</dependency>
```
### 🍐Gradle
```
implementation 'cn.hutool:hutool-all:5.8.27'
```
### 📥下载jar
点击以下链接,下载`hutool-all-X.X.X.jar`即可:
- [Maven中央库](https://repo1.maven.org/maven2/cn/hutool/hutool-all/5.8.27/)
> 🔔️注意
> Hutool 5.x支持JDK8+,对Android平台没有测试,不能保证所有工具类或工具方法可用。
> 如果你的项目使用JDK7,请使用Hutool 4.x版本(不再更新)
### 🚽编译安装
访问Hutool的Gitee主页:[https://gitee.com/dromara/hutool](https://gitee.com/dromara/hutool) 下载整个项目源码(v5-master或v5-dev分支都可)然后进入Hutool项目目录执行:
```sh
./hutool.sh install
```
然后就可以使用Maven引入了。
-------------------------------------------------------------------------------
## 🏗️添砖加瓦
### 🎋分支说明
Hutool的源码分为两个分支,功能如下:
| 分支 | 作用 |
|-----------|---------------------------------------------------------------|
| v5-master | 主分支,release版本使用的分支,与中央库提交的jar一致,不接收任何pr或修改 |
| v5-dev | 开发分支,默认为下个版本的SNAPSHOT版本,接受修改或pr |
### 🐞提供bug反馈或建议
提交问题反馈请说明正在使用的JDK版本呢、Hutool版本和相关依赖库版本。
- [Gitee issue](https://gitee.com/dromara/hutool/issues)
- [Github issue](https://github.com/dromara/hutool/issues)
### 🧬贡献代码的步骤
1. 在Gitee或者Github上fork项目到自己的repo
2. 把fork过去的项目也就是你的项目clone到你的本地
3. 修改代码(记得一定要修改v5-dev分支)
4. commit后push到自己的库(v5-dev分支)
5. 登录Gitee或Github在你首页可以看到一个 pull request 按钮,点击它,填写一些说明信息,然后提交即可。
6. 等待维护者合并
### 📐PR遵照的原则
Hutool欢迎任何人为Hutool添砖加瓦,贡献代码,不过维护者是一个强迫症患者,为了照顾病人,需要提交的pr(pull request)符合一些规范,规范如下:
1. 注释完备,尤其每个新增的方法应按照Java文档规范标明方法说明、参数说明、返回值说明等信息,必要时请添加单元测试,如果愿意,也可以加上你的大名。
2. Hutool的缩进按照Eclipse(~~不要跟我说IDEA多好用,维护者非常懒,学不会~~,IDEA真香,改了Eclipse快捷键后舒服多了)默认(tab)缩进,所以请遵守(不要和我争执空格与tab的问题,这是一个病人的习惯)。
3. 新加的方法不要使用第三方库的方法,Hutool遵循无依赖原则(除非在extra模块中加方法工具)。
4. 请pull request到`v5-dev`分支。Hutool在5.x版本后使用了新的分支:`v5-master`是主分支,表示已经发布中央库的版本,这个分支不允许pr,也不允许修改。
5. 我们如果关闭了你的issue或pr,请不要诧异,这是我们保持问题处理整洁的一种方式,你依旧可以继续讨论,当有讨论结果时我们会重新打开。
### 📖文档源码地址
[文档源码地址](https://gitee.com/loolly_admin/hutool-doc-handy) 点击前往添砖加瓦
-------------------------------------------------------------------------------
## ⭐Star Hutool
[![Stargazers over time](https://starchart.cc/dromara/hutool.svg)](https://starchart.cc/dromara/hutool)
| 0 |
ltsopensource/light-task-scheduler | Distributed Scheduled Job Framework | 2014-10-24T12:53:14Z | null |
# LTS用户文档
LTS(light-task-scheduler)主要用于解决分布式任务调度问题,支持实时任务,定时任务和Cron任务。有较好的伸缩性,扩展性,健壮稳定性而被多家公司使用,同时也希望开源爱好者一起贡献。
## ---> 底部有招人帖
## 项目地址
github地址:
[https://github.com/ltsopensource/light-task-scheduler](https://github.com/ltsopensource/light-task-scheduler)
oschina地址:
[http://git.oschina.net/hugui/light-task-scheduler](http://git.oschina.net/hugui/light-task-scheduler)
例子:
[https://github.com/ltsopensource/lts-examples](https://github.com/ltsopensource/lts-examples)
文档地址(正在更新中,后面以这个为准):
[https://www.gitbook.com/book/qq254963746/lts/details](https://www.gitbook.com/book/qq254963746/lts/details)
这两个地址都会同步更新。感兴趣,请加QQ群:109500214 (加群密码: hello world)一起探讨、完善。越多人支持,就越有动力去更新,喜欢记得右上角star哈。
## 1.7.2-SNAPSHOT(master)变更主要点
1. 优化JobContext中的BizLogger,由原来的去掉了threadlocal,解决taskTracker多线程的问题, 去掉LtsLoggerFactory.getLogger()用法
## 框架概况
LTS 有主要有以下四种节点:
* JobClient:主要负责提交任务, 并接收任务执行反馈结果。
* JobTracker:负责接收并分配任务,任务调度。
* TaskTracker:负责执行任务,执行完反馈给JobTracker。
* LTS-Admin:(管理后台)主要负责节点管理,任务队列管理,监控管理等。
其中JobClient,JobTracker,TaskTracker节点都是`无状态`的。
可以部署多个并动态的进行删减,来实现负载均衡,实现更大的负载量, 并且框架采用FailStore策略使LTS具有很好的容错能力。
LTS注册中心提供多种实现(Zookeeper,redis等),注册中心进行节点信息暴露,master选举。(Mongo or Mysql)存储任务队列和任务执行日志, netty or mina做底层通信, 并提供多种序列化方式fastjson, hessian2, java等。
LTS支持任务类型:
* 实时任务:提交了之后立即就要执行的任务。
* 定时任务:在指定时间点执行的任务,譬如 今天3点执行(单次)。
* Cron任务:CronExpression,和quartz类似(但是不是使用quartz实现的)譬如 0 0/1 * * * ?
支持动态修改任务参数,任务执行时间等设置,支持后台动态添加任务,支持Cron任务暂停,支持手动停止正在执行的任务(有条件),支持任务的监控统计,支持各个节点的任务执行监控,JVM监控等等.
## 架构图
![LTS architecture](http://git.oschina.net/hugui/light-task-scheduler/raw/master/docs/LTS_architecture.png?dir=0&filepath=docs%2FLTS_architecture.png&oid=262a5234534e2d9fa8862f3e632c5551ebd95e21&sha=d01be5d59e8d768f49bbdc66c8334c37af8f7af5)
## 概念说明
### 节点组
1. 英文名称 NodeGroup,一个节点组等同于一个小的集群,同一个节点组中的各个节点是对等的,等效的,对外提供相同的服务。
2. 每个节点组中都有一个master节点,这个master节点是由LTS动态选出来的,当一个master节点挂掉之后,LTS会立马选出另外一个master节点,框架提供API监听接口给用户。
### FailStore
1. 顾名思义,这个主要是用于失败了存储的,主要用于节点容错,当远程数据交互失败之后,存储在本地,等待远程通信恢复的时候,再将数据提交。
2. FailStore主要用户JobClient的任务提交,TaskTracker的任务反馈,TaskTracker的业务日志传输的场景下。
3. FailStore目前提供几种实现:leveldb,rocksdb,berkeleydb,mapdb,ltsdb,用于可以自由选择使用哪种,用户也可以采用SPI扩展使用自己的实现。
## 流程图
下图是一个标准的实时任务执行流程。
![LTS progress](http://git.oschina.net/hugui/light-task-scheduler/raw/master/docs/LTS_progress.png?dir=0&filepath=docs%2FLTS_progress.png&oid=22f60a83b51b26bac8dabbb5053ec9913cefc45c&sha=774aa73d186470aedbb8f4da3c04a86a6022be05)
## LTS-Admin新版界面预览
![LTS Admin](http://git.oschina.net/hugui/light-task-scheduler/raw/master/docs/LTS-Admin/LTS-Admin-cron-job-queue.png?dir=0&filepath=docs%2FLTS-Admin%2FLTS-Admin-cron-job-queue.png&oid=aecaf01bca5270a53b144891baaa3d7e56d47706&sha=a4fd9f31df9e1fc6d389a16bdc8d1964bb854766)
目前后台带有由[ztajy](https://github.com/ztajy)提供的一个简易的认证功能. 用户名密码在auth.cfg中,用户自行修改.
## 特性
### 1、Spring支持
LTS可以完全不用Spring框架,但是考虑到很用用户项目中都是用了Spring框架,所以LTS也提供了对Spring的支持,包括Xml和注解,引入`lts-spring.jar`即可。
### 2、业务日志记录器
在TaskTracker端提供了业务日志记录器,供应用程序使用,通过这个业务日志器,可以将业务日志提交到JobTracker,这些业务日志可以通过任务ID串联起来,可以在LTS-Admin中实时查看任务的执行进度。
### 3、SPI扩展支持
SPI扩展可以达到零侵入,只需要实现相应的接口,并实现即可被LTS使用,目前开放出来的扩展接口有
1. 对任务队列的扩展,用户可以不选择使用mysql或者mongo作为队列存储,也可以自己实现。
2. 对业务日志记录器的扩展,目前主要支持console,mysql,mongo,用户也可以通过扩展选择往其他地方输送日志。
### 4、故障转移
当正在执行任务的TaskTracker宕机之后,JobTracker会立马将分配在宕机的TaskTracker的所有任务再分配给其他正常的TaskTracker节点执行。
### 5、节点监控
可以对JobTracker,TaskTracker节点进行资源监控,任务监控等,可以实时的在LTS-Admin管理后台查看,进而进行合理的资源调配。
### 6、多样化任务执行结果支持
LTS框架提供四种执行结果支持,`EXECUTE_SUCCESS`,`EXECUTE_FAILED`,`EXECUTE_LATER`,`EXECUTE_EXCEPTION`,并对每种结果采取相应的处理机制,譬如重试。
* EXECUTE_SUCCESS: 执行成功,这种情况,直接反馈客户端(如果任务被设置了要反馈给客户端)。
* EXECUTE_FAILED:执行失败,这种情况,直接反馈给客户端,不进行重试。
* EXECUTE_LATER:稍后执行(需要重试),这种情况,不反馈客户端,重试策略采用1min,2min,3min的策略,默认最大重试次数为10次,用户可以通过参数设置修改这个重试次数。
* EXECUTE_EXCEPTION:执行异常, 这种情况也会重试(重试策略,同上)
### 7、FailStore容错
采用FailStore机制来进行节点容错,Fail And Store,不会因为远程通信的不稳定性而影响当前应用的运行。具体FailStore说明,请参考概念说明中的FailStore说明。
## 项目编译打包
项目主要采用maven进行构建,目前提供shell脚本的打包。
环境依赖:`Java(jdk1.6+)` `Maven`
用户使用一般分为两种:
### 1、Maven构建
可以通过maven命令将lts的jar包上传到本地仓库中。在父pom.xml中添加相应的repository,并用deploy命令上传即可。具体引用方式可以参考lts中的例子即可。
### 2、直接Jar引用
需要将lts的各个模块打包成单独的jar包,并且将所有lts依赖包引入。具体引用哪些jar包可以参考lts中的例子即可。
## JobTracker和LTS-Admin部署
提供`(cmd)windows`和`(shell)linux`两种版本脚本来进行编译和部署:
1. 运行根目录下的`sh build.sh`或`build.cmd`脚本,会在`dist`目录下生成`lts-{version}-bin`文件夹
2. 下面是其目录结构,其中bin目录主要是JobTracker和LTS-Admin的启动脚本。`jobtracker` 中是 JobTracker的配置文件和需要使用到的jar包,`lts-admin`是LTS-Admin相关的war包和配置文件。
lts-{version}-bin的文件结构
```java
-- lts-${version}-bin
|-- bin
| |-- jobtracker.cmd
| |-- jobtracker.sh
| |-- lts-admin.cmd
| |-- lts-admin.sh
| |-- lts-monitor.cmd
| |-- lts-monitor.sh
| |-- tasktracker.sh
|-- conf
| |-- log4j.properties
| |-- lts-admin.cfg
| |-- lts-monitor.cfg
| |-- readme.txt
| |-- tasktracker.cfg
| |-- zoo
| |-- jobtracker.cfg
| |-- log4j.properties
| |-- lts-monitor.cfg
|-- lib
| |-- *.jar
|-- war
|-- jetty
| |-- lib
| |-- *.jar
|-- lts-admin.war
```
3. JobTracker启动。如果你想启动一个节点,直接修改下`conf/zoo`下的配置文件,然后运行 `sh jobtracker.sh zoo start`即可,如果你想启动两个JobTracker节点,那么你需要拷贝一份zoo,譬如命名为`zoo2`,修改下`zoo2`下的配置文件,然后运行`sh jobtracker.sh zoo2 start`即可。logs文件夹下生成`jobtracker-zoo.out`日志。
4. LTS-Admin启动.修改`conf/lts-monitor.cfg`和`conf/lts-admin.cfg`下的配置,然后运行`bin`下的`sh lts-admin.sh`或`lts-admin.cmd`脚本即可。logs文件夹下会生成`lts-admin.out`日志,启动成功在日志中会打印出访问地址,用户可以通过这个访问地址访问了。
## JobClient(部署)使用
需要引入lts的jar包有`lts-jobclient-{version}.jar`,`lts-core-{version}.jar` 及其它第三方依赖jar。
### API方式启动
```java
JobClient jobClient = new RetryJobClient();
jobClient.setNodeGroup("test_jobClient");
jobClient.setClusterName("test_cluster");
jobClient.setRegistryAddress("zookeeper://127.0.0.1:2181");
jobClient.start();
// 提交任务
Job job = new Job();
job.setTaskId("3213213123");
job.setParam("shopId", "11111");
job.setTaskTrackerNodeGroup("test_trade_TaskTracker");
// job.setCronExpression("0 0/1 * * * ?"); // 支持 cronExpression表达式
// job.setTriggerTime(new Date()); // 支持指定时间执行
Response response = jobClient.submitJob(job);
```
### Spring XML方式启动
```java
<bean id="jobClient" class="com.github.ltsopensource.spring.JobClientFactoryBean">
<property name="clusterName" value="test_cluster"/>
<property name="registryAddress" value="zookeeper://127.0.0.1:2181"/>
<property name="nodeGroup" value="test_jobClient"/>
<property name="masterChangeListeners">
<list>
<bean class="com.github.ltsopensource.example.support.MasterChangeListenerImpl"/>
</list>
</property>
<property name="jobFinishedHandler">
<bean class="com.github.ltsopensource.example.support.JobFinishedHandlerImpl"/>
</property>
<property name="configs">
<props>
<!-- 参数 -->
<prop key="job.fail.store">leveldb</prop>
</props>
</property>
</bean>
```
### Spring 全注解方式
```java
@Configuration
public class LTSSpringConfig {
@Bean(name = "jobClient")
public JobClient getJobClient() throws Exception {
JobClientFactoryBean factoryBean = new JobClientFactoryBean();
factoryBean.setClusterName("test_cluster");
factoryBean.setRegistryAddress("zookeeper://127.0.0.1:2181");
factoryBean.setNodeGroup("test_jobClient");
factoryBean.setMasterChangeListeners(new MasterChangeListener[]{
new MasterChangeListenerImpl()
});
Properties configs = new Properties();
configs.setProperty("job.fail.store", "leveldb");
factoryBean.setConfigs(configs);
factoryBean.afterPropertiesSet();
return factoryBean.getObject();
}
}
```
## TaskTracker(部署使用)
需要引入lts的jar包有`lts-tasktracker-{version}.jar`,`lts-core-{version}.jar` 及其它第三方依赖jar。
### 定义自己的任务执行类
```java
public class MyJobRunner implements JobRunner {
@Override
public Result run(JobContext jobContext) throws Throwable {
try {
// TODO 业务逻辑
// 会发送到 LTS (JobTracker上)
jobContext.getBizLogger().info("测试,业务日志啊啊啊啊啊");
} catch (Exception e) {
return new Result(Action.EXECUTE_FAILED, e.getMessage());
}
return new Result(Action.EXECUTE_SUCCESS, "执行成功了,哈哈");
}
}
```
### API方式启动
```java
TaskTracker taskTracker = new TaskTracker();
taskTracker.setJobRunnerClass(MyJobRunner.class);
taskTracker.setRegistryAddress("zookeeper://127.0.0.1:2181");
taskTracker.setNodeGroup("test_trade_TaskTracker");
taskTracker.setClusterName("test_cluster");
taskTracker.setWorkThreads(20);
taskTracker.start();
```
### Spring XML方式启动
```java
<bean id="taskTracker" class="com.github.ltsopensource.spring.TaskTrackerAnnotationFactoryBean" init-method="start">
<property name="jobRunnerClass" value="com.github.ltsopensource.example.support.MyJobRunner"/>
<property name="bizLoggerLevel" value="INFO"/>
<property name="clusterName" value="test_cluster"/>
<property name="registryAddress" value="zookeeper://127.0.0.1:2181"/>
<property name="nodeGroup" value="test_trade_TaskTracker"/>
<property name="workThreads" value="20"/>
<property name="masterChangeListeners">
<list>
<bean class="com.github.ltsopensource.example.support.MasterChangeListenerImpl"/>
</list>
</property>
<property name="configs">
<props>
<prop key="job.fail.store">leveldb</prop>
</props>
</property>
</bean>
```
### Spring注解方式启动
```java
@Configuration
public class LTSSpringConfig implements ApplicationContextAware {
private ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
@Bean(name = "taskTracker")
public TaskTracker getTaskTracker() throws Exception {
TaskTrackerAnnotationFactoryBean factoryBean = new TaskTrackerAnnotationFactoryBean();
factoryBean.setApplicationContext(applicationContext);
factoryBean.setClusterName("test_cluster");
factoryBean.setJobRunnerClass(MyJobRunner.class);
factoryBean.setNodeGroup("test_trade_TaskTracker");
factoryBean.setBizLoggerLevel("INFO");
factoryBean.setRegistryAddress("zookeeper://127.0.0.1:2181");
factoryBean.setMasterChangeListeners(new MasterChangeListener[]{
new MasterChangeListenerImpl()
});
factoryBean.setWorkThreads(20);
Properties configs = new Properties();
configs.setProperty("job.fail.store", "leveldb");
factoryBean.setConfigs(configs);
factoryBean.afterPropertiesSet();
// factoryBean.start();
return factoryBean.getObject();
}
}
```
## 参数说明
[参数说明](https://qq254963746.gitbooks.io/lts/content/use/config-name.html)
## 使用建议
一般在一个JVM中只需要一个JobClient实例即可,不要为每种任务都新建一个JobClient实例,这样会大大的浪费资源,因为一个JobClient可以提交多种任务。相同的一个JVM一般也尽量保持只有一个TaskTracker实例即可,多了就可能造成资源浪费。当遇到一个TaskTracker要运行多种任务的时候,请参考下面的 "一个TaskTracker执行多种任务"。
## 一个TaskTracker执行多种任务
有的时候,业务场景需要执行多种任务,有些人会问,是不是要每种任务类型都要一个TaskTracker去执行。我的答案是否定的,如果在一个JVM中,最好使用一个TaskTracker去运行多种任务,因为一个JVM中使用多个TaskTracker实例比较浪费资源(当然当你某种任务量比较多的时候,可以将这个任务单独使用一个TaskTracker节点来执行)。那么怎么才能实现一个TaskTracker执行多种任务呢。下面是我给出来的参考例子。
```java
/**
* 总入口,在 taskTracker.setJobRunnerClass(JobRunnerDispatcher.class)
* JobClient 提交 任务时指定 Job 类型 job.setParam("type", "aType")
*/
public class JobRunnerDispatcher implements JobRunner {
private static final ConcurrentHashMap<String/*type*/, JobRunner>
JOB_RUNNER_MAP = new ConcurrentHashMap<String, JobRunner>();
static {
JOB_RUNNER_MAP.put("aType", new JobRunnerA()); // 也可以从Spring中拿
JOB_RUNNER_MAP.put("bType", new JobRunnerB());
}
@Override
public Result run(JobContext jobContext) throws Throwable {
Job job = jobContext.getJob();
String type = job.getParam("type");
return JOB_RUNNER_MAP.get(type).run(job);
}
}
class JobRunnerA implements JobRunner {
@Override
public Result run(JobContext jobContext) throws Throwable {
// TODO A类型Job的逻辑
return null;
}
}
class JobRunnerB implements JobRunner {
@Override
public Result run(JobContext jobContext) throws Throwable {
// TODO B类型Job的逻辑
return null;
}
}
```
## TaskTracker的JobRunner测试
一般在编写TaskTracker的时候,只需要测试JobRunner的实现逻辑是否正确,又不想启动LTS进行远程测试。为了方便测试,LTS提供了JobRunner的快捷测试方法。自己的测试类集成`com.github.ltsopensource.tasktracker.runner.JobRunnerTester`即可,并实现`initContext`和`newJobRunner`方法即可。如[lts-examples](https://github.com/ltsopensource/lts-examples)中的例子:
```java
public class TestJobRunnerTester extends JobRunnerTester {
public static void main(String[] args) throws Throwable {
// Mock Job 数据
Job job = new Job();
job.setTaskId("2313213");
JobContext jobContext = new JobContext();
jobContext.setJob(job);
JobExtInfo jobExtInfo = new JobExtInfo();
jobExtInfo.setRetry(false);
jobContext.setJobExtInfo(jobExtInfo);
// 运行测试
TestJobRunnerTester tester = new TestJobRunnerTester();
Result result = tester.run(jobContext);
System.out.println(JSON.toJSONString(result));
}
@Override
protected void initContext() {
// TODO 初始化Spring容器
}
@Override
protected JobRunner newJobRunner() {
return new TestJobRunner();
}
}
```
## Spring Quartz Cron任务无缝接入
对于Quartz的Cron任务只需要在Spring配置中增加一下代码就可以接入LTS平台
```xml
<bean class="com.github.ltsopensource.spring.quartz.QuartzLTSProxyBean">
<property name="clusterName" value="test_cluster"/>
<property name="registryAddress" value="zookeeper://127.0.0.1:2181"/>
<property name="nodeGroup" value="quartz_test_group"/>
</bean>
```
## Spring Boot 支持
```java
@SpringBootApplication
@EnableJobTracker // 启动JobTracker
@EnableJobClient // 启动JobClient
@EnableTaskTracker // 启动TaskTracker
@EnableMonitor // 启动Monitor
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
```
剩下的就只是在application.properties中添加相应的配置就行了, 具体见lts-example中的`com.github.ltsopensource.examples.springboot`包下的例子
## 多网卡选择问题
当机器有内网两个网卡的时候,有时候,用户想让LTS的流量走外网网卡,那么需要在host中,把主机名称的映射地址改为外网网卡地址即可,内网同理。
## 关于节点标识问题
如果在节点启动的时候设置节点标识,LTS会默认设置一个UUID为节点标识,可读性会比较差,但是能保证每个节点的唯一性,如果用户能自己保证节点标识的唯一性,可以通过 `setIdentity` 来设置,譬如如果每个节点都是部署在一台机器(一个虚拟机)上,那么可以将identity设置为主机名称
## SPI扩展说明
支持JobLogger,JobQueue等等的SPI扩展
## [和其它解决方案比较](https://qq254963746.gitbooks.io/lts/content/introduce/compareother.html)
## LTS-Admin使用jetty启动(默认),不定期挂掉解决方案
见[issue#389](https://github.com/ltsopensource/light-task-scheduler/issues/389)
# 招人!!!
工作年限 三年以上
学历要求 本科
期望层级 P6(资深Java工程师)/P7(技术专家)
岗位描述
会员平台,负责阿里巴巴集团的用户体系,支持集团内各线业务线用户类需求,支持集团对外合作的用户通和业务通。
包括各个端的用户登录&授权、Session体系、注册、账户管理、账户安全等功能,底层的用户信息服务,会话和凭证管理等等,是集团最核心的产品线之一,每天承载千亿次调用量、峰值千万QPS、以及分布全球的混合云架构等等。
作为软件工程师,你将会在我们的核心产品上工作,这些产品为我们的商业基础设施提供关键功能,
取决于你的兴趣和经验,你可以在如下的一个或多个领域工作:全球化,用户体验,数据安全,机器学习,系统高可用性等等。
1. 独立完成中小型项目的系统分析、设计,并主导完成详细设计和编码的任务,确保项目的进度和质量;
2. 能够在团队中完成code review的任务,确保相关代码的有效性和正确性,并能够通过code review提供相关性能以及稳定性的建议;
3. 参与建设通用、灵活、智能的业务支撑平台,支撑上层多场景的复杂业务。
岗位要求
1. 扎实的java编程基础,熟悉常用的Java开源框架;
2. 具有基于数据库、缓存、分布式存储开发高性能、高可用数据应用的实际经验,熟练掌握LINUX操作系统;
3. 具备良好的识别和设计通用框架及模块的能力;
4. 热爱技术,工作认真、严谨,对系统质量有近乎苛刻的要求意识,善于沟通与团队协作;
5. 具备大型电子商务网站或金融行业核心系统开发、设计工作经验者优先;
6. 具备大数据处理、算法、机器学习类工作经验优先。
感兴趣,可以发简历到 hugui.hg@alibaba-inc.com 欢迎投递
| 0 |
SonarSource/sonarqube | Continuous Inspection | 2011-01-05T11:05:17Z | null | # SonarQube [![Build Status](https://api.cirrus-ci.com/github/SonarSource/sonarqube.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/sonarqube) [![Quality Gate Status](https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=sonarqube&metric=alert_status&token=d95182127dd5583f57578d769b511660601a8547)](https://next.sonarqube.com/sonarqube/dashboard?id=sonarqube)
## Continuous Inspection
SonarQube provides the capability to not only show the health of an application but also to highlight issues newly introduced. With a Quality Gate in place, you can [achieve Clean Code](https://www.sonarsource.com/solutions/clean-code/) and therefore improve code quality systematically.
## Links
- [Website](https://www.sonarsource.com/products/sonarqube)
- [Download](https://www.sonarsource.com/products/sonarqube/downloads)
- [Documentation](https://docs.sonarsource.com/sonarqube)
- [X](https://twitter.com/SonarQube)
- [SonarSource](https://www.sonarsource.com), author of SonarQube
- [Issue tracking](https://jira.sonarsource.com/browse/SONAR/), read-only. Only SonarSourcers can create tickets.
- [Responsible Disclosure](https://community.sonarsource.com/t/responsible-vulnerability-disclosure/9317)
- [Next](https://next.sonarqube.com/sonarqube) instance of the next SonarQube version
## Have Questions or Feedback?
For support questions ("How do I?", "I got this error, why?", ...), please first read the [documentation](https://docs.sonarsource.com/sonarqube) and then head to the [SonarSource Community](https://community.sonarsource.com/c/help/sq/10). The answer to your question has likely already been answered! 🤓
Be aware that this forum is a community, so the standard pleasantries ("Hi", "Thanks", ...) are expected. And if you don't get an answer to your thread, you should sit on your hands for at least three days before bumping it. Operators are not standing by. 😄
## Contributing
If you would like to see a new feature or report a bug, please create a new thread in our [forum](https://community.sonarsource.com/c/sq/10).
Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes.
With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make.
Make sure that you follow our [code style](https://github.com/SonarSource/sonar-developer-toolset#code-style) and all tests are passing (Travis build is executed for each pull request).
Willing to contribute to SonarSource products? We are looking for smart, passionate, and skilled people to help us build world-class code-quality solutions. Have a look at our current [job offers here](https://www.sonarsource.com/company/jobs/)!
## Building
To build sources locally follow these instructions.
### Build and Run Unit Tests
Execute from the project base directory:
./gradlew build
The zip distribution file is generated in `sonar-application/build/distributions/`. Unzip it and start the server by executing:
# on Linux
bin/linux-x86-64/sonar.sh start
# or on MacOS
bin/macosx-universal-64/sonar.sh start
# or on Windows
bin\windows-x86-64\StartSonar.bat
### Open in IDE
If the project has never been built, then build it as usual (see previous section) or use the quicker command:
./gradlew ide
Then open the root file `build.gradle` as a project in IntelliJ or Eclipse.
### Gradle Hints
| ./gradlew command | Description |
| -------------------------------- | ----------------------------------------- |
| `dependencies` | list dependencies |
| `licenseFormat --rerun-tasks` | fix source headers by applying HEADER.txt |
| `wrapper --gradle-version 5.2.1` | upgrade wrapper |
## License
Copyright 2008-2024 SonarSource.
Licensed under the [GNU Lesser General Public License, Version 3.0](https://www.gnu.org/licenses/lgpl.txt)
| 0 |
527515025/springBoot | springboot 框架与其它组件结合如 jpa、mybatis、websocket、security、shiro、cache等 | 2016-11-07T02:13:31Z | null | ## 致歉
由于自己懒以及身体对issuse 解决的不及时。请大家以后提issuse 的时候写清楚 模块名 比如“springboot-SpringSecurity4” 和问题,我会抽时间抓紧解决。
## springboot-SpringSecurity0
包含两部分代码:
* 第一是 博客 springboot+mybatis+SpringSecurity 实现用户角色数据库管理 地址:http://blog.csdn.net/u012373815/article/details/54632176
* 第二是 博客 springBoot+springSecurity验证密码MD5加密 地址:http://blog.csdn.net/u012373815/article/details/54927070
## springboot-SpringSecurity1
* 博客 springBoot+springSecurity 数据库动态管理用户、角色、权限(二) 地址:http://blog.csdn.net/u012373815/article/details/54633046
## springboot-SpringSecurity2
* 博客 springboot+security restful权限控制官方推荐(五) 地址:http://blog.csdn.net/u012373815/article/details/59749385
## springboot-SpringSecurity3
* 博客 springBoot+springSecurity 动态管理Restful风格权限(三) 地址:http://blog.csdn.net/u012373815/article/details/55225079
## springboot-SpringSecurity4
* 实战,项目中正在用
## springboot-WebSocket
包含三部分代码,三部分代码有交合:
* 第一是 博客 spring boot +WebSocket 广播式(一)地址:http://blog.csdn.net/u012373815/article/details/54375195 中所示代码
* 第二是 博客 spring boot +WebSocket 广播式(二)地址:http://blog.csdn.net/u012373815/article/details/54377937 中所示代码
* 第三是 博客 spring boot +WebSocket(三) 点对点式 地址: http://blog.csdn.net/u012373815/article/details/54380476 中所示代码
## springboot-Cache
包含两部分代码:
* 第一部分是 博客 springboot的缓存技术 地址: http://blog.csdn.net/u012373815/article/details/54564076
* 第二部分是 博客 springboot缓存篇(二)-redis 做缓存 地址:http://blog.csdn.net/u012373815/article/details/54572687
## springboot-Cache2
* 是 博客 springboot缓存 之 GuavaCacheManager 地址:http://blog.csdn.net/u012373815/article/details/60468033
## springboot-shiro
* 是博客 springboot集成shiro 实现权限控制 地址:http://blog.csdn.net/u012373815/article/details/57532292
##springboot-shior2
是使用shior 框架调取用户权限服务,进行登录权限验证的例子,其中的用户权限服务没有写,都是用TODO 标示出来了,使用时可以根据各自的用户权限服务进行编码替换
springboot-shiro2 也是和dubbo 的结合例子是 消费者的示例。
## springboot-swagger-ui
* 博客 spring boot +Swagger-ui 自动生成API文档 地址: https://blog.csdn.net/u012373815/article/details/82685962
## springBoot-Quartz
* 博客 springBoot-Quartz 定时任务 地址: https://abelyang.blog.csdn.net/article/details/86740625
## springboot 整合mybatis2
* springboot 整合mybatis2 更简便的整合方式地址: https://abelyang.blog.csdn.net/article/details/89296273
## springboot+Kafka
* kafka 与 sprigboot 的结合,springboot 从Kafka中读取数据的小例子地址: https://abelyang.blog.csdn.net/article/details/89296305
## springboot+es
* Elasticsearch 与 sprigboot 的结合,springboot 操作es的小例子地址: https://abelyang.blog.csdn.net/article/details/89296320
## Springboot多数据源切换
* springboot 多个数据源的配置, 一个springboot 项目操作多个数据库的数据:https://abelyang.blog.csdn.net/article/details/89296341
##springboot-dubbo
该项目是Springboot 和 dubbo 结合的例子,是provider 的示例,提供服务。简单的写了一些用户和权限的接口没有写的很完整,主要是为了提现dubbo 服务
Springboot-shiro2 也是和dubbo 的结合例子是 消费者的示例。
##未完待续。。。
| 0 |
MarquezProject/marquez | Collect, aggregate, and visualize a data ecosystem's metadata | 2018-07-05T22:43:20Z | null | <div align="center">
<img src="./docs/assets/images/marquez-logo.png" width="500px" />
<a href="https://lfaidata.foundation/projects">
<img src="./docs/assets/images/lfaidata-project-badge-incubation-black.png" width="125px" />
</a>
</div>
Marquez is an open source **metadata service** for the **collection**, **aggregation**, and **visualization** of a data ecosystem's metadata. It maintains the provenance of how datasets are consumed and produced, provides global visibility into job runtime and frequency of dataset access, centralization of dataset lifecycle management, and much more. Marquez was released and open sourced by [WeWork](https://www.wework.com).
## Badges
[![CircleCI](https://circleci.com/gh/MarquezProject/marquez/tree/main.svg?style=shield)](https://circleci.com/gh/MarquezProject/marquez/tree/main)
[![codecov](https://codecov.io/gh/MarquezProject/marquez/branch/main/graph/badge.svg)](https://codecov.io/gh/MarquezProject/marquez/branch/main)
[![status](https://img.shields.io/badge/status-active-brightgreen.svg)](#status)
[![Slack](https://img.shields.io/badge/slack-chat-blue.svg)](https://join.slack.com/t/marquezproject/shared_invite/zt-29w4n8y45-Re3B1KTlZU5wO6X6JRzGmA)
[![license](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](https://raw.githubusercontent.com/MarquezProject/marquez/main/LICENSE)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
[![maven](https://img.shields.io/maven-central/v/io.github.marquezproject/marquez-api.svg)](https://search.maven.org/search?q=g:io.github.marquezproject)
[![docker](https://img.shields.io/badge/docker-hub-blue.svg?style=flat)](https://hub.docker.com/r/marquezproject/marquez)
[![Known Vulnerabilities](https://snyk.io/test/github/MarquezProject/marquez/badge.svg)](https://snyk.io/test/github/MarquezProject/marquez)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5160/badge)](https://bestpractices.coreinfrastructure.org/projects/5160)
## Status
Marquez is an [LF AI & Data Foundation](https://lfaidata.foundation/projects/marquez) incubation project under active development, and we'd love your help!
## Adopters
Want to be added? Send a pull request our way!
* [Astronomer](https://astronomer.io)
* [Datakin](https://datakin.com)
* [Northwestern Mutual](https://www.northwesternmutual.com)
## Try it!
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/MarquezProject/marquez)
## Quickstart
Marquez provides a simple way to collect and view _dataset_, _job_, and _run_ metadata using [OpenLineage](https://openlineage.io). The easiest way to get up and running is with Docker. From the base of the Marquez repository, run:
```
$ ./docker/up.sh
```
> **Tip:** Use the `--build` flag to build images from source, and/or `--seed` to start Marquez with sample lineage metadata. For a more complete example using the sample metadata, please follow our [quickstart](https://marquezproject.github.io/marquez/quickstart.html) guide.
> **Note:** Port 5000 is now reserved for MacOS. If running locally on MacOS, you can run `./docker/up.sh --api-port 9000` to configure the API to listen on port 9000 instead. Keep in mind that you will need to update the URLs below with the appropriate port number.
**`WEB UI`**
You can open [http://localhost:3000](http://localhost:3000) to begin exploring the Marquez Web UI. The UI enables you to discover dependencies between jobs and the datasets they produce and consume via the lineage graph, view run metadata of current and previous job runs, and much more!
<p align="center">
<img src="./web/docs/demo.gif">
</p>
**`HTTP API`**
The Marquez [HTTP API](https://marquezproject.github.io/marquez/openapi.html) listens on port `5000` for all calls and port `5001` for the admin interface. The admin interface exposes helpful endpoints like `/healthcheck` and `/metrics`. To verify the HTTP API server is running and listening on `localhost`, browse to [http://localhost:5001](http://localhost:5001). To begin collecting lineage metadata as OpenLineage events, use the [LineageAPI](https://marquezproject.github.io/marquez/openapi.html#tag/Lineage/paths/~1lineage/post) or an OpenLineage [integration](https://openlineage.io/docs/integrations/about).
> **Note:** By default, the HTTP API does not require any form of authentication or authorization.
**`GRAPHQL`**
To explore metadata via graphql, browse to [http://localhost:5000/graphql-playground](http://localhost:5000/graphql-playground). The graphql endpoint is currently in _beta_ and is located at [http://localhost:5000/api/v1-beta/graphql](http://localhost:5000/api/v1-beta/graphql).
## Documentation
We invite everyone to help us improve and keep documentation up to date. Documentation is maintained in this repository and can be found under [`docs/`](https://github.com/MarquezProject/marquez/tree/main/docs).
> **Note:** To begin collecting metadata with Marquez, follow our [quickstart](https://marquezproject.github.io/marquez/quickstart.html) guide. Below you will find the steps to get up and running from source.
## Versions and OpenLineage Compatibility
Versions of Marquez are compatible with OpenLineage unless noted otherwise. We ensure backward compatibility with a newer version of Marquez by recording events with an older OpenLineage specification version. **We strongly recommend understanding how the OpenLineage specification is** [versioned](https://github.com/OpenLineage/OpenLineage/blob/main/spec/Versioning.md) **and published**.
| **Marquez** | **OpenLineage** | **Status** |
|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------|---------------|
| [`UNRELEASED`](https://github.com/MarquezProject/marquez/blob/main/CHANGELOG.md#unreleased) | [`1-0-5`](https://openlineage.io/spec/1-0-5/OpenLineage.json) | `CURRENT` |
| [`0.44.0`](https://github.com/MarquezProject/marquez/blob/0.43.0/CHANGELOG.md#0430---2023-12-15) | [`1-0-5`](https://openlineage.io/spec/1-0-5/OpenLineage.json) | `RECOMMENDED` |
| [`0.43.1`](https://github.com/MarquezProject/marquez/blob/0.42.0/CHANGELOG.md#0420---2023-10-17) | [`1-0-5`](https://openlineage.io/spec/1-0-0/OpenLineage.json) | `MAINTENANCE` |
> **Note:** The [`openlineage-python`](https://pypi.org/project/openlineage-python) and [`openlineage-java`](https://central.sonatype.com/artifact/io.openlineage/openlineage-java) libraries will a higher version than the OpenLineage [specification](https://github.com/OpenLineage/OpenLineage/tree/main/spec) as they have different version requirements.
We currently maintain three categories of compatibility: `CURRENT`, `RECOMMENDED`, and `MAINTENANCE`. When a new version of Marquez is released, it's marked as `RECOMMENDED`, while the previous version enters `MAINTENANCE` mode (which gets bug fixes whenever possible). The unreleased version of Marquez is marked `CURRENT` and does not come with any guarantees, but is assumed to remain compatible with OpenLineage, although surprises happen and there maybe rare exceptions.
## Modules
Marquez uses a _multi_-project structure and contains the following modules:
* [`api`](https://github.com/MarquezProject/marquez/tree/main/api): core API used to collect metadata
* [`web`](https://github.com/MarquezProject/marquez/tree/main/web): web UI used to view metadata
* [`clients`](https://github.com/MarquezProject/marquez/tree/main/clients): clients that implement the HTTP [API](https://marquezproject.github.io/marquez/openapi.html)
* [`chart`](https://github.com/MarquezProject/marquez/tree/main/chart): helm chart
> **Note:** The `integrations` module was removed in [`0.21.0`](https://github.com/MarquezProject/marquez/blob/main/CHANGELOG.md#removed), so please use an OpenLineage [integration](https://openlineage.io/integration) to collect lineage events easily.
## Requirements
* [Java 17](https://adoptium.net)
* [PostgreSQL 14](https://www.postgresql.org/download)
> **Note:** To connect to your running PostgreSQL instance, you will need the standard [`psql`](https://www.postgresql.org/docs/9.6/app-psql.html) tool.
## Building
To build the entire project run:
```bash
./gradlew build
```
The executable can be found under `api/build/libs/`
## Configuration
To run Marquez, you will have to define `marquez.yml`. The configuration file is passed to the application and used to specify your database connection. The configuration file creation steps are outlined below.
### Step 1: Create Database
When creating your database using [`createdb`](https://www.postgresql.org/docs/12/app-createdb.html), we recommend calling it `marquez`:
```bash
$ createdb marquez
```
### Step 2: Create `marquez.yml`
With your database created, you can now copy [`marquez.example.yml`](https://github.com/MarquezProject/marquez/blob/main/marquez.example.yml):
```
$ cp marquez.example.yml marquez.yml
```
You will then need to set the following environment variables (we recommend adding them to your `.bashrc`): `POSTGRES_DB`, `POSTGRES_USER`, and `POSTGRES_PASSWORD`. The environment variables override the equivalent option in the configuration file.
By default, Marquez uses the following ports:
* TCP port `8080` is available for the HTTP API server.
* TCP port `8081` is available for the admin interface.
> **Note:** All of the configuration settings in `marquez.yml` can be specified either in the configuration file or in an environment variable.
## Running the [HTTP API](https://github.com/MarquezProject/marquez/blob/main/src/main/java/marquez/MarquezApp.java) Server
```bash
$ ./gradlew :api:runShadow
```
Marquez listens on port `8080` for all API calls and port `8081` for the admin interface. To verify the HTTP API server is running and listening on `localhost`, browse to [http://localhost:8081](http://localhost:8081). We encourage you to familiarize yourself with the [data model](https://marquezproject.github.io/marquez/#data-model) and [APIs](https://marquezproject.github.io/marquez/openapi.html) of Marquez. To run the web UI, please follow the steps outlined [here](https://github.com/MarquezProject/marquez/tree/main/web#development).
> **Note:** By default, the HTTP API does not require any form of authentication or authorization.
## Related Projects
* [`OpenLineage`](https://github.com/OpenLineage/OpenLineage): an open standard for metadata and lineage collection
## Getting Involved
* Website: https://marquezproject.ai
* Source: https://github.com/MarquezProject/marquez
* Chat: [MarquezProject Slack](https://join.slack.com/t/marquezproject/shared_invite/zt-29w4n8y45-Re3B1KTlZU5wO6X6JRzGmA)
* Twitter: [@MarquezProject](https://twitter.com/MarquezProject)
## Contributing
See [CONTRIBUTING.md](https://github.com/MarquezProject/marquez/blob/main/CONTRIBUTING.md) for more details about how to contribute.
## Reporting a Vulnerability
If you discover a vulnerability in the project, please open an issue and attach the "security" label.
----
SPDX-License-Identifier: Apache-2.0
Copyright 2018-2023 contributors to the Marquez project.
| 0 |
apache/maven | Apache Maven core | 2009-05-21T03:22:03Z | null | <!---
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.
-->
Apache Maven
============
[![ASF Jira](https://img.shields.io/endpoint?url=https%3A%2F%2Fmaven.apache.org%2Fbadges%2Fasf_jira-MNG.json)][jira]
[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)][license]
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven/apache-maven.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven/apache-maven)
[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/maven/maven/README.md)
[![Jenkins Status](https://img.shields.io/jenkins/s/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/master.svg?)][build]
[![Jenkins tests](https://img.shields.io/jenkins/t/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/master.svg?)][test-results]
Apache Maven is a software project management and comprehension tool. Based on
the concept of a project object model (POM), Maven can manage a project's
build, reporting and documentation from a central piece of information.
If you think you have found a bug, please file an issue in the [Maven Issue Tracker][jira].
Documentation
-------------
More information can be found on [Apache Maven Homepage][maven-home].
Questions related to the usage of Maven should be posted on
the [Maven User List][users-list].
Where can I get the latest release?
-----------------------------------
You can download the release source from our [download page][maven-download].
Contributing
------------
If you are interested in the development of Maven, please consult the
documentation first and afterward you are welcome to join the developers
mailing list to ask questions or discuss new ideas/features/bugs etc.
Take a look into the [contribution guidelines](CONTRIBUTING.md).
License
-------
This code is under the [Apache License, Version 2.0, January 2004][license].
See the [`NOTICE`](./NOTICE) file for required notices and attributions.
Donations
---------
Do you like Apache Maven? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
Quick Build
-------
If you want to bootstrap Maven, you'll need:
- Java 17+
- Maven 3.6.3 or later
- Run Maven, specifying a location into which the completed Maven distro should be installed:
```
mvn -DdistributionTargetDir="$HOME/app/maven/apache-maven-4.0.x-SNAPSHOT" clean package
```
[home]: https://maven.apache.org/
[jira]: https://issues.apache.org/jira/projects/MNG/
[license]: https://www.apache.org/licenses/LICENSE-2.0
[build]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/master/
[test-results]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/master/lastCompletedBuild/testReport/
[build-status]: https://img.shields.io/jenkins/s/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/master.svg?
[build-tests]: https://img.shields.io/jenkins/t/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/master.svg?
[maven-home]: https://maven.apache.org/
[maven-download]: https://maven.apache.org/download.cgi
[users-list]: https://maven.apache.org/mailing-lists.html
[dev-ml-list]: https://www.mail-archive.com/dev@maven.apache.org/
[code-style]: http://maven.apache.org/developers/conventions/code.html
[core-it]: https://maven.apache.org/core-its/core-it-suite/
[building-maven]: https://maven.apache.org/guides/development/guide-building-maven.html
[cla]: https://www.apache.org/licenses/#clas
| 0 |
google/grafika | Grafika test app | 2013-12-19T18:36:53Z | null | Grafika
=======
Welcome to Grafika, a dumping ground for Android graphics & media hacks.
Grafika is:
- A collection of hacks exercising graphics features.
- An SDK app, developed for API 18 (Android 4.3). While some of the code
may work with older versions of Android, some sporatic work is done to
support them.
- Open source (Apache 2 license), copyright by Google. So you can use the
code according to the terms of the license (see "LICENSE").
- A perpetual work-in-progress. It's updated whenever the need arises.
However:
- It's not stable.
- It's not polished or well tested. Expect the UI to be ugly and awkward.
- It's not intended as a demonstration of the proper way to do things.
The code may handle edge cases poorly or not at all. Logging is often
left enabled at a moderately verbose level.
- It's barely documented.
- It's not part of the Android Open Source Project. We cannot accept
contributions to Grafika, even if you have an AOSP CLA on file.
- It's NOT AN OFFICIAL GOOGLE PRODUCT. It's just a bunch of stuff that
got thrown together on company time and equipment.
- It's generally just not supported.
To some extent, Grafika can be treated as a companion to the
[Android System-Level Graphics Architecture](http://source.android.com/devices/graphics/architecture.html)
document. The doc explains the technology that the examples rely on, and uses some of
Grafika's activities as examples. If you want to understand how the code here works, start
by reading that.
There is some overlap with the code on http://www.bigflake.com/mediacodec/.
The code there largely consists of "headless" CTS tests, which are designed
to be robust, self-contained, and largely independent of the usual app
lifecycle issues. Grafika is a conventional app, and makes an effort to
handle app issues correctly (like not doing lots of work on the UI thread).
Features are added to Grafika as the need arises, often in response to
developer complaints about correctness or performance problems in the
platform (either to confirm that the problems exist, or demonstrate an
approach that works).
There are two areas where some amount of care is taken:
- Thread safety. It's really easy to get threads crossed in subtly dangerous ways when
working with the media classes. (Read the
[Android SMP Primer](http://developer.android.com/training/articles/smp.html)
for a detailed introduction to the problem.) GL/EGL's reliance on thread-local storage
doesn't help. Threading issues are frequently called out in comments in the source code.
- Garbage collection. GC pauses cause jank. Ideally, none of the activities will do any
allocations while in a "steady state". Allocations may occur while changing modes,
e.g. starting or stopping recording.
All code is written in the Java programming language -- the NDK is not used.
The first time Grafika starts, two videos are generated (gen-eight-rects, gen-sliders).
If you want to experiment with the generation code, you can cause them to be re-generated
from the main activity menu ("Regenerate content").
Current features
----------------
[* Play video (TextureView)](app/src/main/java/com/android/grafika/PlayMovieActivity.java). Plays the video track from an MP4 file.
- Only sees files in `/data/data/com.android.grafika/files/`. All of the activities that
create video leave their files there. You'll also find two automatically-generated videos
(gen-eight-rects.mp4 and gen-slides.mp4).
- By default the video is played once, at the same rate it was recorded. You can use the
checkboxes to loop playback and/or play the frames at a fixed rate of 60 FPS.
- Uses a `TextureView` for output.
- Name starts with an asterisk so it's at the top of the list of activities.
[Continuous capture](app/src/main/java/com/android/grafika/ContinuousCaptureActivity.java). Stores video in a circular buffer, saving it when you hit the "capture" button. (Formerly "Constant capture".)
- Currently hard-wired to try to capture 7 seconds of video from the camera at 6MB/sec,
preferably 15fps 720p. That requires a buffer size of about 5MB.
- The time span of frames currently held in the buffer is displayed. The actual
time span saved when you hit "capture" will be slightly less than what is shown because
we have to start the output on a sync frame, which are configured to appear once per second.
- Output is a video-only MP4 file ("constant-capture.mp4"). Video is always 1280x720, which
usually matches what the camera provides; if it doesn't, the recorded video will have the
wrong aspect ratio.
[Double decode](app/src/main/java/com/android/grafika/DoubleDecodeActivity.java). Decodes two video streams side-by-side to a pair of `TextureViews`.
- Plays the two auto-generated videos. Note they play at different rates.
- The video decoders don't stop when the screen is rotated. We retain the `SurfaceTexture`
and just attach it to the new `TextureView`. Useful for avoiding expensive codec reconfigures.
The decoders *do* stop if you leave the activity, so we don't tie up hardware codec
resources indefinitely. (It also doesn't stop if you turn the screen off with the power
button, which isn't good for the battery, but might be handy if you're feeding an external
display or your player also handles audio.)
- Unlike most activities in Grafika, this provides different layouts for portrait and landscape.
The videos are scaled to fit.
[Hardware scaler exerciser](app/src/main/java/com/android/grafika/HardwareScalerActivity.java). Shows GL rendering with on-the-fly surface size changes.
- The motivation behind the feature this explores is described in a developer blog post:
http://android-developers.blogspot.com/2013/09/using-hardware-scaler-for-performance.html
- You will see one frame rendered incorrectly when changing sizes. This is because the
render size is adjusted in the "surface changed" callback, but the surface's size doesn't
actually change until we latch the next buffer. This is straightforward to fix (left as
an exercise for the reader).
[Live camera (TextureView)](app/src/main/java/com/android/grafika/LiveCameraActivity.java). Directs the camera preview to a `TextureView`.
- This comes more or less verbatim from the [TextureView](http://developer.android.com/reference/android/view/TextureView.html) documentation.
- Uses the default (rear-facing) camera. If the device has no default camera (e.g.
Nexus 7 (2012)), the Activity will crash.
[Multi-surface test](app/src/main/java/com/android/grafika/MultiSurfaceTest.java). Simple activity with three overlapping SurfaceViews, one marked secure.
- Useful for examining HWC behavior with multiple static layers, and
screencap / screenrecord behavior with a secure surface. (If you record the screen one
of the circles should be missing, and capturing the screen should just show black.)
- If you tap the "bounce" button, the circle on the non-secure layer will animate. It will
update as quickly as possible, which may be slower than the display refresh rate because
the circle is rendered in software. The frame rate will be reported in logcat.
[Play video (SurfaceView)](app/src/main/java/com/android/grafika/PlayMovieSurfaceActivity.java). Plays the video track from an MP4 file.
- Works very much like "Play video (TextureView)", though not all features are present.
See the class comment for a list of advantages to using SurfaceView.
[Record GL app](app/src/main/java/com/android/grafika/RecordFBOActivity.java). Simultaneously draws to the display and to a video encoder with OpenGL ES, using framebuffer objects to avoid re-rendering.
- It can write to the video encoder three different ways: (1) draw twice; (2) draw offscreen and
blit twice; (3) draw onscreen and blit framebuffer. #3 doesn't work yet.
- The renderer is trigged by Choreographer to update every vsync. If we get too far behind,
we will skip frames. This is noted by an on-screen drop counter and a border flash. You
generally won't see any stutter in the animation, because we don't skip the object
movement, just the render.
- The encoder is fed every-other frame, so the recorded output will be ~30fps rather than ~60fps
on a typical device.
- The recording is letter- or pillar-boxed to maintain an aspect ratio that matches the
display, so you'll get different results from recording in landscape vs. portrait.
- The output is a video-only MP4 file ("fbo-gl-recording.mp4").
[Record Screen using MediaProjectionManager](app/src/main/java/com/android/grafika/ScreenRecordActivity.java).
Records the screen to a movie using the MediaProjectionManager. This API
requires API level 23 (Marshmallow) or greater.
[Scheduled swap](app/src/main/java/com/android/grafika/ScheduledSwapActivity.java). Exercises a SurfaceFlinger feature that allows you to submit buffers to be displayed at a specific time.
- Requires API 19 (Android 4.4 "KitKat") to do what it's supposed to. The current implementation
doesn't really look any different on API 18 to the naked eye.
- You can configure the frame delivery timing (e.g. 24fps uses a 3-2 pattern) and how far
in advance frames are scheduled. Selecting "ASAP" disables scheduling.
- Use systrace with tags `sched gfx view --app=com.android.grafika` to observe the effects.
- The moving square changes colors when the app is unhappy about timing.
[Show + capture camera](app/src/main/java/com/android/grafika/CameraCaptureActivity.java). Attempts to record at 720p from the front-facing camera, displaying the preview and recording it simultaneously.
- Use the record button to toggle recording on and off.
- Recording continues until stopped. If you back out and return, recording will start again,
with a real-time gap. If you try to play the movie while it's recording, you will see
an incomplete file (and probably cause the play movie activity to crash).
- The recorded video is scaled to 640x480, so it will probably look squished. A real app
would either set the recording size equal to the camera input size, or correct the aspect
ratio by letter- or pillar-boxing the frames as they are rendered to the encoder.
- You can select a filter to apply to the preview. It does not get applied to the recording.
The shader used for the filters is not optimized, but seems to perform well on most devices
(the original Nexus 7 (2012) being a notable exception). Demo
here: http://www.youtube.com/watch?v=kH9kCP2T5Gg
- The output is a video-only MP4 file ("camera-test.mp4").
[Simple Canvas in TextureView](app/src/main/java/com/android/grafika/TextureViewCanvasActivity.java). Exercises software rendering to a `TextureView` with a `Canvas`.
- Renders as quickly as possible. Because it's using software rendering, this will likely
run more slowly than the "Simple GL in TextureView" activity.
- Toggles the use of a dirty rect every 64 frames. When enabled, the dirty rect extends
horizontally across the screen.
[Simple GL in TextureView](app/src/main/java/com/android/grafika/TextureViewGLActivity.java). Demonstates simple use of GLES in a `TextureView`, rather than a `GLSurfaceView`.
- Renders as quickly as possible. On most devices it will exceed 60fps and flicker wildly,
but in 4.4 ("KitKat") a bug prevents the system from dropping frames.
[Texture from Camera](app/src/main/java/com/android/grafika/TextureFromCameraActivity.java). Renders Camera preview output with a GLES texture.
- Adjust the sliders to set the size, rotation, and zoom. Touch anywhere else to center
the rect at the point of the touch.
[Color bars](app/src/main/java/com/android/grafika/ColorBarActivity.java). Displays RGB color bars.
[OpenGL ES Info](app/src/main/java/com/android/grafika/GlesInfoActivity.java). Dumps version info and extension lists.
- The "Save" button writes a copy of the output to the app's file area.
[glTexImage2D speed test](app/src/main/java/com/android/grafika/TextureUploadActivity.java). Simple, unscientific measurement of the time required to upload a 512x512 RGBA texture with `glTexImage2D()`.
[glReadPixels speed test](app/src/main/java/com/android/grafika/ReadPixelsActivity.java). Simple, unscientific measurement of the time required for `glReadPixels()` to read a 720p frame.
Known issues
------------
- Nexus 4 running Android 4.3 (JWR67E): "Show + capture camera" crashes if you select one of
the filtered modes. Appears to be a driver bug (Adreno "Internal compiler error").
Feature & fix ideas
-------------------
In no particular order.
- Stop using AsyncTask for anything where performance or latency matters.
- Add a "fat bits" viewer for camera (single SurfaceView; left half has live camera feed
and a pan rect, right half has 8x pixels)
- Change the "Simple GL in TextureView" animation. Or add an epilepsy warning.
- Cross-fade from one video to another, recording the result. Allow specification of
the resolution (maybe QVGA, 720p, 1080p) and generate appropriately.
- Add features to the video player, like a slider for random access, and buttons for
single-frame advance / rewind (requires seeking to nearest sync frame and decoding frames
until target is reached).
- Convert a series of PNG images to video.
- Play continuous video from a series of MP4 files with different characteristics. Will
probably require "preloading" the next movie to keep playback seamless.
- Experiment with alternatives to glReadPixels(). Add a PBO speed test. (Doesn't seem
to be a way to play with eglCreateImageKHR from Java.)
- Do something with ImageReader class (req API 19).
- Figure out why "double decode" playback is sometimes janky.
- Add fps indicator to "Simple GL in TextureView".
- Capture audio from microphone, record + mux it.
- Enable preview on front/back cameras simultaneously, display them side-by-side. (This
appears to be impossible except on specific devices.)
- Add a test that renders to two different TextureViews using different EGLContexts
from a single renderer thread.
| 0 |
apache/poi | Mirror of Apache POI | 2009-05-21T01:15:15Z | null | null | 0 |
react-native-linear-gradient/react-native-linear-gradient | A <LinearGradient /> component for react-native | 2015-03-31T17:44:40Z | null | # react-native-linear-gradient
A `<LinearGradient>` element for React Native
[![ci][1]][2]
[![npm version][3]][4]
[![npm downloads][5]][4]
<p align="center">
<img src="https://github.com/react-native-linear-gradient/react-native-linear-gradient/assets/743291/8ff2a78b-f0b1-463a-aa5b-555df2e71360" width="300"> <img src="https://github.com/react-native-linear-gradient/react-native-linear-gradient/assets/743291/9c738be3-6fba-43d5-9c9f-1db1c10fd377" width="300">
</p>
## Table of Contents
- [Installation](#installation)
- [Usage and Examples](#examples)
- [Props](#props)
- [Example App](#an-example-app)
- [Troubleshooting](#troubleshooting)
- [Other Platforms](#other-platforms)
## Installation
```sh
yarn add react-native-linear-gradient
```
Or, using npm: `npm install react-native-linear-gradient`
## Examples
[react-native-login](https://github.com/brentvatne/react-native-login) is a
legacy component which showcases the use of `<LinearGradient>`.
### Simple
The following code will produce something like this:
![Example code result](https://raw.githubusercontent.com/react-native-community/react-native-linear-gradient/HEAD/images/example.png)
```javascript
import LinearGradient from 'react-native-linear-gradient';
// Within your render function
<LinearGradient colors={['#4c669f', '#3b5998', '#192f6a']} style={styles.linearGradient}>
<Text style={styles.buttonText}>
Sign in with Facebook
</Text>
</LinearGradient>
// Later on in your styles..
var styles = StyleSheet.create({
linearGradient: {
flex: 1,
paddingLeft: 15,
paddingRight: 15,
borderRadius: 5
},
buttonText: {
fontSize: 18,
fontFamily: 'Gill Sans',
textAlign: 'center',
margin: 10,
color: '#ffffff',
backgroundColor: 'transparent',
},
});
```
### Horizontal gradient
Using the styles from above, set `start` and `end` like this to make the gradient go from left to right, instead of from top to bottom:
```javascript
<LinearGradient start={{x: 0, y: 0}} end={{x: 1, y: 0}} colors={['#4c669f', '#3b5998', '#192f6a']} style={styles.linearGradient}>
<Text style={styles.buttonText}>
Sign in with Facebook
</Text>
</LinearGradient>
```
### Text gradient (iOS)
On iOS you can use the `MaskedViewIOS` to display text with a gradient. The trick here is to render the text twice; once for the mask, and once to let the gradient have the correct size (hence the `opacity: 0`):
```jsx
<MaskedViewIOS maskElement={<Text style={styles.text} />}>
<LinearGradient colors={['#f00', '#0f0']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }}>
<Text style={[styles.text, { opacity: 0 }]} />
</LinearGradient>
</MaskedViewIOS>
```
### Animated Gradient
Check out the [example app](https://github.com/react-native-linear-gradient/react-native-linear-gradient/tree/HEAD/example/) (`git clone` this project, cd into it, npm install, open in Xcode and run) to see how this is done:
![Example with extra props](https://raw.githubusercontent.com/react-native-community/react-native-linear-gradient/HEAD/images/example-animated.gif)
*This gif was created using [licecap](http://www.cockos.com/licecap/) - a great piece of free OSS*
### Transparent Gradient
The use of `transparent` color will most likely not lead to the expected result. `transparent` is actually a transparent black color (`rgba(0, 0, 0, 0)`). If you need a gradient in which the color is "fading", you need to have the same color with changing alpha channel. Example:
```jsx
// RGBA
<LinearGradient colors={['rgba(255, 255, 255, 0)', 'rgba(255, 255, 255, 1)']} {...otherGradientProps} />
// Hex
<LinearGradient colors={['#FFFFFF00', '#FFFFFF']} {...otherGradientProps} />
```
## Props
In addition to regular `View` props, you can also provide additional props to customize your gradient look:
#### colors
An array of at least two color values that represent gradient colors. Example: `['red', 'blue']` sets gradient from red to blue.
#### start
An optional object of the following type: `{ x: number, y: number }`. Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. Example: `{ x: 0.1, y: 0.1 }` means that the gradient will start 10% from the top and 10% from the left.
#### end
Same as start, but for the end of the gradient.
#### locations
An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in `colors` prop. Example: `[0.1, 0.75, 1]` means that first color will take 0% - 10%, second color will take 10% - 75% and finally third color will occupy 75% - 100%.
```javascript
<LinearGradient
start={{x: 0.0, y: 0.25}} end={{x: 0.5, y: 1.0}}
locations={[0,0.5,0.6]}
colors={['#4c669f', '#3b5998', '#192f6a']}
style={styles.linearGradient}>
<Text style={styles.buttonText}>
Sign in with Facebook
</Text>
</LinearGradient>
```
![Example with extra props](https://raw.githubusercontent.com/react-native-community/react-native-linear-gradient/HEAD/images/example-other-props.png)
#### useAngle / angle / angleCenter
You may want to achieve an angled gradient effect, similar to those in image editors like Photoshop.
One issue is that you have to calculate the angle based on the view's size, which only happens asynchronously and will cause unwanted flickr.
In order to do that correctly you can set `useAngle={true} angle={45} angleCenter={{x:0.5,y:0.5}}`, to achieve a gradient with a 45 degrees angle, with its center positioned in the view's exact center.
`useAngle` is used to turn on/off angle based calculation (as opposed to `start`/`end`).
`angle` is the angle in degrees.
`angleCenter` is the center point of the angle (will control the weight and stretch of the gradient like it does in photoshop.
## An example app
You can see this component in action in [brentvatne/react-native-login](https://github.com/brentvatne/react-native-login/blob/HEAD/App/Screens/LoginScreen.js#L58-L62).
## Troubleshooting
### iOS build fails: library not found, "BVLinearGradient" was not found in the UIManager
1. Ensure to run `pod install` before running the app on iOS
2. Ensure you use `ios/**.xcworkspace` file instead of `ios./**.xcodeproj`
### Other
Clearing build caches and reinstalling dependencies sometimes solve some issues. Try next steps:
1. Reinstalling `node_modules` with `rm -rf node_modules && yarn`
2. Clearing Android Gradle cache with `(cd android && ./gradlew clean)`
3. Reinstalling iOS CocoaPods with `(cd ios && rm -rf ./ios/Pods/**) && npx pod-install`
4. Clearing Xcode Build cache (open Xcode and go to Product -> Clean Build Folder)
For other troubleshooting issues, go to [React Native Troubleshooting](https://reactnative.dev/docs/troubleshooting.html)
## Other platforms
- Web: [react-native-web-community/react-native-web-linear-gradient](https://github.com/react-native-web-community/react-native-web-linear-gradient)
## License
MIT
[1]: https://github.com/react-native-linear-gradient/react-native-linear-gradient/workflows/ci/badge.svg
[2]: https://github.com/react-native-linear-gradient/react-native-linear-gradient/actions
[3]: https://img.shields.io/npm/v/react-native-linear-gradient.svg
[4]: https://www.npmjs.com/package/react-native-linear-gradient
[5]: https://img.shields.io/npm/dm/react-native-linear-gradient.svg
| 0 |
oracle/opengrok | OpenGrok is a fast and usable source code search and cross reference engine, written in Java | 2013-01-07T11:49:18Z | null |
Copyright (c) 2006, 2024 Oracle and/or its affiliates. All rights reserved.
# OpenGrok - a wicked fast source browser
[![Github actions build](https://github.com/oracle/opengrok/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/oracle/opengrok/actions)
[![Coverage status](https://sonarcloud.io/api/project_badges/measure?project=org.opengrok%3Aopengrok-top&metric=coverage)](https://sonarcloud.io/summary/new_code?id=org.opengrok%3Aopengrok-top)
[![SonarQube status](https://sonarcloud.io/api/project_badges/measure?project=org.opengrok%3Aopengrok-top&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.opengrok%3Aopengrok-top)
[![License](https://img.shields.io/badge/License-CDDL%201.0-blue.svg)](https://opensource.org/licenses/CDDL-1.0)
- [OpenGrok - a wicked fast source browser](#opengrok---a-wicked-fast-source-browser)
- [1. Introduction](#1-introduction)
- [2. OpenGrok install and setup](#2-Installation)
- [3. Information for developers](#3-information-for-developers)
- [4. Authors](#4-authors)
- [5. Contact us](#5-contact-us)
- [6. Run as container](#6-run-as-container)
## 1. Introduction
OpenGrok is a fast and usable source code search and cross reference
engine, written in Java. It helps you search, cross-reference and navigate
your source tree. It can understand various program file formats and
version control histories of many source code management systems.
Official page of the project is on:
<https://oracle.github.io/opengrok/>
## 2. Installation
See https://github.com/oracle/opengrok/wiki/How-to-setup-OpenGrok
### 2. 1. Updating
OpenGrok uses [semantic versioning](https://semver.org/) and the version components further indicate more details about updating to newer version. The version scheme is *major.minor.micro* and change in any component is interpreted as:
- major - major backwards incompatible update, will require full reindex as well as configuration changes
- minor - full clean reindex of your repositories is needed (e. g. index format has changed)
- micro - redeploy web application
Generally it is possible to go backward only within the micro version.
## 3. Information for developers
See https://github.com/oracle/opengrok/wiki/Developer-intro and https://github.com/oracle/opengrok/wiki/Developers
## 4. Authors
The project has been originally conceived in [Sun Microsystems](https://en.wikipedia.org/wiki/Sun_Microsystems) by Chandan B.N.
For full list of contributors see https://github.com/oracle/opengrok/graphs/contributors
## 5. Contact us
Use the [Github Discussions](https://github.com/oracle/opengrok/discussions).
## 6. Run as container
You can run OpenGrok as a Docker container as described [here](docker/README.md).
## Contributing
This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)
## Security
Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process
## License
Copyright (c) 2006, 2024 Oracle and/or its affiliates.
| 0 |
openjdk/loom | https://openjdk.org/projects/loom | 2019-04-18T06:05:24Z | null | # Welcome to the JDK!
For build instructions please see the
[online documentation](https://openjdk.org/groups/build/doc/building.html),
or either of these files:
- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)
See <https://openjdk.org/> for more information about the OpenJDK
Community and the JDK and see <https://bugs.openjdk.org> for JDK issue
tracking.
| 0 |
c0ny1/FastjsonExploit | Fastjson vulnerability quickly exploits the framework(fastjson漏洞快速利用框架) | 2019-07-20T04:55:57Z | null | # FastjonExploit | Fastjson漏洞快速利用框架
## 0x01 Introduce
FastjsonExploit是一个Fastjson漏洞快速漏洞利用框架,主要功能如下:
1. 一键生成利用payload,并启动所有利用环境。
2. 管理Fastjson各种payload(当然是立志整理所有啦,目前6个类,共11种利用及绕过)
## 0x02 Buiding
Requires Java 1.7+ and Maven 3.x+
```mvn clean package -DskipTests```
## 0x03 Usage
```
.---- -. -. . . .
( .',----- - - ' '
\_/ ;--:-\ __--------------------__
__U__n_^_''__[. |ooo___ | |_!_||_!_||_!_||_!_| |
c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| |
,_\___________'_|,L______],|______________________|
/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o)
FastjsonExploit is a Fastjson library vulnerability exploit framework
Author:c0ny1<root@gv7.me>
Usage: java -jar Fastjson-[version]-all.jar [payload] [option] [command]
Exp01: java -jar FastjsonExploit-[version].jar JdbcRowSetImpl1 rmi://127.0.0.1:1099/Exploit "cmd:calc"
Exp02: java -jar FastjsonExploit-[version].jar JdbcRowSetImpl1 ldap://127.0.0.1:1232/Exploit "code:custom_code.java"
Exp03: java -jar FastjsonExploit-[version].jar TemplatesImpl1 "cmd:calc"
Exp04: java -jar FastjsonExploit-[version].jar TemplatesImpl1 "code:custom_code.java"
Available payload types:
Payload PayloadType VulVersion Dependencies
------- ----------- ---------- ------------
BasicDataSource1 local 1.2.2.1-1.2.2.4 tomcat-dbcp:7.x, tomcat-dbcp:9.x, commons-dbcp:1.4
BasicDataSource2 local 1.2.2.1-1.2.2.4 tomcat-dbcp:7.x, tomcat-dbcp:9.x, commons-dbcp:1.4
JdbcRowSetImpl1 jndi 1.2.2.1-1.2.2.4
JdbcRowSetImpl2 jndi 1.2.2.1-1.2.4.1 Fastjson 1.2.41 bypass
JdbcRowSetImpl3 jndi 1.2.2.1-1.2.4.3 Fastjson 1.2.43 bypass
JdbcRowSetImpl4 jndi 1.2.2.1-1.2.4.2 Fastjson 1.2.42 bypass
JdbcRowSetImpl5 jndi 1.2.2.1-1.2.4.7 Fastjson 1.2.47 bypass
JndiDataSourceFactory1 jndi 1.2.2.1-1.2.2.4 ibatis-core:3.0
SimpleJndiBeanFactory1 jndi 1.2.2.2-1.2.2.4 spring-context:4.3.7.RELEASE
TemplatesImpl1 local 1.2.2.1-1.2.2.4 xalan:2.7.2(need Feature.SupportNonPublicField)
TemplatesImpl2 local 1.2.2.1-1.2.2.4 xalan:2.7.2(need Feature.SupportNonPublicField)
```
## 0x04 Notice
* 帮助信息所说明的payload可利用的Fastjson版本,不一定正确。后续测试更正!
## 0x05 Reference
* https://github.com/frohoff/ysoserial
* https://github.com/mbechler/marshalsec
* https://github.com/kxcode/JNDI-Exploit-Bypass-Demo | 0 |
snazy/ohc | Java large off heap cache | 2014-11-20T00:28:09Z | null | null | 0 |
dunwu/javacore | ☕ JavaCore 是对 Java 核心技术的经验总结。 | 2017-08-18T11:05:08Z | null | <p align="center">
<a href="https://dunwu.github.io/javacore/" target="_blank" rel="noopener noreferrer">
<img src="https://raw.githubusercontent.com/dunwu/images/master/common/dunwu-logo.png" alt="logo" width="150px"/>
</a>
</p>
<p align="center">
<a href="https://github.com/dunwu/javacore">
<img alt="star" class="no-zoom" src="https://img.shields.io/github/stars/dunwu/javacore?style=for-the-badge">
</a>
<a href="https://github.com/dunwu/javacore">
<img alt="fork" class="no-zoom" src="https://img.shields.io/github/forks/dunwu/javacore?style=for-the-badge">
</a>
<a href="https://github.com/dunwu/javacore/commits/master">
<img alt="build" class="no-zoom" src="https://img.shields.io/github/actions/workflow/status/dunwu/javacore/deploy.yml?style=for-the-badge">
</a>
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">
<img alt="code style" class="no-zoom" src="https://img.shields.io/github/license/dunwu/javacore?style=for-the-badge">
</a>
</p>
<h1 align="center">JavaCore</h1>
> ☕ **JavaCore** 是一个 Java 核心技术教程。
>
> - 🔁 项目同步维护:[Github](https://github.com/dunwu/javacore/) | [Gitee](https://gitee.com/turnon/javacore/)
> - 📖 电子书阅读:[Github Pages](https://dunwu.github.io/javacore/) | [Gitee Pages](http://turnon.gitee.io/javacore/)
## 📖 内容
> [Java 面试总结](docs/01.Java/01.JavaSE/99.Java面试.md) 💯
### [Java 基础特性](docs/01.Java/01.JavaSE/01.基础特性)
- [Java 开发环境](docs/01.Java/01.JavaSE/01.基础特性/00.Java开发环境.md)
- [Java 基础语法特性](docs/01.Java/01.JavaSE/01.基础特性/01.Java基础语法.md)
- [Java 基本数据类型](docs/01.Java/01.JavaSE/01.基础特性/02.Java基本数据类型.md)
- [Java 面向对象](docs/01.Java/01.JavaSE/01.基础特性/03.Java面向对象.md)
- [Java 方法](docs/01.Java/01.JavaSE/01.基础特性/04.Java方法.md)
- [Java 数组](docs/01.Java/01.JavaSE/01.基础特性/05.Java数组.md)
- [Java 枚举](docs/01.Java/01.JavaSE/01.基础特性/06.Java枚举.md)
- [Java 控制语句](docs/01.Java/01.JavaSE/01.基础特性/07.Java控制语句.md)
- [Java 异常](docs/01.Java/01.JavaSE/01.基础特性/08.Java异常.md)
- [Java 泛型](docs/01.Java/01.JavaSE/01.基础特性/09.Java泛型.md)
- [Java 反射](docs/01.Java/01.JavaSE/01.基础特性/10.Java反射.md)
- [Java 注解](docs/01.Java/01.JavaSE/01.基础特性/11.Java注解.md)
- [Java String 类型](docs/01.Java/01.JavaSE/01.基础特性/42.JavaString类型.md)
### [Java 高级特性](docs/01.Java/01.JavaSE/02.高级特性)
- [Java 正则从入门到精通](docs/01.Java/01.JavaSE/02.高级特性/01.Java正则.md) - 关键词:`Pattern`、`Matcher`、`捕获与非捕获`、`反向引用`、`零宽断言`、`贪婪与懒惰`、`元字符`、`DFA`、`NFA`
- [Java 编码和加密](docs/01.Java/01.JavaSE/02.高级特性/02.Java编码和加密.md) - 关键词:`Base64`、`消息摘要`、`数字签名`、`对称加密`、`非对称加密`、`MD5`、`SHA`、`HMAC`、`AES`、`DES`、`DESede`、`RSA`
- [Java 国际化](docs/01.Java/01.JavaSE/02.高级特性/03.Java国际化.md) - 关键词:`Locale`、`ResourceBundle`、`NumberFormat`、`DateFormat`、`MessageFormat`
- [Java JDK8](docs/01.Java/01.JavaSE/02.高级特性/04.JDK8.md) - 关键词:`Stream`、`lambda`、`Optional`、`@FunctionalInterface`
- [Java SPI](docs/01.Java/01.JavaSE/02.高级特性/05.JavaSPI.md) - 关键词:`SPI`、`ClassLoader`
### [Java 容器](docs/01.Java/01.JavaSE/03.容器)
![img](https://raw.githubusercontent.com/dunwu/images/master/snap/20200221175550.png)
- [Java 容器简介](docs/01.Java/01.JavaSE/03.容器/01.Java容器简介.md) - 关键词:`Collection`、`泛型`、`Iterable`、`Iterator`、`Comparable`、`Comparator`、`Cloneable`、`fail-fast`
- [Java 容器之 List](docs/01.Java/01.JavaSE/03.容器/02.Java容器之List.md) - 关键词:`List`、`ArrayList`、`LinkedList`
- [Java 容器之 Map](docs/01.Java/01.JavaSE/03.容器/03.Java容器之Map.md) - 关键词:`Map`、`HashMap`、`TreeMap`、`LinkedHashMap`、`WeakHashMap`
- [Java 容器之 Set](docs/01.Java/01.JavaSE/03.容器/04.Java容器之Set.md) - 关键词:`Set`、`HashSet`、`TreeSet`、`LinkedHashSet`、`EmumSet`
- [Java 容器之 Queue](docs/01.Java/01.JavaSE/03.容器/05.Java容器之Queue.md) - 关键词:`Queue`、`Deque`、`ArrayDeque`、`LinkedList`、`PriorityQueue`
- [Java 容器之 Stream](docs/01.Java/01.JavaSE/03.容器/06.Java容器之Stream.md)
### [Java IO](docs/01.Java/01.JavaSE/04.IO)
![img](https://raw.githubusercontent.com/dunwu/images/master/snap/20200630205329.png)
- [Java IO 模型](docs/01.Java/01.JavaSE/04.IO/01.JavaIO模型.md) - 关键词:`InputStream`、`OutputStream`、`Reader`、`Writer`、`阻塞`
- [Java NIO](docs/01.Java/01.JavaSE/04.IO/02.JavaNIO.md) - 关键词:`Channel`、`Buffer`、`Selector`、`非阻塞`、`多路复用`
- [Java 序列化](docs/01.Java/01.JavaSE/04.IO/03.Java序列化.md) - 关键词:`Serializable`、`serialVersionUID`、`transient`、`Externalizable`、`writeObject`、`readObject`
- [Java 网络编程](docs/01.Java/01.JavaSE/04.IO/04.Java网络编程.md) - 关键词:`Socket`、`ServerSocket`、`DatagramPacket`、`DatagramSocket`
- [Java IO 工具类](docs/01.Java/01.JavaSE/04.IO/05.JavaIO工具类.md) - 关键词:`File`、`RandomAccessFile`、`System`、`Scanner`
### [Java 并发](docs/01.Java/01.JavaSE/05.并发)
![img](https://raw.githubusercontent.com/dunwu/images/master/snap/20200221175827.png)
- [Java 并发简介](docs/01.Java/01.JavaSE/05.并发/01.Java并发简介.md) - 关键词:`进程`、`线程`、`安全性`、`活跃性`、`性能`、`死锁`、`饥饿`、`上下文切换`
- [Java 线程基础](docs/01.Java/01.JavaSE/05.并发/02.Java线程基础.md) - 关键词:`Thread`、`Runnable`、`Callable`、`Future`、`wait`、`notify`、`notifyAll`、`join`、`sleep`、`yeild`、`线程状态`、`线程通信`
- [Java 并发核心机制](docs/01.Java/01.JavaSE/05.并发/03.Java并发核心机制.md) - 关键词:`synchronized`、`volatile`、`CAS`、`ThreadLocal`
- [Java 并发锁](docs/01.Java/01.JavaSE/05.并发/04.Java锁.md) - 关键词:`AQS`、`ReentrantLock`、`ReentrantReadWriteLock`、`Condition`
- [Java 原子类](docs/01.Java/01.JavaSE/05.并发/05.Java原子类.md) - 关键词:`CAS`、`Atomic`
- [Java 并发容器](docs/01.Java/01.JavaSE/05.并发/06.Java并发和容器.md) - 关键词:`ConcurrentHashMap`、`CopyOnWriteArrayList`
- [Java 线程池](docs/01.Java/01.JavaSE/05.并发/07.Java线程池.md) - 关键词:`Executor`、`ExecutorService`、`ThreadPoolExecutor`、`Executors`
- [Java 并发工具类](docs/01.Java/01.JavaSE/05.并发/08.Java并发工具类.md) - 关键词:`CountDownLatch`、`CyclicBarrier`、`Semaphore`
- [Java 内存模型](docs/01.Java/01.JavaSE/05.并发/09.Java内存模型.md) - 关键词:`JMM`、`volatile`、`synchronized`、`final`、`Happens-Before`、`内存屏障`
- [ForkJoin 框架](docs/01.Java/01.JavaSE/05.并发/10.ForkJoin框架.md)
### [Java 虚拟机](docs/01.Java/01.JavaSE/06.JVM)
![img](https://raw.githubusercontent.com/dunwu/images/master/snap/20200628154803.png)
- [JVM 体系结构](docs/01.Java/01.JavaSE/06.JVM/01.JVM体系结构.md)
- [JVM 内存区域](docs/01.Java/01.JavaSE/06.JVM/02.JVM内存区域.md) - 关键词:`程序计数器`、`虚拟机栈`、`本地方法栈`、`堆`、`方法区`、`运行时常量池`、`直接内存`、`OutOfMemoryError`、`StackOverflowError`
- [JVM 垃圾收集](docs/01.Java/01.JavaSE/06.JVM/03.JVM垃圾收集.md) - 关键词:`GC Roots`、`Serial`、`Parallel`、`CMS`、`G1`、`Minor GC`、`Full GC`
- [JVM 字节码](docs/01.Java/01.JavaSE/06.JVM/05.JVM字节码.md) - 关键词:`bytecode`、`asm`、`javassist`
- [JVM 类加载](docs/01.Java/01.JavaSE/06.JVM/04.JVM类加载.md) - 关键词:`ClassLoader`、`双亲委派`
- [JVM 命令行工具](docs/01.Java/01.JavaSE/06.JVM/11.JVM命令行工具.md) - 关键词:`jps`、`jstat`、`jmap` 、`jstack`、`jhat`、`jinfo`
- [JVM GUI 工具](docs/01.Java/01.JavaSE/06.JVM/12.JVM_GUI工具.md) - 关键词:`jconsole`、`jvisualvm`、`MAT`、`JProfile`、`Arthas`
- [JVM 实战](docs/01.Java/01.JavaSE/06.JVM/21.JVM实战.md) - 关键词:`配置`、`调优`
- [Java 故障诊断](docs/01.Java/01.JavaSE/06.JVM/22.Java故障诊断.md) - 关键词:`CPU`、`内存`、`磁盘`、`网络`、`GC`
## 📚 资料
- **书籍**
- Java 四大名著
- [《Java 编程思想(Thinking in java)》](https://book.douban.com/subject/2130190/)
- [《Java 核心技术 卷 I 基础知识》](https://book.douban.com/subject/26880667/)
- [《Java 核心技术 卷 II 高级特性》](https://book.douban.com/subject/27165931/)
- [《Effective Java》](https://book.douban.com/subject/30412517/)
- Java 并发
- [《Java 并发编程实战》](https://book.douban.com/subject/10484692/)
- [《Java 并发编程的艺术》](https://book.douban.com/subject/26591326/)
- Java 虚拟机
- [《深入理解 Java 虚拟机》](https://book.douban.com/subject/34907497/)
- Java 入门
- [《O'Reilly:Head First Java》](https://book.douban.com/subject/2000732/)
- [《疯狂 Java 讲义》](https://book.douban.com/subject/3246499/)
- 其他
- [《Head First 设计模式》](https://book.douban.com/subject/2243615/)
- [《Java 网络编程》](https://book.douban.com/subject/1438754/)
- [《Java 加密与解密的艺术》](https://book.douban.com/subject/25861566/)
- [《阿里巴巴 Java 开发手册》](https://book.douban.com/subject/27605355/)
- **教程、社区**
- [Runoob Java 教程](https://www.runoob.com/java/java-tutorial.html)
- [java-design-patterns](https://github.com/iluwatar/java-design-patterns)
- [Java](https://github.com/TheAlgorithms/Java)
- [《Java 核心技术面试精讲》](https://time.geekbang.org/column/intro/82)
- [《Java 性能调优实战》](https://time.geekbang.org/column/intro/100028001)
- [《Java 业务开发常见错误 100 例》](https://time.geekbang.org/column/intro/100047701)
- [深入拆解 Java 虚拟机](https://time.geekbang.org/column/intro/100010301)
- [《Java 并发编程实战》](https://time.geekbang.org/column/intro/100023901)
- **面试**
- [CS-Notes](https://github.com/CyC2018/CS-Notes)
- [JavaGuide](https://github.com/Snailclimb/JavaGuide)
- [advanced-java](https://github.com/doocs/advanced-java)
## 🚪 传送
◾ 🏠 [JAVACORE 首页](https://github.com/dunwu/javacore) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
| 0 |
linchaolong/ApkToolPlus | ApkToolPlus 是一个 apk 逆向分析工具(a apk analysis tools)。 | 2016-04-18T17:52:39Z | null |
[中文](README.md) | [English](README_en.md)
# ApkToolPlus
<a href="https://github.com/linchaolong/ApkToolPlus">
<img src="doc/logo.png" alt="ApkToolPlus" title="ApkToolPlus" align="right" />
</a>
<br/><br/>
ApkToolPlus 是一个可视化的跨平台 apk 分析工具。
> 项目地址:https://github.com/linchaolong/ApkToolPlus
## 功能说明
### 1. ApkTool
apk 反编译,回编译,签名。
![apktool](doc/apktool.jpg)
### 2. Apk 加固
dex 加密,防逆向,防止二次打包。(注意:该功能当前并非很完善,暂不建议商用,欢迎学习交流,欢迎提交 Pull requests)。
![apktool](doc/jiagu.jpg)
> 注意:加固后的 apk 启动时会做签名校验,如果和原来的签名不匹配会启动失败,在设置界面的 ApkTool 下配置 keystore。
### 3. ApkInfoPrinter
apk 常见信息查看工具,如:AndroidManifest.xml,apk 签名,版本号等。支持直接拖入查看 apk 信息。
![apktool](doc/apkinfoprinter.png)
### 4. Apk源码查看工具
Apk 源码查看工具,支持 multi-dex。
![apktool](doc/jd.jpg)
### 5. 格式转换工具
jar2smali,class2smali,dex2smali(apk2smali),smali2dex,class2dex。
在设置界面,可关联 [Sublime](http://www.sublimetext.com/2) ,关联后通过工具转换后的文件会自动显示在 Sublime。
![apktool](doc/settings.jpg)
### 6. 角标生成工具
icon 角标生成工具
![apktool](doc/icon_tool.jpg)
### 7. 其他
- JD(Java 反编译工具)
- JAD(Java 反编译工具),注意 jar 文件或 class 目录不要在中文路径下!!!
- JBE(Java 字节码编辑工具)
- Proguard(Java 代码混淆工具)
## 工程结构
- app:应用主模块。
- app.Builder:应用构建模块。
- lib.ApkParser:[apk-parser](https://github.com/clearthesky/apk-parser),apk 解析库。
- lib.AXMLPrinter: [AXMLPrinter2](https://code.google.com/archive/p/android4me/downloads),二进制 xml 文件解析库。
- lib.Jad: [Jad](https://varaneckas.com/jad/) ,Java 反编译工具。
- lib.JBE: [JBE](http://cs.ioc.ee/~ando/jbe/) ,Java 字节码编辑器。
- lib.JiaGu:apk 加固模块。
- lib.Proguard: [Proguard](https://sourceforge.net/projects/proguard/files/) ,代码混淆优化工具, [Usage](https://www.guardsquare.com/en/proguard/manual/usage) 。
- lib.Res:应用资源模块。
- lib.Utils:工具类模块。
> ApkToolPlus.jks
> - alias: ApkToolPlus
> - password: linchaolong
> - keystore password: linchaolong
## 构建说明
> 这是一个 IntelliJ IDEA 工程。
>
> 项目的构建依赖 ant, [点击这里下载 ant](https://ant.apache.org/bindownload.cgi),并把 ant 的 bin 目录路径配置到 Path 环境变量,执行 `ant -version` 命令检测是否配置完成。
### 1. 运行项目
直接 Run `app` 模块中的 `com.linchaolong.apktoolplus.Main` 运行 ApkToolPlus。
### 2. 构建apk加固模块
`lib.JiaGu` 是 apk 加固模块,如果有更新修改,则执行 `app.Builder` 模块的 `com.linchaolong.apktoolplus.builder.UpdateJiaGu` 自动更新打包 apk 加固库到 app 模块。
### 3. 打包ApkToolPlus
`Build -> Artifacts... -> ApkToolPlus -> Build`,ApkToolPlus.jar 将生成在 `out\artifacts\ApkToolPlus` 目录下,如果已经安装 jdk 可以直接点击运行。
## 下载
点击 [这里](release) 下载 release 版 ApkToolPlus。安装 jdk 后,双击 jar 文件即可运行 ApkToolPlus。
## 相关链接
[dexknife-wj](https://github.com/godlikewangjun/dexknife-wj):Android Studio 下的 apk 加固插件,支持签名校验和 dex 加密
## 联系方式
- Email:linchaolong.dev@gmail.com
- Blog:http://www.jianshu.com/u/149dc6683cc7
> 最后,欢迎 Star,Fork,Issues 和提交 Pull requests,感谢 [ApkTool](https://github.com/iBotPeaches/Apktool) ,[apk-parser](https://github.com/clearthesky/apk-parser),[AXMLPrinter](https://code.google.com/archive/p/android4me/downloads) 等开源项目的开发者。
| 0 |
undertow-io/undertow | High performance non-blocking webserver | 2012-07-19T00:52:44Z | null | Undertow
========
Undertow is a Java web server based on non-blocking IO. It consists of a few different parts:
- A core HTTP server that supports both blocking and non-blocking IO
- A Servlet 4.0/5.0/6.0 implementation
- A JSR-356/Jakarta 2.0 compliant Web Socket implementation
Website: http://undertow.io
Issues: https://issues.redhat.com/projects/UNDERTOW
Project Lead: Flavia Rainone <frainone@redhat.com>
Undertow Dev Group: https://groups.google.com/g/undertow-dev/
(you can access archived discussions of old undertow-dev mail list [here](http://lists.jboss.org/mailman/listinfo/undertow-dev))
Zulip Chat: https://wildfly.zulipchat.com stream [#undertow](https://wildfly.zulipchat.com/#narrow/stream/174183-undertow)
Notifying Security Relevant Bugs
--------------------------------
If you find a bug that has a security impact, please notify us sending an email to Red Hat SecAlert <secalert@redhat.com> with a copy to Flavia Rainone <frainone@redhat.com>. This will ensure the bug is properly handled without causing unnecessary negative impacts for the Undertow's user base.
You can find more information about the security procedures at [this page](https://access.redhat.com/security/team/contact "Security Contacts and Procedures").
| 0 |
zaiyunduan123/springboot-seckill | :racehorse:基于SpringBoot + MySQL + Redis + RabbitMQ + Guava开发的高并发商品限时秒杀系统 | 2018-05-18T03:29:21Z | null |
## 系统介绍
本系统是使用SpringBoot开发的高并发限时抢购秒杀系统,除了实现基本的登录、查看商品列表、秒杀、下单等功能,项目中还针对高并发情况实现了系统缓存、降级和限流。
## 开发工具
IntelliJ IDEA + Navicat + Sublime Text3 + Git + Chrome
## 压测工具
JMeter
## 开发技术
前端技术 :Bootstrap + jQuery + Thymeleaf
后端技术 :SpringBoot + MyBatis + MySQL
中间件技术 : Druid + Redis + RabbitMQ + Guava
## 秒杀优化方向
1. 将请求尽量拦截在系统上游:传统秒杀系统之所以挂,请求都压倒了后端数据层,数据读写锁冲突严重,几乎所有请求都超时,流量虽大,下单成功的有效流量甚小,我们可以通过限流、降级等措施来最大化减少对数据库的访问,从而保护系统。
2. 充分利用缓存:秒杀商品是一个典型的读多写少的应用场景,充分利用缓存将大大提高并发量
## 实现技术点
### 1. 两次MD5加密
将用户输入的密码和固定Salt通过MD5加密生成第一次加密后的密码,再讲该密码和随机生成的Salt通过MD5进行第二次加密,最后将第二次加密后的密码和第一次的固定Salt存数据库
好处:
1. 第一次作用:防止用户明文密码在网络进行传输
2. 第二次作用:防止数据库被盗,避免通过MD5反推出密码,双重保险
### 2. session共享
验证用户账号密码都正确情况下,通过UUID生成唯一id作为token,再将token作为key、用户信息作为value模拟session存储到redis,同时将token存储到cookie,保存登录状态
好处: 在分布式集群情况下,服务器间需要同步,定时同步各个服务器的session信息,会因为延迟到导致session不一致,使用redis把session数据集中存储起来,解决session不一致问题。
### 3. JSR303自定义参数验证
使用JSR303自定义校验器,实现对用户账号、密码的验证,使得验证逻辑从业务代码中脱离出来。
### 4. 全局异常统一处理
通过拦截所有异常,对各种异常进行相应的处理,当遇到异常就逐层上抛,一直抛到最终由一个统一的、专门负责异常处理的地方处理,这有利于对异常的维护。
### 5. 页面缓存 + 对象缓存
1. 页面缓存:通过在手动渲染得到的html页面缓存到redis
2. 对象缓存:包括对用户信息、商品信息、订单信息和token等数据进行缓存,利用缓存来减少对数据库的访问,大大加快查询速度。
### 6. 页面静态化
对商品详情和订单详情进行页面静态化处理,页面是存在html,动态数据是通过接口从服务端获取,实现前后端分离,静态页面无需连接数据库打开速度较动态页面会有明显提高
### 7. 本地标记 + redis预处理 + RabbitMQ异步下单 + 客户端轮询
描述:通过三级缓冲保护,1、本地标记 2、redis预处理 3、RabbitMQ异步下单,最后才会访问数据库,这样做是为了最大力度减少对数据库的访问。
实现:
1. 在秒杀阶段使用本地标记对用户秒杀过的商品做标记,若被标记过直接返回重复秒杀,未被标记才查询redis,通过本地标记来减少对redis的访问
2. 抢购开始前,将商品和库存数据同步到redis中,所有的抢购操作都在redis中进行处理,通过Redis预减少库存减少数据库访问
3. 为了保护系统不受高流量的冲击而导致系统崩溃的问题,使用RabbitMQ用异步队列处理下单,实际做了一层缓冲保护,做了一个窗口模型,窗口模型会实时的刷新用户秒杀的状态。
4. client端用js轮询一个接口,用来获取处理状态
### 8. 解决超卖
描述:比如某商品的库存为1,此时用户1和用户2并发购买该商品,用户1提交订单后该商品的库存被修改为0,而此时用户2并不知道的情况下提交订单,该商品的库存再次被修改为-1,这就是超卖现象
实现:
1. 对库存更新时,先对库存判断,只有当库存大于0才能更新库存
2. 对用户id和商品id建立一个唯一索引,通过这种约束避免同一用户发同时两个请求秒杀到两件相同商品
3. 实现乐观锁,给商品信息表增加一个version字段,为每一条数据加上版本。每次更新的时候version+1,并且更新时候带上版本号,当提交前版本号等于更新前版本号,说明此时没有被其他线程影响到,正常更新,如果冲突了则不会进行提交更新。当库存是足够的情况下发生乐观锁冲突就进行一定次数的重试。
### 9. 使用数学公式验证码
描述:点击秒杀前,先让用户输入数学公式验证码,验证正确才能进行秒杀。
好处:
1. 防止恶意的机器人和爬虫
2. 分散用户的请求
实现:
1. 前端通过把商品id作为参数调用服务端创建验证码接口
2. 服务端根据前端传过来的商品id和用户id生成验证码,并将商品id+用户id作为key,生成的验证码作为value存入redis,同时将生成的验证码输入图片写入imageIO让前端展示
3. 将用户输入的验证码与根据商品id+用户id从redis查询到的验证码对比,相同就返回验证成功,进入秒杀;不同或从redis查询的验证码为空都返回验证失败,刷新验证码重试
### 10. 使用RateLimiter实现限流
描述:当我们去秒杀一些商品时,此时可能会因为访问量太大而导致系统崩溃,此时要使用限流来进行限制访问量,当达到限流阀值,后续请求会被降级;降级后的处理方案可以是:返回排队页面(高峰期访问太频繁,等一会重试)、错误页等。
实现:项目使用RateLimiter来实现限流,RateLimiter是guava提供的基于令牌桶算法的限流实现类,通过调整生成token的速率来限制用户频繁访问秒杀页面,从而达到防止超大流量冲垮系统。(令牌桶算法的原理是系统会以一个恒定的速度往桶里放入令牌,而如果请求需要被处理,则需要先从桶里获取一个令牌,当桶里没有令牌可取时,则拒绝服务)
## 压测效果
优化前 :开启1000个线程循环10次同时访问,QPS = 423
![优化前](https://github.com/zaiyunduan123/jesper_seckill/blob/master/src/main/resources/static/img/stress-test/goodsList_test_3.png)
优化后:QPS = 2501
![优化后](https://github.com/zaiyunduan123/jesper_seckill/blob/master/src/main/resources/static/img/stress-test/optimised_goodslist.png)
## 关于项目运行的步骤
1. 把sql目录下的seckill.sql脚本在你MySQL跑一遍,生成数据库表和数据
2. 启动项目需要用到的组件Redis和RabbitMQ
3. 直接运行启动类MainApplication.java
4. 访问localhost:8080/login/to_login
5. 登录的用户名是18181818181,密码是123456
-----
本项目是学习了imooc网视频之后的个人理解和知识汇总,学习链接:https://coding.imooc.com/class/168.html
| 0 |
camunda/camunda-bpm-platform | Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI. | 2013-01-03T10:10:31Z | null | # Camunda Platform 7 - The open source BPMN platform
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm/camunda-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm/camunda-parent) [![camunda manual latest](https://img.shields.io/badge/manual-latest-brown.svg)](https://docs.camunda.org/manual/latest/) [![License](https://img.shields.io/github/license/camunda/camunda-bpm-platform?color=blue&logo=apache)](https://github.com/camunda/camunda-bpm-platform/blob/master/LICENSE) [![Forum](https://img.shields.io/badge/forum-camunda-green)](https://forum.camunda.org/)
Camunda Platform 7 is a flexible framework for workflow and process automation. Its core is a native BPMN 2.0 process engine that runs inside the Java Virtual Machine. It can be embedded inside any Java application and any Runtime Container. It integrates with Java EE 6 and is a perfect match for the Spring Framework. On top of the process engine, you can choose from a stack of tools for human workflow management, operations and monitoring.
- Web Site: https://www.camunda.org/
- Getting Started: https://docs.camunda.org/get-started/
- User Forum: https://forum.camunda.org/
- Issue Tracker: https://github.com/camunda/camunda-bpm-platform/issues
- Contribution Guidelines: https://camunda.org/contribute/
## Components
Camunda Platform 7 provides a rich set of components centered around the BPM lifecycle.
#### Process Implementation and Execution
- Camunda Engine - The core component responsible for executing BPMN 2.0 processes.
- REST API - The REST API provides remote access to running processes.
- Spring, CDI Integration - Programming model integration that allows developers to write Java Applications that interact with running processes.
#### Process Design
- Camunda Modeler - A [standalone desktop application](https://github.com/camunda/camunda-modeler) that allows business users and developers to design & configure processes.
#### Process Operations
- Camunda Engine - JMX and advanced Runtime Container Integration for process engine monitoring.
- Camunda Cockpit - Web application tool for process operations.
- Camunda Admin - Web application for managing users, groups, and their access permissions.
#### Human Task Management
- Camunda Tasklist - Web application for managing and completing user tasks in the context of processes.
#### And there's more...
- [bpmn.io](https://bpmn.io/) - Toolkits for BPMN, CMMN, and DMN in JavaScript (rendering, modeling)
- [Community Extensions](https://docs.camunda.org/manual/7.5/introduction/extensions/) - Extensions on top of Camunda Platform 7 provided and maintained by our great open source community
## A Framework
In contrast to other vendor BPM platforms, Camunda Platform 7 strives to be highly integrable and embeddable. We seek to deliver a great experience to developers that want to use BPM technology in their projects.
### Highly Integrable
Out of the box, Camunda Platform 7 provides infrastructure-level integration with Java EE Application Servers and Servlet Containers.
### Embeddable
Most of the components that make up the platform can even be completely embedded inside an application. For instance, you can add the process engine and the REST API as a library to your application and assemble your custom BPM platform configuration.
## Contributing
Please see our [contribution guidelines](CONTRIBUTING.md) for how to raise issues and how to contribute code to our project.
## Tests
To run the tests in this repository, please see our [testing tips and tricks](TESTING.md).
## License
The source files in this repository are made available under the [Apache License Version 2.0](./LICENSE).
Camunda Platform 7 uses and includes third-party dependencies published under various licenses. By downloading and using Camunda Platform 7 artifacts, you agree to their terms and conditions. Refer to https://docs.camunda.org/manual/latest/introduction/third-party-libraries/ for an overview of third-party libraries and particularly important third-party licenses we want to make you aware of.
| 0 |
noear/solon | 🔥 New Java application development framework: FASTER, SMALLER, SIMPLER!! 2 to 3 times more concurrency 50% memory savings Startup is 5-10 times faster. 50% ~ 90% smaller packaging; Compatible with java8 ~ java22. | 2018-07-07T13:23:50Z | null | <h1 align="center" style="text-align:center;">
<img src="solon_icon.png" width="128" />
<br />
Solon v2.7.6
</h1>
<p align="center">
<strong>Java's new application development framework. Faster, smaller, and easier!</strong>
<br/>
<strong>[OpenAtom foundation, incubation project]</strong>
</p>
<p align="center">
<a href="https://solon.noear.org/">https://solon.noear.org</a>
</p>
<p align="center">
<a target="_blank" href="https://central.sonatype.com/search?q=org.noear%3Asolon-parent">
<img src="https://img.shields.io/maven-central/v/org.noear/solon.svg?label=Maven%20Central" alt="Maven" />
</a>
<a target="_blank" href="LICENSE">
<img src="https://img.shields.io/:License-Apache2-blue.svg" alt="Apache 2" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
<img src="https://img.shields.io/badge/JDK-8-green.svg" alt="jdk-8" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html">
<img src="https://img.shields.io/badge/JDK-11-green.svg" alt="jdk-11" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html">
<img src="https://img.shields.io/badge/JDK-17-green.svg" alt="jdk-17" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html">
<img src="https://img.shields.io/badge/JDK-21-green.svg" alt="jdk-21" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/jdk22-archive-downloads.html">
<img src="https://img.shields.io/badge/JDK-22-green.svg" alt="jdk-22" />
</a>
<br />
<a target="_blank" href='https://gitee.com/noear/solon/stargazers'>
<img src='https://gitee.com/noear/solon/badge/star.svg' alt='gitee star'/>
</a>
<a target="_blank" href='https://github.com/noear/solon/stargazers'>
<img src="https://img.shields.io/github/stars/noear/solon.svg?style=flat&logo=github" alt="github star"/>
</a>
</p>
<br/>
<p align="center">
<a href="https://jq.qq.com/?_wv=1027&k=kjB5JNiC">
<img src="https://img.shields.io/badge/QQ交流群-22200020-orange"/></a>
</p>
##### Language: English | [中文](README_CN.md) | [Русский](README_RU.md) | [日本語](README_JP.md)
<hr />
<p align="center">
2 to 3 times more concurrency 50% memory savings Startup is 5-10 times faster. 50% ~ 90% smaller packaging; Compatible with java8 ~ java22
<br/>
Built from scratch, with more flexible interface specifications and an open ecosystem
</p>
<hr />
## Features:
Better cost performance for computing:
* Throughput: 2-3 times higher concurrency per second
* Resources: 50% memory savings
Better developer productivity, easier coding experience:
* Development: Flexible and simple architecture; Quick to get started
* Debugging: Restarts are 5-10 times faster. Locating problems faster
Faster production and deployment experience:
* Artifacts: 50% ~ 90% smaller packaging
* Deploy: images are fast to pull and start up (5-10x)
Wider runtime compatibility:
* Breakthrough: Non-Java-EE architecture, more flexibility
* Compatibility: Compatible with java8, java11, java17, java21, java22 runtime
## Ecosystem Architecture Diagram:
* solon
<img src="solon_schema.png" width="700" />
* solon cloud
<img src="solon_cloud_schema.png" width="700" />
## Official website and related examples, cases:
* Official website address:[https://solon.noear.org](https://solon.noear.org)
* Official website supporting demos:[https://gitee.com/noear/solon-examples](https://gitee.com/noear/solon-examples)
* Project unit test:[__test](./__test/)
* User case:[User open source project](https://solon.noear.org/article/555)、[User business project](https://solon.noear.org/article/cases)
## Special thanks to JetBrains for supporting open-source projects:
<a href="https://jb.gg/OpenSourceSupport">
<img src="https://user-images.githubusercontent.com/8643542/160519107-199319dc-e1cf-4079-94b7-01b6b8d23aa6.png" align="left" height="100" width="100" alt="JetBrains">
</a>
| 0 |
cucumber/cucumber-jvm | Cucumber for the JVM | 2011-06-27T19:49:46Z | null | # Cucumber JVM
[![#StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://vshymanskyy.github.io/StandWithUkraine)
[![OpenCollective](https://opencollective.com/cucumber/backers/badge.svg)](https://opencollective.com/cucumber)
[![OpenCollective](https://opencollective.com/cucumber/sponsors/badge.svg)](https://opencollective.com/cucumber)
[![Maven Central](https://img.shields.io/maven-central/v/io.cucumber/cucumber-java.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/io.cucumber/cucumber-java)
[![Build Status](https://github.com/cucumber/cucumber-jvm/workflows/Cucumber%20CI/badge.svg)](https://github.com/cucumber/cucumber-jvm/actions)
[![Coverage Status](https://codecov.io/gh/cucumber/cucumber-jvm/branch/main/graph/badge.svg)](https://codecov.io/gh/cucumber/cucumber-jvm/branch/main)
Cucumber-JVM is a pure Java implementation of Cucumber.
You can [run](https://cucumber.io/docs/cucumber/api/#running-cucumber) it with
the tool of your choice.
Cucumber-JVM also integrates with all the popular
[Dependency Injection containers](https://cucumber.io/docs/installation/java/#dependency-injection).
## Getting started
* [Installation](https://cucumber.io/docs/installation/java/)
* [Documentation](https://cucumber.io/docs/cucumber/)
* [Hello World project](https://github.com/cucumber/cucumber-java-skeleton)
## Upgrading?
Migration instructions from previous major versions and a long form
explanation of noteworthy changes can be found in the [release-notes archive](release-notes)
The changes for the current major version can be found in the [CHANGELOG.md](CHANGELOG.md).
## Questions, Problems, Help needed?
Please ask on
* [Stack Overflow](https://stackoverflow.com/questions/tagged/cucumber-jvm).
* [CucumberBDD Slack](https://communityinviter.com/apps/cucumberbdd/docs-page) <sup>[direct link](https://cucumberbdd.slack.com/)</sup>
## Bugs and Feature requests
You can register bugs and feature requests in the
[GitHub Issue Tracker](https://github.com/cucumber/cucumber-jvm/issues).
Please bear in mind that this project is almost entirely developed by
volunteers. If you do not provide the implementation yourself (or pay someone
to do it for you), the bug might never get fixed. If it is a serious bug, other
people than you might care enough to provide a fix.
## Contributing
If you'd like to contribute to the documentation, checkout
[cucumber/docs.cucumber.io](https://github.com/cucumber/docs.cucumber.io)
otherwise see our
[CONTRIBUTING.md](https://github.com/cucumber/cucumber-jvm/blob/main/CONTRIBUTING.md).
| 0 |
pingfangushi/screw | 简洁好用的数据库表结构文档生成器 | 2020-06-21T11:37:06Z | null |
<p align="center">
<a href="https://github.com/pingfangushi/screw">
<img alt="screw-logo" src="https://images.gitee.com/uploads/images/2020/0728/155335_59a712d2_1407605.png">
</a>
</p>
<p align="center">💕 企业级开发过程中,一颗永不生锈的螺丝钉。</p>
<p align="center">
<a href="https://github.com/pingfangushi/screw/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-LGPL3-blue.svg" alt="LGPL3">
</a>
<a href="https://github.com/pingfangushi/screw">
<img src="https://img.shields.io/badge/link-wiki-green.svg?style=flat-square" alt="wiki">
</a>
<a href="https://search.maven.org/search?q=cn.smallbun.screw">
<img alt="Maven Central" src="https://img.shields.io/maven-central/v/cn.smallbun.screw/screw-core">
</a>
<a href="#">
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="JDK Version">
</a>
<a href="#">
<img src="https://img.shields.io/badge/MAVEN-3.0+-green.svg" alt="JDK Version">
</a>
</p>
> 🚀 screw (螺丝钉) 英:[`skruː`] ~ 简洁好用的数据库表结构文档生成工具
## 简介
  在企业级开发中、我们经常会有编写数据库表结构文档的时间付出,从业以来,待过几家企业,关于数据库表结构文档状态:要么没有、要么有、但都是手写、后期运维开发,需要手动进行维护到文档中,很是繁琐、如果忘记一次维护、就会给以后工作造成很多困扰、无形中制造了很多坑留给自己和后人,于是萌生了要自己写一个插件工具的想法,但由于自己前期在程序设计上没有很多造诣,且能力偏低,有想法并不能很好实现,随着工作阅历的增加,和知识的不断储备,终于在2020年的3月中旬开始进行编写,4月上旬完成初版,想完善差不多在开源,但由于工作太忙,业余时间不足,没有在进行完善,到了6月份由于工作原因、频繁设计和更改数据库、经常使用自己写的此插件、节省了很多时间,解决了很多问题 ,在仅有且不多的业余时间中、进行开源准备,于2020年6月22日,开源,欢迎大家使用、建议、并贡献。<br/>
  关于名字,想一个太难了,好在我这个聪明的小脑瓜灵感一现,怎么突出它的小,但重要呢?从小就学过雷锋的螺丝钉精神,摘自雷锋日记:**虽然是细小的螺丝钉,是个细微的小齿轮,然而如果缺了它,那整个的机器就无法运转了,慢说是缺了它,即使是一枚小螺丝钉没拧紧,一个小齿轮略有破损,也要使机器的运转发生故障的...**,感觉自己写的这个工具,很有这意味,虽然很小、但是开发中缺了它还不行,于是便起名为**screw**(螺丝钉)。<br/>
## 特点
+ 简洁、轻量、设计良好
+ 多数据库支持
+ 多种格式文档
+ 灵活扩展
+ 支持自定义模板
## 数据库支持
- [x] MySQL
- [x] MariaDB
- [x] TIDB
- [x] Oracle
- [x] SqlServer
- [x] PostgreSQL
- [x] Cache DB(2016)
- [ ] H2 (开发中)
- [ ] DB2 (开发中)
- [ ] HSQL (开发中)
- [ ] SQLite(开发中)
- [ ] 瀚高(开发中)
- [ ] 达梦 (开发中)
- [ ] 虚谷 (开发中)
- [ ] 人大金仓(开发中)
## 文档生成支持
- [x] html
- [x] word
- [x] markdown
## 文档截图
+ **html**
<p align="center">
<img alt="HTML" src="https://images.gitee.com/uploads/images/2020/0622/161414_74cd0b68_1407605.png">
</p>
<p align="center">
<img alt="screw-logo" src="https://images.gitee.com/uploads/images/2020/0622/161723_6da58c41_1407605.png">
</p>
+ **word**
<p align="center">
<img alt="word" src="https://images.gitee.com/uploads/images/2020/0625/200946_1dc0717f_1407605.png">
</p>
+ **markdwon**
<p align="center">
<img alt="markdwon" src="https://images.gitee.com/uploads/images/2020/0625/214749_7b15d8bd_1407605.png">
</p>
<p align="center">
<img alt="markdwon" src="https://images.gitee.com/uploads/images/2020/0625/215006_3601e135_1407605.png">
</p>
## 使用方式
### 普通方式
+ **引入依赖**
```xml
<dependency>
<groupId>cn.smallbun.screw</groupId>
<artifactId>screw-core</artifactId>
<version>${lastVersion}</version>
</dependency>
```
+ **编写代码**
``` java
/**
* 文档生成
*/
void documentGeneration() {
//数据源
HikariConfig hikariConfig = new HikariConfig();
hikariConfig.setDriverClassName("com.mysql.cj.jdbc.Driver");
hikariConfig.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/database");
hikariConfig.setUsername("root");
hikariConfig.setPassword("password");
//设置可以获取tables remarks信息
hikariConfig.addDataSourceProperty("useInformationSchema", "true");
hikariConfig.setMinimumIdle(2);
hikariConfig.setMaximumPoolSize(5);
DataSource dataSource = new HikariDataSource(hikariConfig);
//生成配置
EngineConfig engineConfig = EngineConfig.builder()
//生成文件路径
.fileOutputDir(fileOutputDir)
//打开目录
.openOutputDir(true)
//文件类型
.fileType(EngineFileType.HTML)
//生成模板实现
.produceType(EngineTemplateType.freemarker)
//自定义文件名称
.fileName("自定义文件名称").build();
//忽略表
ArrayList<String> ignoreTableName = new ArrayList<>();
ignoreTableName.add("test_user");
ignoreTableName.add("test_group");
//忽略表前缀
ArrayList<String> ignorePrefix = new ArrayList<>();
ignorePrefix.add("test_");
//忽略表后缀
ArrayList<String> ignoreSuffix = new ArrayList<>();
ignoreSuffix.add("_test");
ProcessConfig processConfig = ProcessConfig.builder()
//指定生成逻辑、当存在指定表、指定表前缀、指定表后缀时,将生成指定表,其余表不生成、并跳过忽略表配置
//根据名称指定表生成
.designatedTableName(new ArrayList<>())
//根据表前缀生成
.designatedTablePrefix(new ArrayList<>())
//根据表后缀生成
.designatedTableSuffix(new ArrayList<>())
//忽略表名
.ignoreTableName(ignoreTableName)
//忽略表前缀
.ignoreTablePrefix(ignorePrefix)
//忽略表后缀
.ignoreTableSuffix(ignoreSuffix).build();
//配置
Configuration config = Configuration.builder()
//版本
.version("1.0.0")
//描述
.description("数据库设计文档生成")
//数据源
.dataSource(dataSource)
//生成配置
.engineConfig(engineConfig)
//生成配置
.produceConfig(processConfig)
.build();
//执行生成
new DocumentationExecute(config).execute();
}
```
### Maven 插件
``` xml
<build>
<plugins>
<plugin>
<groupId>cn.smallbun.screw</groupId>
<artifactId>screw-maven-plugin</artifactId>
<version>${lastVersion}</version>
<dependencies>
<!-- HikariCP -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.5</version>
</dependency>
<!--mysql driver-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.20</version>
</dependency>
</dependencies>
<configuration>
<!--username-->
<username>root</username>
<!--password-->
<password>password</password>
<!--driver-->
<driverClassName>com.mysql.cj.jdbc.Driver</driverClassName>
<!--jdbc url-->
<jdbcUrl>jdbc:mysql://127.0.0.1:3306/xxxx</jdbcUrl>
<!--生成文件类型-->
<fileType>HTML</fileType>
<!--打开文件输出目录-->
<openOutputDir>false</openOutputDir>
<!--生成模板-->
<produceType>freemarker</produceType>
<!--文档名称 为空时:将采用[数据库名称-描述-版本号]作为文档名称-->
<fileName>测试文档名称</fileName>
<!--描述-->
<description>数据库文档生成</description>
<!--版本-->
<version>${project.version}</version>
<!--标题-->
<title>数据库文档</title>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
```
### 使用文章
+ [SpringBoot整合screw生成数据库文档](https://my.oschina.net/mdxlcj/blog/4341399)
+ [还在手动整理数据库文档?试试这个工具](https://mp.weixin.qq.com/s/Bo_U5_cl82hfQ6GmRs2vtA)
+ [实用!一键生成数据库文档,堪称数据库界的Swagger](https://mp.weixin.qq.com/s/nPwFV7DN8Ogg54_crLlP3g)
### 使用视频
+ [使用screw数据库文档生成工具快速生成数据库文档](https://www.bilibili.com/video/av456302504/)
+ [微人事一键生成数据库文档!炫!](https://mp.weixin.qq.com/s/rUde6XSGSG0jKuy0Wgf1Mw)
## 扩展模块
### pojo生成功能
#### 功能简介
  pojo生成功能是基于screw延伸出的扩展模块,目前处于初步开发的状态。在日常的开发中,经过需求分析、建模之后,往往会先在数据库中建表,其次在进行代码的开发。那么pojo生成功能在这个阶段就可以帮助大家节省一些重复劳动了。使用pojo生成功能可以直接根据数据库生成对应的java pojo对象。这样后续的修改,开发都会很方便。
#### 数据库支持
- [x] MySQL
#### 使用方式
+ **引入依赖**
```xml
<dependency>
<groupId>cn.smallbun.screw</groupId>
<artifactId>screw-extension</artifactId>
<version>${lastVersion}</version>
</dependency>
```
+ **编写代码**
``` java
/**
* pojo生成
*/
void pojoGeneration() {
//数据源
HikariConfig hikariConfig = new HikariConfig();
hikariConfig.setDriverClassName("com.mysql.cj.jdbc.Driver");
hikariConfig.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/screw");
hikariConfig.setUsername("screw");
hikariConfig.setPassword("screw");
//设置可以获取tables remarks信息
hikariConfig.addDataSourceProperty("useInformationSchema", "true");
hikariConfig.setMinimumIdle(2);
hikariConfig.setMaximumPoolSize(5);
DataSource dataSource = new HikariDataSource(hikariConfig);
ProcessConfig processConfig = ProcessConfig.builder()
//指定生成逻辑、当存在指定表、指定表前缀、指定表后缀时,将生成指定表,其余表不生成、并跳过忽略表配置
//根据名称指定表生成
.designatedTableName(new ArrayList<>())
//根据表前缀生成
.designatedTablePrefix(new ArrayList<>())
//根据表后缀生成
.designatedTableSuffix(new ArrayList<>()).build();
//设置生成pojo相关配置
PojoConfiguration config = new PojoConfiguration();
//设置文件存放路径
config.setPath("/cn/smallbun/screw/");
//设置包名
config.setPackageName("cn.smallbun.screw");
//设置是否使用lombok
config.setUseLombok(false);
//设置数据源
config.setDataSource(dataSource);
//设置命名策略
config.setNameStrategy(new HumpNameStrategy());
//设置表过滤逻辑
config.setProcessConfig(processConfig);
//执行生成
new PojoExecute(config).execute();
}
```
## 更多支持
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img src="https://images.gitee.com/uploads/images/2020/0622/161414_eaa2819d_1407605.jpeg" width="300" height="300" alt="WeChat"/> </td>
<td align="center"><img src="https://images.gitee.com/uploads/images/2021/0806/091540_66d72182_1407605.png" width="300" height="300" alt="WeChat"/></td>
<td align="center"><img src="https://images.gitee.com/uploads/images/2020/0707/191620_9a63fb23_1407605.png" width="300" height="300" alt="QQ"/></td>
</tr>
<tr>
<td align="center">微信公众号</td>
<td align="center">微信交流群</td>
<td align="center">QQ交流群</td>
</tr>
</table>
+ 扫码关注官方微信公众号,第一时间尊享最新动向,回复 **screw** 获取作者微信号。
## 谁在使用
> 名称排序按登记先后,登记仅仅为了产品推广,希望出现您公司名称的小伙伴可以告诉我们。
+ 山东顺能网络科技有限公司
+ 顺众数字科技(山东)有限公司
+ 江苏立华牧业股份有限公司
+ 上海德邦物流有限公司
+ 兰州百格网络科技有限公司
+ 杭州惠合信息科技有限公司
+ 浙大网新科技股份有限公司
+ 金蝶中国(武汉)分公司
## 常见问题
+ 生成后文档乱码?
MySQL:URL加入`?characterEncoding=UTF-8`。
+ Caused by: java.lang.NoSuchFieldError: VERSION_2_3_30?
检查项目`freemarker`依赖,这是由于版本过低造成的,升级版本为`2.3.30`即可。
+ java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.getSchema()Ljava/lang/String;
这是因为oracle驱动版本过低造成的,删除或屏蔽目前驱动版本,驱动添加升级为以下版本:
``` xml
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
<dependency>
<groupId>cn.easyproject</groupId>
<artifactId>orai18n</artifactId>
<version>12.1.0.2.0</version>
</dependency>
```
+ MySQL数据库表和列字段有说明、生成文档没有说明?
URL链接加入`useInformationSchema=true`即可。
+ java.lang.AbstractMethodError: com.mysql.jdbc.JDBC4Connection.getSchema()Ljava/lang/String;
这是因为mysql驱动版本过低造成的,升级mysql驱动版本为最新即可。
## 推荐开源项目
| 项目名称 | 项目描述 |
| ------------- |:-------------:|
|[api-boot](https://gitee.com/minbox-projects/api-boot)|为组件化构建Api服务而生|
## 参与贡献
恳请的希望有兴趣的同学能够参与到**screw**建设中来,让我们共同完善它,让我们共同成长,帮助更多开发者,解决更多的问题。
## License
<img src='https://www.gnu.org/graphics/lgplv3-with-text-154x68.png' alt="license">
## 捐赠支持
  我们一直致力于为您提供更好的数据库文档生成器。为了**screw**更好的发展和社区更加的繁荣,我们需要您的支持。<br/>
  捐赠的目的是获得资金来维持我们所提供的程序和服务,捐款是基于大家自愿的原则,建议大家使用 支付宝 的"转账付款"功能,即时到帐。您的支持是鼓励我们前行的动力,无论金额多少都足够表达您这份心意。<br/>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img src="https://images.gitee.com/uploads/images/2020/0622/161414_c87e1846_1407605.png" width="200" height="200" /> </td>
<td align="center"><img src="https://images.gitee.com/uploads/images/2020/0622/161414_e953f85f_1407605.png" width="200" height="200" /></td>
</tr>
<tr>
<td align="center">支付宝</td>
<td align="center">微信</td>
</tr>
</table>
>**screw** 感谢您选择相信和支持!
| 0 |
apache/incubator-fury | A blazingly fast multi-language serialization framework powered by JIT and zero-copy. | 2023-04-28T03:57:00Z | null | <div align="center">
<img width="65%" alt="" src="docs/images/logo/fury_github_banner.png"><br>
</div>
[![Build Status](https://img.shields.io/github/actions/workflow/status/apache/incubator-fury/ci.yml?branch=main&style=for-the-badge&label=GITHUB%20ACTIONS&logo=github)](https://github.com/apache/incubator-fury/actions/workflows/ci.yml)
[![Slack Channel](https://img.shields.io/badge/slack-join-3f0e40?logo=slack&style=for-the-badge)](https://join.slack.com/t/fury-project/shared_invite/zt-1u8soj4qc-ieYEu7ciHOqA2mo47llS8A)
[![Twitter](https://img.shields.io/badge/@ApacheFury-follow-blue?logo=twitter&style=for-the-badge)](https://twitter.com/ApacheFury)
[![Maven Version](https://img.shields.io/maven-central/v/org.apache.fury/fury-core?style=for-the-badge)](https://search.maven.org/#search|gav|1|g:"org.apache.fury"%20AND%20a:"fury-core")
**Apache Fury (incubating)** is a blazingly-fast multi-language serialization framework powered by **JIT** (just-in-time compilation) and **zero-copy**, providing up to 170x performance and ultimate ease of use.
https://fury.apache.org
## Features
- **Multiple languages**: Java/Python/C++/Golang/JavaScript/Rust/Scala/TypeScript.
- **Zero-copy**: Cross-language out-of-band serialization inspired
by [pickle5](https://peps.python.org/pep-0574/) and off-heap read/write.
- **High performance**: A highly-extensible JIT framework to generate serializer code at runtime in an async multi-thread way to speed serialization, providing 20-170x speed up by:
- reduce memory access by inlining variables in generated code.
- reduce virtual method invocation by inline call in generated code.
- reduce conditional branching.
- reduce hash lookup.
- **Multiple binary protocols**: Object graph, row format, and so on.
In addition to cross-language serialization, Fury also features at:
- Drop-in replace Java serialization frameworks such as JDK/Kryo/Hessian, but 100x faster at most, which can greatly improve
the efficiency of high-performance RPC calls, data transfer, and object persistence.
- **100% compatible** with JDK serialization API with much faster implementation: supporting JDK `writeObject`/`readObject`/`writeReplace`/`readResolve`/`readObjectNoData`/`Externalizable` API.
- Supports **Java 8~21**, Java 17+ `record` is supported too.
- Supports [AOT compilation serialization](docs/guide/graalvm_guide.md) for **GraalVM native image**, and no reflection/serialization json config are needed.
- Supports shared and circular reference object serialization for golang.
- Supports [scala serialization](docs/guide/scala_guide.md)
- Supports automatic object serialization for golang.
## Protocols
Fury designed and implemented multiple binary protocols for different scenarios:
- **[xlang serialization format](docs/specification/xlang_serialization_spec.md)**:
- Cross-language serialize any object automatically, no need for IDL definition, schema compilation and object to/from
protocol conversion.
- Support optional shared reference and circular reference, no duplicate data or recursion error.
- Support object polymorphism.
- **[Java serialization format](docs/specification/java_serialization_spec.md)**: Highly-optimized and drop-in replacement for Java serialization.
- **[Row format format](docs/specification/row_format_spec.md)**: A cache-friendly binary random access format, supports skipping serialization and
partial serialization, and can convert to column-format automatically.
New protocols can be easily added based on Fury existing buffer, encoding, meta, codegen and other capabilities. All of those share the same codebase, and the optimization for one protocol can be reused by another protocol.
## Benchmarks
Different serialization frameworks are suitable for different scenarios, and benchmark results here are for reference only.
If you need to benchmark for your specific scenario, make sure all serialization frameworks are appropriately configured for that scenario.
Dynamic serialization frameworks support polymorphism and references, but they often come with a higher cost compared to static serialization frameworks, unless they utilize JIT techniques like Fury does.
To ensure accurate benchmark statistics, it is advisable to **warm up** the system before collecting data due to Fury's runtime code generation.
### Java Serialization
In these charts below, titles containing "compatible" represent schema compatible mode: type forward/backward compatibility is enabled; while titles without "compatible" represent schema consistent mode: class schema must be the same between serialization and deserialization.
Where `Struct` is a class with [100 primitive fields](https://github.com/apache/incubator-fury/tree/main/docs/benchmarks#Struct), `MediaContent` is a class from [jvm-serializers](https://github.com/eishay/jvm-serializers/blob/master/tpc/src/data/media/MediaContent.java), and `Sample` is a class from [kryo benchmark](https://github.com/EsotericSoftware/kryo/blob/master/benchmarks/src/main/java/com/esotericsoftware/kryo/benchmarks/data/Sample.java).
<p align="center">
<img width="24%" alt="" src="docs/benchmarks/compatible/bench_serialize_compatible_STRUCT_to_directBuffer_tps.png">
<img width="24%" alt="" src="docs/benchmarks/compatible/bench_serialize_compatible_MEDIA_CONTENT_to_array_tps.png">
<img width="24%" alt="" src="docs/benchmarks/serialization/bench_serialize_MEDIA_CONTENT_to_array_tps.png">
<img width="24%" alt="" src="docs/benchmarks/serialization/bench_serialize_SAMPLE_to_array_tps.png">
</p>
<p align="center">
<img width="24%" alt="" src="docs/benchmarks/compatible/bench_deserialize_compatible_STRUCT_from_directBuffer_tps.png">
<img width="24%" alt="" src="docs/benchmarks/compatible/bench_deserialize_compatible_MEDIA_CONTENT_from_array_tps.png">
<img width="24%" alt="" src="docs/benchmarks/deserialization/bench_deserialize_MEDIA_CONTENT_from_array_tps.png">
<img width="24%" alt="" src="docs/benchmarks/deserialization/bench_deserialize_SAMPLE_from_array_tps.png">
</p>
See [benchmarks](https://github.com/apache/incubator-fury/tree/main/docs/benchmarks) for more benchmarks about type forward/backward compatibility, off-heap support, zero-copy serialization.
## Installation
### Java
Nightly snapshot:
```xml
<repositories>
<repository>
<id>apache</id>
<url>https://repository.apache.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependency>
<groupId>org.apache.fury</groupId>
<artifactId>fury-core</artifactId>
<version>0.6.0-SNAPSHOT</version>
</dependency>
<!-- row/arrow format support -->
<!-- <dependency>
<groupId>org.apache.fury</groupId>
<artifactId>fury-format</artifactId>
<version>0.6.0-SNAPSHOT</version>
</dependency> -->
```
Release version:
```xml
<dependency>
<groupId>org.apache.fury</groupId>
<artifactId>fury-core</artifactId>
<version>0.5.0</version>
</dependency>
<!-- row/arrow format support -->
<!-- <dependency>
<groupId>org.apache.fury</groupId>
<artifactId>fury-format</artifactId>
<version>0.5.0</version>
</dependency> -->
```
### Scala
```sbt
libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"
```
### Python
```bash
pip install pyfury
```
### JavaScript
```bash
npm install @furyjs/fury
```
### Golang
```bash
go get github.com/apache/incubator-fury/go/fury
```
## Quickstart
Here we give a quick start about how to use Fury, see [user guide](docs/README.md) for more details about [java](docs/guide/java_serialization_guide.md), [cross language](docs/guide/xlang_serialization_guide.md), and [row format](docs/guide/row_format_guide.md).
### Fury java object graph serialization
If you don't have cross-language requirements, using this mode will
result in better performance.
```java
import org.apache.fury.*;
import org.apache.fury.config.*;
import java.util.*;
public class Example {
public static void main(String[] args) {
SomeClass object = new SomeClass();
// Note that Fury instances should be reused between
// multiple serializations of different objects.
{
Fury fury = Fury.builder().withLanguage(Language.JAVA)
// Allow to deserialize objects unknown types, more flexible
// but may be insecure if the classes contains malicious code.
.requireClassRegistration(true)
.build();
// Registering types can reduce class name serialization overhead, but not mandatory.
// If class registration enabled, all custom types must be registered.
fury.register(SomeClass.class);
byte[] bytes = fury.serialize(object);
System.out.println(fury.deserialize(bytes));
}
{
ThreadSafeFury fury = Fury.builder().withLanguage(Language.JAVA)
// Allow to deserialize objects unknown types, more flexible
// but may be insecure if the classes contains malicious code.
.requireClassRegistration(true)
.buildThreadSafeFury();
byte[] bytes = fury.serialize(object);
System.out.println(fury.deserialize(bytes));
}
{
ThreadSafeFury fury = new ThreadLocalFury(classLoader -> {
Fury f = Fury.builder().withLanguage(Language.JAVA)
.withClassLoader(classLoader).build();
f.register(SomeClass.class);
return f;
});
byte[] bytes = fury.serialize(object);
System.out.println(fury.deserialize(bytes));
}
}
}
```
### Cross-language object graph serialization
**Java**
```java
import org.apache.fury.*;
import org.apache.fury.config.*;
import java.util.*;
public class ReferenceExample {
public static class SomeClass {
SomeClass f1;
Map<String, String> f2;
Map<String, String> f3;
}
public static Object createObject() {
SomeClass obj = new SomeClass();
obj.f1 = obj;
obj.f2 = ofHashMap("k1", "v1", "k2", "v2");
obj.f3 = obj.f2;
return obj;
}
// mvn exec:java -Dexec.mainClass="org.apache.fury.examples.ReferenceExample"
public static void main(String[] args) {
Fury fury = Fury.builder().withLanguage(Language.XLANG)
.withRefTracking(true).build();
fury.register(SomeClass.class, "example.SomeClass");
byte[] bytes = fury.serialize(createObject());
// bytes can be data serialized by other languages.
System.out.println(fury.deserialize(bytes));
}
}
```
**Python**
```python
from typing import Dict
import pyfury
class SomeClass:
f1: "SomeClass"
f2: Dict[str, str]
f3: Dict[str, str]
fury = pyfury.Fury(ref_tracking=True)
fury.register_class(SomeClass, type_tag="example.SomeClass")
obj = SomeClass()
obj.f2 = {"k1": "v1", "k2": "v2"}
obj.f1, obj.f3 = obj, obj.f2
data = fury.serialize(obj)
# bytes can be data serialized by other languages.
print(fury.deserialize(data))
```
**Golang**
```go
package main
import furygo "github.com/apache/incubator-fury/go/fury"
import "fmt"
func main() {
type SomeClass struct {
F1 *SomeClass
F2 map[string]string
F3 map[string]string
}
fury := furygo.NewFury(true)
if err := fury.RegisterTagType("example.SomeClass", SomeClass{}); err != nil {
panic(err)
}
value := &SomeClass{F2: map[string]string{"k1": "v1", "k2": "v2"}}
value.F3 = value.F2
value.F1 = value
bytes, err := fury.Marshal(value)
if err != nil {
}
var newValue interface{}
// bytes can be data serialized by other languages.
if err := fury.Unmarshal(bytes, &newValue); err != nil {
panic(err)
}
fmt.Println(newValue)
}
```
### Row format
#### Java
```java
public class Bar {
String f1;
List<Long> f2;
}
public class Foo {
int f1;
List<Integer> f2;
Map<String, Integer> f3;
List<Bar> f4;
}
RowEncoder<Foo> encoder = Encoders.bean(Foo.class);
Foo foo = new Foo();
foo.f1 = 10;
foo.f2 = IntStream.range(0, 1000000).boxed().collect(Collectors.toList());
foo.f3 = IntStream.range(0, 1000000).boxed().collect(Collectors.toMap(i -> "k"+i, i->i));
List<Bar> bars = new ArrayList<>(1000000);
for (int i = 0; i < 1000000; i++) {
Bar bar = new Bar();
bar.f1 = "s"+i;
bar.f2 = LongStream.range(0, 10).boxed().collect(Collectors.toList());
bars.add(bar);
}
foo.f4 = bars;
// Can be zero-copy read by python
BinaryRow binaryRow = encoder.toRow(foo);
// can be data from python
Foo newFoo = encoder.fromRow(binaryRow);
// zero-copy read List<Integer> f2
BinaryArray binaryArray2 = binaryRow.getArray(1);
// zero-copy read List<Bar> f4
BinaryArray binaryArray4 = binaryRow.getArray(3);
// zero-copy read 11th element of `readList<Bar> f4`
BinaryRow barStruct = binaryArray4.getStruct(10);
// zero-copy read 6th of f2 of 11th element of `readList<Bar> f4`
barStruct.getArray(1).getLong(5);
RowEncoder<Bar> barEncoder = Encoders.bean(Bar.class);
// deserialize part of data.
Bar newBar = barEncoder.fromRow(barStruct);
Bar newBar2 = barEncoder.fromRow(binaryArray4.getStruct(20));
```
#### Python
```python
@dataclass
class Bar:
f1: str
f2: List[pa.int64]
@dataclass
class Foo:
f1: pa.int32
f2: List[pa.int32]
f3: Dict[str, pa.int32]
f4: List[Bar]
encoder = pyfury.encoder(Foo)
foo = Foo(f1=10, f2=list(range(1000_000)),
f3={f"k{i}": i for i in range(1000_000)},
f4=[Bar(f1=f"s{i}", f2=list(range(10))) for i in range(1000_000)])
binary: bytes = encoder.to_row(foo).to_bytes()
foo_row = pyfury.RowData(encoder.schema, binary)
print(foo_row.f2[100000], foo_row.f4[100000].f1, foo_row.f4[200000].f2[5])
```
## Compatibility
### Schema Compatibility
Fury java object graph serialization supports class schema forward/backward compatibility. The serialization peer and deserialization peer can add/delete fields independently.
We plan to add the schema compatibility support of cross-language serialization after [meta compression](https://github.com/apache/incubator-fury/issues/203) is finished.
### Binary Compatibility
We are still improving our protocols, thus binary compatibility is not guaranteed between Fury major releases for now.
However, it is guaranteed between minor versions. Please
`versioning` your data by Fury major version if you will upgrade Fury in the future, see [how to upgrade fury](https://github.com/apache/incubator-fury/blob/main/docs/guide/java_object_graph_guide.md#upgrade-fury) for further details.
Binary compatibility will be guaranteed when Fury 1.0 is released.
## Security
Static serialization is relatively secure. But dynamic serialization such as Fury java/python native serialization supports deserializing unregistered types, which provides more dynamics and flexibility, but also introduce security risks.
For example, the deserialization may invoke `init` constructor or `equals`/`hashCode` method, if the method body contains malicious code, the system will be at risk.
Fury provides a class registration option that is enabled by default for such protocols, allowing only deserialization of trusted registered types or built-in types.
**Do not disable class registration unless you can ensure your environment is secure**.
If this option is disabled, you are responsible for serialization security. You can configure `org.apache.fury.resolver.ClassChecker` by
`ClassResolver#setClassChecker` to control which classes are allowed for serialization.
To report security vulnerabilities found in Fury, please follow the [ASF vulnerability reporting process](https://apache.org/security/#reporting-a-vulnerability).
## How to Build
Please read the [BUILD](docs/guide/DEVELOPMENT.md) guide for instructions on how to build.
## How to Contribute
Please read the [CONTRIBUTING](CONTRIBUTING.md) guide for instructions on how to contribute.
## License
Licensed under the [Apache License, Version 2.0](LICENSE)
| 0 |
Chainfire/libsuperuser | Example code for How-To SU"" | 2012-10-29T18:01:25Z | null | # libsuperuser
[![ci][1]][2] [![](https://jitpack.io/v/eu.chainfire/libsuperuser.svg)](https://jitpack.io/#eu.chainfire/libsuperuser)
Example code for "How-To SU"
For some outdated background details, see:
[http://su.chainfire.eu/](http://su.chainfire.eu/)
Even though its outdated with regards to usage of this library,
if you're unfamiliar with writing code for root usage, it is not
a bad idea to read it.
## License
Copyright © 2012-2019 Jorrit *Chainfire* Jongma
This code is released under the [Apache License version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
## Deprecated
This library is not under active development right now, as I've mostly
moved away from the Android world. While I believe it still works great,
if it breaks due to changes on new Android versions or root solutions,
fixes may be slow to appear.
If you're writing a new app, you might consider using
[TopJohnWu's libsu](https://github.com/topjohnwu/libsu) instead. Barring
some edge-cases (that I personally seem to be the biggest user of) the
capabilities should be similar, but it's likely to be better maintained.
## v1.1.0 update
It is now 2019, 7 years since the initial release of
*libsuperuser*, and I have *finally* gotten around to releasing v1.1.0,
and writing an updated how-to. See, I don't need reminding every 6
months.
This update brings support for commands returning an `InputStream` for
STDOUT, as well as adding per-line and buffered STDERR support to
various methods.
As `Shell.Interactive` can be a bit tricky to use and understand
callback and threading wise, especially when used from a background
thread, the `Shell.Threaded` subclass has been added. This class
maintains its own dedicated background thread, upon which all the
callbacks are executed.
`Shell.Interactive` (and `Shell.Threaded`) have gained synchronous
methods, that may be easier to handle than the asynchronous ones, when
used from a background thread. Obviously one cannot use them from the
main UI thread, as this would block the UI.
Last but not least, `Shell.Pool` has been added, which maintains a
pool of `Shell.Threaded` instances for your app to use; created, cached,
and closed on-demand. For new users, `Shell.Pool` is the place to start.
If you're looking at the source of the library, `Shell.java` has
become way too large and would look better broken up. This is
intentionally not done to maintain better backward compatibility
with old code, of which there is quite a bit.
## Upgrading from v1.0.0 to v1.1.0
No functionality has been removed, but some of the method signatures
have subtly changed, and a lot of methods have been deprecated
(though they will not be removed). The compiler will certainly tell
you about these. Some interface have been renamed, and some methods
were added to existing interfaces. All `Exception` based classes have
moved to inner classes of `Shell`.
`Shell.run(...)`, and all `Shell.SH.xxx` and `Shell.SU.xxx` methods
automatically redirect to their `Shell.Pool.xxx` counterparts. This
is a free speed-up for code using these methods. The redirection
can be turned off by calling `Shell.setRedirectDeprecated(false)`
from something like `Application::onCreate()`.
While most code should run the same without issue, you should
definitely double check, especially for complicated scripts or
commands that set specific environment variables.
`Shell.Interactive` should work exactly as it always has, but
since some threading-related code has changed internally, it is
always wise to check if everything still works as expected.
There is no need to migrate existing `Shell.Interactive` code to
`Shell.Threaded`, unless you want to use the functionality
provided by `Shell.Pool`. Be sure to read about the usage difference
between them below.
Last but not least, `minSdkVersion` was updated from 4 to 5, so
we're losing compatibility with Android 1.6 Donut users, sorry.
## Example project
The example project is very old, and does not follow current best
practises. While `PooledActivity` has been added demonstrating
some calls using `Shell.Threaded` and `Shell.Pool`, they aren't
particularly good. The old code demonstrating both legacy and
interactive modes remains present. Use the mode button at the bottom
to switch between activities.
## Basics
This page is not intended as a full reference, just to get you
started off. There are many methods and classes in the library
not explained here. For more advanced usages, consult the source
code - over 1/3rd of the lines belong to comments.
Some of the below may seem out-of-order, you might want to read
this entire section twice.
#### Blocking, threads, and ShellOnMainThreadException
Running subprocesses is expensive and timings cannot be predicted.
For something like running "su" even more so, as it can launch
a dialog waiting for user interaction. Many methods in this library
may be *blocking* (taking unpredictable time to return). When you
attempt to call any of these methods from the main UI thread, the
library will throw a `Shell.ShellOnMainThreadException` at you, if
your app is compiled in debug mode. (Note that this behavior can
be disabled through the `Debug.setSanityChecksEnabled(false)` call).
Methods that may throw this exception include any of the `run(...)`,
`waitFor...()`, and `close...()` methods, with the exception of
`closeWhenIdle()`.
The `Shell.Builder`, `Shell.Interactive` and `Shell.Threaded` classes
provide `addCommand(...)` methods, which run asynchronously and provide
completion callbacks. `addCommand(...)` can safely be called from
the main UI thread.
`Shell.Interactive` (and its `Shell.Threaded` subclass) is a class
wrapping a running instance of a shell (such as "sh" or "su"),
providing methods to run commands in that shell and return the output
of each individual command and its exit code. As opening a shell
itself can be very expensive (especially so with "su"), it is
preferred to use few interactive shells to run many commands rather
than executing a single shell for each individual command.
`Shell.Interactive` (and its `Shell.Threaded` subclass) uses two
background threads to continuously gobble the input from STDOUT and
STDERR. This is an (unfortunate) requirement to prevent the underlying
shell from possibly deadlocking if it produces large amounts of output.
When an instance of `Shell.Interactive` is created, it determines if
the calling thread has an Android `Looper` attached, if it does, it
creates an Android `Handler`, to which all callbacks (such as the
interfaces passed to `addCommand(...)`) are passed. The callbacks
are then executed on the original calling thread. If a `Looper` is
not available, callbacks are usually executed on the gobbler threads
(which increases the risk of deadlocks, and should be avoided), but
may also be executed on the calling thread (which can cause deadlocks
in your own threading code).
(Didn't make sense? Don't worry about it, and just follow the
advice and examples below)
#### `Shell.Interactive` vs `Shell.Threaded`
`Shell.Interactive`'s threading/callback model *can* be fine when it's
used from the main UI thread. As the main UI thread most certainly has
a `Looper`, there is no problem creating a `Handler`, and the callbacks
are run directly on the main UI thread. While this does allow you to
directly manipulate UI elements from the callbacks, it also causes
jank if your callbacks take too long to execute.
However, when `Shell.Interactive` is used from a background thread,
unless you manually create and manage a special secondary thread for
it (a `HandlerThread`), callbacks run on the gobbler threads, which is
potentially bad.
The `Shell.Threaded` subclass specifically creates and manages this
secondary `HandlerThread` for you, and guarantees all callbacks are
executed on that thread. This prevents most deadlock situations from
happening, and is consistent in its behavior across the board.
The drawback there is that you cannot directly manipulate UI elements
from the callbacks passed to `addCommand(...)` (or any other methods),
but that is probably not what you end up wanting to do in any
real-world app anyway. When the need arises, you can use something
like `Activity::runOnUiThread(...)` to call code that adjusts the UI.
Additionally, `Shell.Threaded` is easier to setup and supports pooling
via `Shell.Pool` (explained further below). The choice which to use
should be easy at this point, unless you have some very specific needs.
If you are porting from `Shell.Interactive` to `Shell.Threaded`, please
note that the behavior of the `close()` method is different between
the two. In `Shell.Interactive` it redirects to `closeImmediately()`,
which waits for all commands to complete and then closes the shell.
In `Shell.Threaded` it returns the shell to the pool if it is
part of one, and otherwise redirects to `closeWhenIdle()`, which
schedules the actual close when all commands have completed, but
returns immediately. This discrepancy is unfortunate but required
to maintain both good backwards compatibility and support pooling
with try-with-resources.
#### Common methods
Examples follow further below, which make use of pooling. But before
pooling can be explained, the common methods you will use with
different classes need a quick walk-through.
#### Common methods: `addCommand(...)`
The `Shell.Builder` (used to manually construct `Shell.Interactive`
and `Shell.Threaded` instances), `Shell.Interactive` and
`Shell.Threaded` classes provide `addCommand(...)` methods. These
run asynchronously and are safe to call from the main UI thread: they
return before the commands complete, and an optionally provided
callback is executed when the command does complete:
- `addCommand(Object commands)`
- `addCommand(Object commands, int code, OnResult onResultListener)`
`commands` accepts a `String`, a `List<String>`, or a `String[]`.
`onResultListener` is one of:
- `OnCommandResultListener2`, which buffers STDOUT and STDERR and
returns them to the callback all in one go
- `OnCommandLineListener`, which is unbuffered and is called once
for each line read from STDOUT or STDERR
- `OnCommandInputStreamListener`, which is called with an
`InputStream` you can use to read raw data from the shell. You
should continue reading the `InputStream` until *-1* is returned
(*not 0* as is sometimes done), or further commands on this shell
will not execute. You can call `InputStream::close()` to do this
for you. Additionally, if the shell is closed during reading, then
(and only then) an `IOException` will be thrown.
All of these provide an `onCommandResult` method that is called
with the `code` you passed in, and the exit code of the (last) of the
commands passed in. Note that the exit code will be < 0 if an error
occurs, such as the shell being closed.
The `addCommand(...)` calls will *not* be further explained in this
document, consult the example project (`InteractiveActivity.java`)
and the library source for further details.
#### Common methods: `run(...)`
The `Shell.Interactive`, `Shell.Threaded`, and `Shell.PoolWrapper`
classes provide `run(...)` methods. These run synchronously and are
*not* safe to call from the main UI thread: they return when the
command is completed:
- `int run(Object commands)`
- `int run(Object commands, List<String> STDOUT, List<String> STDERR, boolean clear)`
- `int run(Object commands, OnSyncCommandLineListener onSyncCommandLineListener)`
- `int run(Object commands, OnSyncCommandInputStreamListener onSyncCommandInputStreamListener)`
As before, `commands` accepts a `String`, a `List<String>`, or a `String[]`.
It should be obvious that these are simply the synchronous counterparts
of the asynchronous `addCommand(...)` methods.
Instead of calling a callback interface with the exit code, it is
returned directly, and instead of returning a negative exit code on
error, `Shell.ShellDiedException` is thrown.
#### Pooling
The `Shell.Pool` class provides shell pooling. It will create new
shell instances on-demand, and keep a set number of them around for
reuse later (4 by default for "su" instances, 1 for non-"su" instances).
`Shell.Pool.SH` and `Shell.Pool.SU` are pre-created instances of
`Shell.PoolWrapper` for "sh" and "su", providing `get()` and the
earlier mentions `run(...)` methods for the pool.
The `get()` method can be used to retrieve a `Shell.Threaded` instance
from the pool, which you should later return to the pool by calling
it's `close()` method.
The `run(...)` methods, instead of operating on a specific
`Shell.Threaded` instance you manage, retrieve an instance from the
pool, proxies the call to that instance's `run(...)` method, and
then immediately returns the instance to the pool.
Sound complex? Maybe, but it all comes together so you can sprinkle
`Shell.Pool.SU.run(...)` calls throughout as many threads as you wish
(barring of course the main UI thread), running simultaneously or not,
with instances being created, reused, and closed automatically. All of
this without you ever having to worry about managing the instances,
and only having to catch a single `Shell.ShellDiedException`.
#### Examples
It is assumed all the code following is run from a background thread,
such as `Thread`, `AsyncTask`, or `(Job)IntentService`.
Running some basic commands:
```
try {
List<String> STDOUT = new ArrayList<String>();
List<String> STDERR = new ArrayList<String>();
int exitCode;
exitCode = Shell.Pool.SU.run("echo nobody will ever see this");
// we have only an exit code
exitCode = Shell.Pool.SU.run("ls -l /", STDOUT, STDERR, true);
// exit code, and STDOUT/STDERR output
exitCode = Shell.Pool.SU.run("cat /init.rc", new Shell.OnSyncCommandInputStreamListener() {
@Override
public void onInputStream(InputStream inputStream) {
try {
byte[] buf = new byte[16384];
int r;
while ((r = inputStream.read(buf)) >= 0) {
// do something with buf
// if we decide to abort before r == -1, call inputStream.close()
}
} catch (IOException e) {
// shell died during read
}
}
@Override
public void onSTDERR(String line) {
// hey, some output on STDERR!
}
});
Shell.Pool.SU.run("logcat -d", new Shell.OnSyncCommandLineListener() {
@Override
public void onSTDOUT(String line) {
// hey, some output on STDOUT!
}
@Override
public void onSTDERR(String line) {
// hey, some output on STDERR!
}
});
} catch (Shell.ShellDiedException e) {
// su isn't present, access was denied, or the shell terminated while 'run'ing
}
```
When running multiple commands in quick succession, it is slightly
cheaper to `get()` an instance and `close()` it when done, and using
the returned instance. But keep in mind if there is a longer period
between your calls, and another thread wants to call su, the shell you
have not `close()`'d yet cannot be reused by that thread:
```
try {
// get an instance from the pool
Shell.Threaded shell = Shell.Pool.SU.get();
try {
// this is very useful
for (int i = 0; i < 100; i++) {
shell.run("echo nobody will ever see this");
}
} finally {
// return the instance to the pool
shell.close();
}
} catch (Shell.ShellDiedException e) {
// su isn't present, access was denied, or the shell terminated while 'run'ing
}
```
If you're targeting API >= 19 and Java 1.8, you can use
try-with-resources with `Shell.Threaded::ac()`, which casts the
instance to a `Shell.ThreadedAutoCloseable`:
```
try {
// get an instance from the pool, automatically returning it at the end of the try block
try (Shell.ThreadedAutoCloseable shell = Shell.Pool.SU.get().ac()) {
// this is very useful
for (int i = 0; i < 100; i++) {
shell.run("echo nobody will ever see this");
}
}
} catch (Shell.ShellDiedException e) {
// su isn't present, access was denied, or the shell terminated while 'run'ing
}
```
## libRootJava
For more advanced usages of root, such as running Java/Kotlin code as
root directly, please see my [libRootJava](https://github.com/Chainfire/librootjava)
library.
## Annotations
Nullity and thread annotations have recently been added.
Please note that *all* methods that *may* be problematic on the UI
thread have been marked as `@WorkerThread`. Some of these methods
can be called from the UI thread without issue in specific conditions.
If so, those conditions should be noted in the method's javadoc.
## Gradle
Root `build.gradle`:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
Module `build.gradle`:
```
dependencies {
implementation 'eu.chainfire:libsuperuser:1.1.1'
}
```
[1]: https://github.com/Chainfire/libsuperuser/workflows/ci/badge.svg
[2]: https://github.com/Chainfire/libsuperuser/actions
| 1 |
apache/incubator-kie-drools | Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java. | 2011-02-18T08:37:05Z | null | <!--
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.
-->
An open source rule engine, [DMN engine](https://drools.org/learn/dmn.html) and complex event processing (CEP) engine for Java™ and the JVM Platform.
Drools is a business rule management system with a forward-chaining and backward-chaining inference based rules engine, allowing fast and reliable evaluation of business rules and complex event processing. A rule engine is also a fundamental building block to create an expert system which, in artificial intelligence, is a computer system that emulates the decision-making ability of a human expert.
Be sure to check out the Drools' project [website](https://drools.org) and [documentation](https://drools.org/learn/documentation.html)!
Developing Drools and jBPM
==========================
**If you want to build or contribute to a kiegroup project, [read this document](https://github.com/kiegroup/droolsjbpm-build-bootstrap/blob/main/README.md).**
**It will save you and us a lot of time by setting up your development environment correctly.**
It solves all known pitfalls that can disrupt your development.
It also describes all guidelines, tips and tricks.
If you want your pull requests (or patches) to be merged, please respect those guidelines.
Test execution tip
==================
Some test are meant to be executed on machine with _en_US_ locale.
A specific profile is provided to execute them on machines with different locale, namely `test-en`.
There are two ways to activate such profile during maven build:
1. `-Ptest-en` (profile-id based)
2. `-DTestEn` (property based)
The following two commands will execute tests on machine with locale different than _en_US_:
1. `make test -Ptest-en`
2. `make test -DTestEn`
An open source rule engine, [DMN engine](https://drools.org/learn/dmn.html) and complex event processing (CEP) engine for Java™ and the JVM Platform.
Drools is a business rule management system with a forward-chaining and backward-chaining inference based rules engine, allowing fast and reliable evaluation of business rules and complex event processing. A rule engine is also a fundamental building block to create an expert system which, in artificial intelligence, is a computer system that emulates the decision-making ability of a human expert.
Be sure to check out the Drools' project [website](https://drools.org) and [documentation](https://drools.org/learn/documentation.html)!
Developing Drools and jBPM
==========================
**If you want to build or contribute to a kiegroup project, [read this document](https://github.com/kiegroup/droolsjbpm-build-bootstrap/blob/main/README.md).**
**It will save you and us a lot of time by setting up your development environment correctly.**
It solves all known pitfalls that can disrupt your development.
It also describes all guidelines, tips and tricks.
If you want your pull requests (or patches) to be merged, please respect those guidelines.
Test execution tip
==================
Some test are meant to be executed on machine with _en_US_ locale.
A specific profile is provided to execute them on machines with different locale, namely `test-en`.
There are two ways to activate such profile during maven build:
1. `-Ptest-en` (profile-id based)
2. `-DTestEn` (property based)
The following two commands will execute tests on machine with locale different than _en_US_:
1. `make test -Ptest-en`
2. `make test -DTestEn`
| 0 |
ffay/lanproxy | lanproxy是一个将局域网个人电脑、服务器代理到公网的内网穿透工具,支持tcp流量转发,可支持任何tcp上层协议(访问内网网站、本地支付接口调试、ssh访问、远程桌面、http代理、https代理、socks5代理...)。技术交流QQ群 736294209 | 2016-11-20T08:12:10Z | null | ## 技术交流QQ群 736294209
## Lanproxy运营版上线,欢迎体验
https://nat.nioee.com
## Lanproxy个人升级版
核心功能:
- 穿透基础功能,同开源版本,高性能,可同时支持数万穿透连接
- 全新界面UI,操作简单,部署简单(java+mysql)
- 自定义域名绑定,为你穿透端口绑定域名,不再是IP+端口裸奔访问
- 自定义域名ssl证书,也可为你绑定的域名开启ssl证书自动申请与续期,无需人工干涉
- 自定义客户端离线展示页面,可以利用该功能展示一些html单页
- 支持http/https/socks5多种模式使用客户端网络代理上网,家里轻松访问公司网络
- 多用户支持,同时满足多人日常穿透需求
体验地址 https://lanp.nioee.com (测试用户名密码 test/123456)
![panel](panel.png)
## Lanproxy开源免费版
[README](README_en.md) | [中文文档](README.md)
lanproxy是一个将局域网个人电脑、服务器代理到公网的内网穿透工具,支持tcp流量转发,可支持任何tcp上层协议(访问内网网站、本地支付接口调试、ssh访问、远程桌面...)。目前市面上提供类似服务的有花生壳、TeamView、GoToMyCloud等等,但要使用第三方的公网服务器就必须为第三方付费,并且这些服务都有各种各样的限制,此外,由于数据包会流经第三方,因此对数据安全也是一大隐患。
### 相关地址
- 主页 https://nat.nioee.com
- lanproxy-go-client https://github.com/ffay/lanproxy-go-client
- 发布包下载地址 https://github.com/ffay/lanproxy/releases
### 使用
#### 获取发布包
- 拉取源码,运行 mvn package,打包后的资源放在distribution目录中,包括client和server
- 或直接下载发布包 https://github.com/ffay/lanproxy/releases
#### 配置
##### server配置
server的配置文件放置在conf目录中,配置 config.properties
```properties
server.bind=0.0.0.0
#与代理客户端通信端口
server.port=4900
#ssl相关配置
server.ssl.enable=true
server.ssl.bind=0.0.0.0
server.ssl.port=4993
server.ssl.jksPath=test.jks
server.ssl.keyStorePassword=123456
server.ssl.keyManagerPassword=123456
#这个配置可以忽略
server.ssl.needsClientAuth=false
#WEB在线配置管理相关信息
config.server.bind=0.0.0.0
config.server.port=8090
config.admin.username=admin
config.admin.password=admin
```
代理配置,打开地址 http://ip:8090 ,使用上面配置中配置的用户名密码登录,进入如下代理配置界面
![webconfig](readme_zh_client_list.png)
![webconfig](readme_zh_proxy_list.png)
![webconfig](readme_zh_stat_list.png)
> 一个server可以支持多个客户端连接
> 配置数据存放在 ~/.lanproxy/config.json 文件中
##### Java 客户端配置
> Java client的配置文件放置在conf目录中,配置 config.properties
```properties
#与在proxy-server配置后台创建客户端时填写的秘钥保持一致;
client.key=
ssl.enable=true
ssl.jksPath=test.jks
ssl.keyStorePassword=123456
#这里填写实际的proxy-server地址;没有服务器默认即可,自己有服务器的更换为自己的proxy-server(IP)地址
server.host=lp.thingsglobal.org
#proxy-server ssl默认端口4993,默认普通端口4900
#ssl.enable=true时这里填写ssl端口,ssl.enable=false时这里填写普通端口
server.port=4993
```
- 安装java1.7或以上环境
- linux(mac)环境中运行bin目录下的 startup.sh
- windows环境中运行bin目录下的 startup.bat
##### 其他平台客户端
> 不用java客户端的可以使用下面提供的各个平台的客户端,省去安装java运行环境
###### 源码地址
https://github.com/ffay/lanproxy-go-client
###### 发布包
https://github.com/ffay/lanproxy-go-client/releases
###### 普通端口连接
```shell
# mac 64位
nohup ./client_darwin_amd64 -s SERVER_IP -p SERVER_PORT -k CLIENT_KEY &
# linux 64位
nohup ./client_linux_amd64 -s SERVER_IP -p SERVER_PORT -k CLIENT_KEY &
# windows 64 位
./client_windows_amd64.exe -s SERVER_IP -p SERVER_PORT -k CLIENT_KEY
```
###### SSL端口连接
```shell
# mac 64位
nohup ./client_darwin_amd64 -s SERVER_IP -p SERVER_SSL_PORT -k CLIENT_KEY -ssl true &
# linux 64位
nohup ./client_linux_amd64 -s SERVER_IP -p SERVER_SSL_PORT -k CLIENT_KEY -ssl true &
# windows 64 位
./client_windows_amd64.exe -s SERVER_IP -p SERVER_SSL_PORT -k CLIENT_KEY -ssl true
```
#### 其他
- 在家里使用公司的网络,可以和 https://github.com/ffay/http-proxy-server 这个http代理项目配合使用(个人升级版已经内置代理上网功能,详细资料 https://file.nioee.com/f/76ebbce67c864e4dbe7e/ )
- 对于正常网站,80和443端口只有一个,可以购买个人升级版本解决端口复用问题
| 0 |
btraceio/btrace | BTrace - a safe, dynamic tracing tool for the Java platform | 2014-08-28T18:58:24Z | null | [![Dev build](https://github.com/btraceio/btrace/workflows/BTrace%20CI%2FCD/badge.svg?branch=develop)](https://github.com/btraceio/btrace/actions?query=workflow%3A%22BTrace+CI%2FCD%22+branch%3Adevelop) [![Download](https://img.shields.io/github/v/release/btraceio/btrace?sort=semver)](https://github.com/btraceio/btrace/releases/latest) [![codecov.io](https://codecov.io/github/btraceio/btrace/coverage.svg?branch=develop)](https://codecov.io/github/btraceio/btrace?branch=develop) [![huhu](https://img.shields.io/badge/Slack-join%20chat-brightgreen")](http://btrace.slack.com/) [![Join the chat at https://gitter.im/jbachorik/btrace](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/btraceio/btrace?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Project Stats](https://www.openhub.net/p/btrace/widgets/project_thin_badge.gif)](https://www.openhub.net/p/btrace)
# btrace
A safe, dynamic tracing tool for the Java platform
## Version
2.2.4
## Quick Summary
BTrace is a safe, dynamic tracing tool for the Java platform.
BTrace can be used to dynamically trace a running Java program (similar to DTrace for OpenSolaris applications and OS). BTrace dynamically instruments the classes of the target application to inject tracing code ("bytecode tracing").
## Credits
* Based on [ASM](http://asm.ow2.org/)
* Powered by [JCTools](https://github.com/JCTools/JCTools)
* Powered by [hppcrt](https://github.com/vsonnier/hppcrt)
* Optimized with [JProfiler Java Profiler](http://www.ej-technologies.com/products/jprofiler/overview.html)
* Build env helper using [SDKMAN!](https://sdkman.io/)
## Building BTrace
### Setup
You will need the following applications installed
* [Git](http://git-scm.com/downloads)
* (optionally, the default launcher is the bundled `gradlew` wrapper) [Gradle](http://gradle.org)
### Build
#### Gradle
```sh
cd <btrace>
./gradlew :btrace-dist:build
```
The binary dist packages can be found in `<btrace>/btrace-dist/build/distributions` as the *.tar.gz, *.zip, *.rpm and *.deb files.
The exploded binary folder which can be used right away is located at `<btrace>/btrace-dist/build/resources/main` which serves as the __BTRACE_HOME__ location.
## Using BTrace
### Installation
Download a distribution file from the [release page](https://github.com/btraceio/btrace/releases/latest). Explode the binary distribution file (either *.tar.gz or *.zip) to a directory of your choice.
You may set the system environment variable __BTRACE_HOME__ to point to the directory containing the exploded distribution.
You may enhance the system environment variable __PATH__ with __$BTRACE_HOME/bin__ for your convenience.
Or, alternatively, you may install one of the *.rpm or *.deb packages
### Running
* `<btrace>/bin/btrace <PID> <trace_script>` will attach to the __java__ application with the given __PID__ and compile and submit the trace script
* `<btrace>/bin/btracec <trace_script>` will compile the provided trace script
* `<btrace>/bin/btracer <compiled_script> <args to launch a java app>` will start the specified java application with the btrace agent running and the script previously compiled by *btracec* loaded
For the detailed user guide, please, check the [Wiki](https://github.com/btraceio/btrace/wiki/Home).
### Maven Integration
The [maven plugin](https://github.com/btraceio/btrace-maven) is providing easy compilation of __BTrace__ scripts as a part of the build process. As a bonus you can utilize the _BTrace Project Archetype_ to bootstrap developing __BTrace__ scripts.
## Contributing - !!! Important !!!
Pull requests can be accepted only from the signers of [Oracle Contributor Agreement](https://oca.opensource.oracle.com/)
### Deb Repository
Using the command line, add the following to your /etc/apt/sources.list system config file:
```
echo "deb http://dl.bintray.com/btraceio/deb xenial universe" | sudo tee -a /etc/apt/sources.list
```
Or, add the repository URLs using the "Software Sources" admin UI:
```
deb http://dl.bintray.com/btraceio/deb xenial universe
```
### RPM Repository
Grab the _*.repo_ file `wget https://bintray.com/btraceio/rpm/rpm -O bintray-btraceio-rpm.repo` and use it.
| 0 |
aws/aws-sdk-java-v2 | The official AWS SDK for Java - Version 2 | 2017-06-23T18:56:01Z | null | # AWS SDK for Java 2.0
![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiTFJSRXBBN1hkU1ZEQzZ4M1hoaWlFUExuNER3WjNpVllSQ09Qam1YdFlTSDNTd3RpZzNia3F0VkJRUTBwZlQwR1BEelpSV2dWVnp4YTBCOFZKRzRUR004PSIsIml2UGFyYW1ldGVyU3BlYyI6ImdHdEp1UHhKckpDRmhmQU4iLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)
[![Maven](https://img.shields.io/maven-central/v/software.amazon.awssdk/s3.svg?label=Maven)](https://search.maven.org/search?q=g:%22software.amazon.awssdk%22%20AND%20a:%22s3%22)
[![Gitter](https://badges.gitter.im/aws/aws-sdk-java-v2.svg)](https://gitter.im/aws/aws-sdk-java-v2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![codecov](https://codecov.io/gh/aws/aws-sdk-java-v2/branch/master/graph/badge.svg)](https://codecov.io/gh/aws/aws-sdk-java-v2)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-109-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
The **AWS SDK for Java 2.0** is a rewrite of 1.0 with some great new features. As with version 1.0,
it enables you to easily work with [Amazon Web Services][aws] but also includes features like
non-blocking IO and pluggable HTTP implementation to further customize your applications. You can
get started in minutes using ***Maven*** or any build system that supports MavenCentral as an
artifact source.
* [SDK Homepage][sdk-website]
* [1.11 to 2.0 Changelog](docs/LaunchChangelog.md)
* [Best Practices](docs/BestPractices.md)
* [Sample Code](#sample-code)
* [API Docs][docs-api]
* [Developer Guide][docs-guide] ([source][docs-guide-source])
* [Maven Archetypes](archetypes/README.md)
* [Issues][sdk-issues]
* [SDK Blog][blog]
* [Giving Feedback](#giving-feedback)
## Getting Started
#### Sign up for AWS ####
Before you begin, you need an AWS account. Please see the [Sign Up for AWS][docs-signup] section of
the developer guide for information about how to create an AWS account and retrieve your AWS
credentials.
#### Minimum requirements ####
To run the SDK you will need **Java 1.8+**. For more information about the requirements and optimum
settings for the SDK, please see the [Installing a Java Development Environment][docs-java-env]
section of the developer guide.
## Using the SDK
The recommended way to use the AWS SDK for Java in your project is to consume it from Maven Central.
#### Importing the BOM ####
To automatically manage module versions (currently all modules have the same version, but this may not always be the case) we recommend you use the [Bill of Materials][bom] import as follows:
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.25.50</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
Then individual modules may omit the `version` from their dependency statement:
```xml
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
</dependency>
</dependencies>
```
#### Individual Services ####
Alternatively you can add dependencies for the specific services you use only:
```xml
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.25.50</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.25.50</version>
</dependency>
```
#### Whole SDK ####
You can import the whole SDK into your project (includes *ALL* services). Please note that it is recommended to only import the modules you need.
```xml
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.25.50</version>
</dependency>
```
See the [Set up the AWS SDK for Java][docs-setup] section of the developer guide for more usage information.
## New Features for 2.0
* Provides a way to plug in your own HTTP implementation.
* Provides first class support for non-blocking IO in Async clients.
## Building From Source
Once you check out the code from GitHub, you can build it using the following commands.
Linux:
```sh
./mvnw clean install
# Skip tests, checkstyles, findbugs, etc for quick build
./mvnw clean install -P quick
# Build a specific service module
./mvnw clean install -pl :s3 -P quick --am
```
Windows:
```sh
./mvnw.cmd clean install
```
## Sample Code
You can find sample code for v2 in the following places:
* [aws-doc-sdk-examples] repo.
* Integration tests in this repo. They are located in the `it` directory under each service module, eg: [s3-integration-tests]
## Maintenance and Support for SDK Major Versions
For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the AWS SDKs and Tools Reference Guide:
* [AWS SDKs and Tools Maintenance Policy][maintenance-policy]
* [AWS SDKs and Tools Version Support Matrix][version-matrix]
## Maintenance and Support for Java Versions
We maintain full support on Long-Term Support(LTS) releases: Java 8, Java 11, Java 17, and Java 21.
## Giving Feedback
We need your help in making this SDK great. Please participate in the community and contribute to this effort by submitting issues, participating in discussion forums and submitting pull requests through the following channels:
* Submit [issues][sdk-issues] - this is the **preferred** channel to interact with our team
* Articulate your feature request or upvote existing ones on our [Issues][features] page
[aws-iam-credentials]: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/java-dg-roles.html
[aws]: http://aws.amazon.com/
[blog]: https://aws.amazon.com/blogs/developer/category/java/
[docs-api]: https://sdk.amazonaws.com/java/api/latest/overview-summary.html
[docs-guide]: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/welcome.html
[docs-guide-source]: https://github.com/awsdocs/aws-java-developer-guide-v2
[docs-java-env]: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/setup-install.html##java-dg-java-env
[docs-signup]: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/signup-create-iam-user.html
[docs-setup]: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/setup-install.html
[sdk-issues]: https://github.com/aws/aws-sdk-java-v2/issues
[sdk-license]: http://aws.amazon.com/apache2.0/
[sdk-website]: http://aws.amazon.com/sdkforjava
[aws-java-sdk-bom]: https://github.com/aws/aws-sdk-java-v2/tree/master/bom
[stack-overflow]: http://stackoverflow.com/questions/tagged/aws-java-sdk
[gitter]: https://gitter.im/aws/aws-sdk-java-v2
[features]: https://github.com/aws/aws-sdk-java-v2/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature-request%22
[support-center]: https://console.aws.amazon.com/support/
[console]: https://console.aws.amazon.com
[bom]: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22software.amazon.awssdk%22%20AND%20a%3A%22bom%22
[aws-doc-sdk-examples]: https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2
[s3-integration-tests]: https://github.com/aws/aws-sdk-java-v2/tree/master/services/s3/src/it/java/software/amazon/awssdk/services/s3
[maintenance-policy]: https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html
[version-matrix]: https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sullis"><img src="https://avatars.githubusercontent.com/u/30938?v=4?s=100" width="100px;" alt="sullis"/><br /><sub><b>sullis</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=sullis" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/abrooksv"><img src="https://avatars.githubusercontent.com/u/8992246?v=4?s=100" width="100px;" alt="Austin Brooks"/><br /><sub><b>Austin Brooks</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=abrooksv" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ktoso"><img src="https://avatars.githubusercontent.com/u/120979?v=4?s=100" width="100px;" alt="Konrad `ktoso` Malawski"/><br /><sub><b>Konrad `ktoso` Malawski</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=ktoso" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/andrewhop"><img src="https://avatars.githubusercontent.com/u/41167468?v=4?s=100" width="100px;" alt="Andrew Hopkins"/><br /><sub><b>Andrew Hopkins</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=andrewhop" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/adamthom-amzn"><img src="https://avatars.githubusercontent.com/u/61852529?v=4?s=100" width="100px;" alt="Adam Thomas"/><br /><sub><b>Adam Thomas</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=adamthom-amzn" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sworisbreathing"><img src="https://avatars.githubusercontent.com/u/1486524?v=4?s=100" width="100px;" alt="Steven Swor"/><br /><sub><b>Steven Swor</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=sworisbreathing" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Carey-AWS"><img src="https://avatars.githubusercontent.com/u/61763083?v=4?s=100" width="100px;" alt="Carey Burgess"/><br /><sub><b>Carey Burgess</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=Carey-AWS" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/anuraaga"><img src="https://avatars.githubusercontent.com/u/198344?v=4?s=100" width="100px;" alt="Anuraag Agrawal"/><br /><sub><b>Anuraag Agrawal</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=anuraaga" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jeffalder"><img src="https://avatars.githubusercontent.com/u/49817386?v=4?s=100" width="100px;" alt="jeffalder"/><br /><sub><b>jeffalder</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=jeffalder" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dotbg"><img src="https://avatars.githubusercontent.com/u/367403?v=4?s=100" width="100px;" alt="Boris"/><br /><sub><b>Boris</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=dotbg" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/notdryft"><img src="https://avatars.githubusercontent.com/u/2608594?v=4?s=100" width="100px;" alt="Guillaume Corré"/><br /><sub><b>Guillaume Corré</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=notdryft" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hyandell"><img src="https://avatars.githubusercontent.com/u/477715?v=4?s=100" width="100px;" alt="Henri Yandell"/><br /><sub><b>Henri Yandell</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=hyandell" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rschmitt"><img src="https://avatars.githubusercontent.com/u/3725049?v=4?s=100" width="100px;" alt="Ryan Schmitt"/><br /><sub><b>Ryan Schmitt</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=rschmitt" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SomayaB"><img src="https://avatars.githubusercontent.com/u/23043132?v=4?s=100" width="100px;" alt="Somaya"/><br /><sub><b>Somaya</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=SomayaB" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/steven-aerts"><img src="https://avatars.githubusercontent.com/u/1381633?v=4?s=100" width="100px;" alt="Steven Aerts"/><br /><sub><b>Steven Aerts</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=steven-aerts" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/skwslide"><img src="https://avatars.githubusercontent.com/u/1427510?v=4?s=100" width="100px;" alt="Steven Wong"/><br /><sub><b>Steven Wong</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=skwslide" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/telendt"><img src="https://avatars.githubusercontent.com/u/85191?v=4?s=100" width="100px;" alt="Tomasz Elendt"/><br /><sub><b>Tomasz Elendt</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=telendt" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Sarev0k"><img src="https://avatars.githubusercontent.com/u/8388574?v=4?s=100" width="100px;" alt="Will Erickson"/><br /><sub><b>Will Erickson</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=Sarev0k" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/madgnome"><img src="https://avatars.githubusercontent.com/u/279528?v=4?s=100" width="100px;" alt="Julien Hoarau"/><br /><sub><b>Julien Hoarau</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=madgnome" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SEOKHYOENCHOI"><img src="https://avatars.githubusercontent.com/u/42906668?v=4?s=100" width="100px;" alt="SEOKHYOENCHOI"/><br /><sub><b>SEOKHYOENCHOI</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=SEOKHYOENCHOI" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/adriannistor"><img src="https://avatars.githubusercontent.com/u/3051958?v=4?s=100" width="100px;" alt="adriannistor"/><br /><sub><b>adriannistor</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=adriannistor" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/alicesun16"><img src="https://avatars.githubusercontent.com/u/56938110?v=4?s=100" width="100px;" alt="Xian Sun "/><br /><sub><b>Xian Sun </b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=alicesun16" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ascheja"><img src="https://avatars.githubusercontent.com/u/3932118?v=4?s=100" width="100px;" alt="Andreas Scheja"/><br /><sub><b>Andreas Scheja</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=ascheja" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/antegocanva"><img src="https://avatars.githubusercontent.com/u/43571020?v=4?s=100" width="100px;" alt="Anton Egorov"/><br /><sub><b>Anton Egorov</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=antegocanva" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/roexber"><img src="https://avatars.githubusercontent.com/u/7964627?v=4?s=100" width="100px;" alt="roexber"/><br /><sub><b>roexber</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=roexber" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/brharrington"><img src="https://avatars.githubusercontent.com/u/1289028?v=4?s=100" width="100px;" alt="brharrington"/><br /><sub><b>brharrington</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=brharrington" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chrisradek"><img src="https://avatars.githubusercontent.com/u/14189820?v=4?s=100" width="100px;" alt="Christopher Radek"/><br /><sub><b>Christopher Radek</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=chrisradek" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zakkak"><img src="https://avatars.githubusercontent.com/u/1435395?v=4?s=100" width="100px;" alt="Foivos"/><br /><sub><b>Foivos</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=zakkak" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/superwese"><img src="https://avatars.githubusercontent.com/u/954116?v=4?s=100" width="100px;" alt="Frank Wesemann"/><br /><sub><b>Frank Wesemann</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=superwese" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sperka"><img src="https://avatars.githubusercontent.com/u/157324?v=4?s=100" width="100px;" alt="Gergely Varga"/><br /><sub><b>Gergely Varga</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=sperka" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/GuillermoBlasco"><img src="https://avatars.githubusercontent.com/u/1889971?v=4?s=100" width="100px;" alt="Guillermo"/><br /><sub><b>Guillermo</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=GuillermoBlasco" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rce"><img src="https://avatars.githubusercontent.com/u/4427896?v=4?s=100" width="100px;" alt="Henry Heikkinen"/><br /><sub><b>Henry Heikkinen</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=rce" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joschi"><img src="https://avatars.githubusercontent.com/u/43951?v=4?s=100" width="100px;" alt="Jochen Schalanda"/><br /><sub><b>Jochen Schalanda</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=joschi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/josephlbarnett"><img src="https://avatars.githubusercontent.com/u/13838924?v=4?s=100" width="100px;" alt="Joe Barnett"/><br /><sub><b>Joe Barnett</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=josephlbarnett" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/seratch"><img src="https://avatars.githubusercontent.com/u/19658?v=4?s=100" width="100px;" alt="Kazuhiro Sera"/><br /><sub><b>Kazuhiro Sera</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=seratch" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ChaithanyaGK"><img src="https://avatars.githubusercontent.com/u/28896513?v=4?s=100" width="100px;" alt="Krishna Chaithanya Ganta"/><br /><sub><b>Krishna Chaithanya Ganta</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=ChaithanyaGK" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/leepa"><img src="https://avatars.githubusercontent.com/u/9469?v=4?s=100" width="100px;" alt="Lee Packham"/><br /><sub><b>Lee Packham</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=leepa" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MatteCarra"><img src="https://avatars.githubusercontent.com/u/11074527?v=4?s=100" width="100px;" alt="Matteo Carrara"/><br /><sub><b>Matteo Carrara</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=MatteCarra" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mscharp"><img src="https://avatars.githubusercontent.com/u/1426929?v=4?s=100" width="100px;" alt="Michael Scharp"/><br /><sub><b>Michael Scharp</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=mscharp" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/miguelrjim"><img src="https://avatars.githubusercontent.com/u/1420241?v=4?s=100" width="100px;" alt="Miguel Jimenez"/><br /><sub><b>Miguel Jimenez</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=miguelrjim" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Helmsdown"><img src="https://avatars.githubusercontent.com/u/1689115?v=4?s=100" width="100px;" alt="Russell Bolles"/><br /><sub><b>Russell Bolles</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=Helmsdown" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/scheerer"><img src="https://avatars.githubusercontent.com/u/4659?v=4?s=100" width="100px;" alt="Russell Scheerer"/><br /><sub><b>Russell Scheerer</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=scheerer" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/scotty-g"><img src="https://avatars.githubusercontent.com/u/7861050?v=4?s=100" width="100px;" alt="Scott"/><br /><sub><b>Scott</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=scotty-g" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ueokande"><img src="https://avatars.githubusercontent.com/u/534166?v=4?s=100" width="100px;" alt="Shin'ya Ueoka"/><br /><sub><b>Shin'ya Ueoka</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=ueokande" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sushilamazon"><img src="https://avatars.githubusercontent.com/u/42008398?v=4?s=100" width="100px;" alt="sushilamazon"/><br /><sub><b>sushilamazon</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=sushilamazon" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tomliu4uber"><img src="https://avatars.githubusercontent.com/u/22459891?v=4?s=100" width="100px;" alt="tomliu4uber"/><br /><sub><b>tomliu4uber</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=tomliu4uber" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/musketyr"><img src="https://avatars.githubusercontent.com/u/660405?v=4?s=100" width="100px;" alt="Vladimir Orany"/><br /><sub><b>Vladimir Orany</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=musketyr" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Xinyu-Hu"><img src="https://avatars.githubusercontent.com/u/31017838?v=4?s=100" width="100px;" alt="Xinyu Hu"/><br /><sub><b>Xinyu Hu</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=Xinyu-Hu" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/frosforever"><img src="https://avatars.githubusercontent.com/u/1630422?v=4?s=100" width="100px;" alt="Yosef Fertel"/><br /><sub><b>Yosef Fertel</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=frosforever" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/denyskonakhevych"><img src="https://avatars.githubusercontent.com/u/5894907?v=4?s=100" width="100px;" alt="Denys Konakhevych"/><br /><sub><b>Denys Konakhevych</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=denyskonakhevych" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/alexw91"><img src="https://avatars.githubusercontent.com/u/3596374?v=4?s=100" width="100px;" alt="Alex Weibel"/><br /><sub><b>Alex Weibel</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=alexw91" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rccarper"><img src="https://avatars.githubusercontent.com/u/51676630?v=4?s=100" width="100px;" alt="Ryan Carper"/><br /><sub><b>Ryan Carper</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=rccarper" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JonathanHenson"><img src="https://avatars.githubusercontent.com/u/3926469?v=4?s=100" width="100px;" alt="Jonathan M. Henson"/><br /><sub><b>Jonathan M. Henson</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=JonathanHenson" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/debora-ito"><img src="https://avatars.githubusercontent.com/u/476307?v=4?s=100" width="100px;" alt="Debora N. Ito"/><br /><sub><b>Debora N. Ito</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=debora-ito" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bretambrose"><img src="https://avatars.githubusercontent.com/u/341314?v=4?s=100" width="100px;" alt="Bret Ambrose"/><br /><sub><b>Bret Ambrose</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=bretambrose" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cenedhryn"><img src="https://avatars.githubusercontent.com/u/26603446?v=4?s=100" width="100px;" alt="Anna-Karin Salander"/><br /><sub><b>Anna-Karin Salander</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=cenedhryn" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joviegas"><img src="https://avatars.githubusercontent.com/u/70235430?v=4?s=100" width="100px;" alt="John Viegas"/><br /><sub><b>John Viegas</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=joviegas" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dagnir"><img src="https://avatars.githubusercontent.com/u/261310?v=4?s=100" width="100px;" alt="Dongie Agnir"/><br /><sub><b>Dongie Agnir</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=dagnir" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/millems"><img src="https://avatars.githubusercontent.com/u/24903526?v=4?s=100" width="100px;" alt="Matthew Miller"/><br /><sub><b>Matthew Miller</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=millems" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bmaizels"><img src="https://avatars.githubusercontent.com/u/36682168?v=4?s=100" width="100px;" alt="Benjamin Maizels"/><br /><sub><b>Benjamin Maizels</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=bmaizels" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Quanzzzz"><img src="https://avatars.githubusercontent.com/u/51490885?v=4?s=100" width="100px;" alt="Quan Zhou"/><br /><sub><b>Quan Zhou</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=Quanzzzz" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zoewangg"><img src="https://avatars.githubusercontent.com/u/33073555?v=4?s=100" width="100px;" alt="Zoe Wang"/><br /><sub><b>Zoe Wang</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=zoewangg" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/varunnvs92"><img src="https://avatars.githubusercontent.com/u/17261531?v=4?s=100" width="100px;" alt="Varun Nandi"/><br /><sub><b>Varun Nandi</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=varunnvs92" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shorea"><img src="https://avatars.githubusercontent.com/u/11096681?v=4?s=100" width="100px;" alt="Andrew Shore"/><br /><sub><b>Andrew Shore</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=shorea" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kiiadi"><img src="https://avatars.githubusercontent.com/u/4661536?v=4?s=100" width="100px;" alt="Kyle Thomson"/><br /><sub><b>Kyle Thomson</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=kiiadi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/spfink"><img src="https://avatars.githubusercontent.com/u/20525381?v=4?s=100" width="100px;" alt="Sam Fink"/><br /><sub><b>Sam Fink</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=spfink" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bondj"><img src="https://avatars.githubusercontent.com/u/4749778?v=4?s=100" width="100px;" alt="Jonathan Bond"/><br /><sub><b>Jonathan Bond</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=bondj" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ajs139"><img src="https://avatars.githubusercontent.com/u/9387176?v=4?s=100" width="100px;" alt="ajs139"/><br /><sub><b>ajs139</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=ajs139" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://imdewey.com"><img src="https://avatars.githubusercontent.com/u/44629464?v=4?s=100" width="100px;" alt="Dewey Nguyen"/><br /><sub><b>Dewey Nguyen</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=duy3101" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dleen"><img src="https://avatars.githubusercontent.com/u/1297964?v=4?s=100" width="100px;" alt="David Leen"/><br /><sub><b>David Leen</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=dleen" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://16lim21.github.io"><img src="https://avatars.githubusercontent.com/u/53011962?v=4?s=100" width="100px;" alt="Michael Li"/><br /><sub><b>Michael Li</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=16lim21" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Bennett-Lynch"><img src="https://avatars.githubusercontent.com/u/11811448?v=4?s=100" width="100px;" alt="Bennett Lynch"/><br /><sub><b>Bennett Lynch</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=Bennett-Lynch" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Ashimine"/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=eltociear" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://jamieliu.me"><img src="https://avatars.githubusercontent.com/u/35614552?v=4?s=100" width="100px;" alt="Jamie Liu"/><br /><sub><b>Jamie Liu</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=jamieliu386" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/guillepb10"><img src="https://avatars.githubusercontent.com/u/28654665?v=4?s=100" width="100px;" alt="guillepb10"/><br /><sub><b>guillepb10</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=guillepb10" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/lorenznickel/"><img src="https://avatars.githubusercontent.com/u/29959150?v=4?s=100" width="100px;" alt="Lorenz Nickel"/><br /><sub><b>Lorenz Nickel</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=LorenzNickel" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/erin889"><img src="https://avatars.githubusercontent.com/u/38885911?v=4?s=100" width="100px;" alt="Erin Yang"/><br /><sub><b>Erin Yang</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=erin889" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.theguardian.com/profile/roberto-tyley"><img src="https://avatars.githubusercontent.com/u/52038?v=4?s=100" width="100px;" alt="Roberto Tyley"/><br /><sub><b>Roberto Tyley</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=rtyley" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://alvinsee.com/"><img src="https://avatars.githubusercontent.com/u/1531158?v=4?s=100" width="100px;" alt="Alvin See"/><br /><sub><b>Alvin See</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=alvinsee" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ron1"><img src="https://avatars.githubusercontent.com/u/1318509?v=4?s=100" width="100px;" alt="ron1"/><br /><sub><b>ron1</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=ron1" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/srsaikumarreddy"><img src="https://avatars.githubusercontent.com/u/24988810?v=4?s=100" width="100px;" alt="Sai Kumar Reddy Chandupatla"/><br /><sub><b>Sai Kumar Reddy Chandupatla</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=srsaikumarreddy" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/davidh44"><img src="https://avatars.githubusercontent.com/u/70000000?v=4?s=100" width="100px;" alt="David Ho"/><br /><sub><b>David Ho</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=davidh44" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.berrycloud.co.uk"><img src="https://avatars.githubusercontent.com/u/1552612?v=4?s=100" width="100px;" alt="Thomas Turrell-Croft"/><br /><sub><b>Thomas Turrell-Croft</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=thomasturrell" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stevenshan"><img src="https://avatars.githubusercontent.com/u/3723174?v=4?s=100" width="100px;" alt="Steven Shan"/><br /><sub><b>Steven Shan</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=stevenshan" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/barryoneill"><img src="https://avatars.githubusercontent.com/u/885049?v=4?s=100" width="100px;" alt="Barry O'Neill"/><br /><sub><b>Barry O'Neill</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=barryoneill" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/akiesler"><img src="https://avatars.githubusercontent.com/u/4186292?v=4?s=100" width="100px;" alt="Andy Kiesler"/><br /><sub><b>Andy Kiesler</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=akiesler" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/CodigoMorsa"><img src="https://avatars.githubusercontent.com/u/21063181?v=4?s=100" width="100px;" alt="Martin"/><br /><sub><b>Martin</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=martinKindall" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/paulolieuthier"><img src="https://avatars.githubusercontent.com/u/1238157?v=4?s=100" width="100px;" alt="Paulo Lieuthier"/><br /><sub><b>Paulo Lieuthier</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=paulolieuthier" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.inulogic.fr"><img src="https://avatars.githubusercontent.com/u/88554524?v=4?s=100" width="100px;" alt="Sébastien Crocquesel"/><br /><sub><b>Sébastien Crocquesel</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=scrocquesel" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dave-fn"><img src="https://avatars.githubusercontent.com/u/21349334?v=4?s=100" width="100px;" alt="David Negrete"/><br /><sub><b>David Negrete</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=dave-fn" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/StephenFlavin"><img src="https://avatars.githubusercontent.com/u/14975957?v=4?s=100" width="100px;" alt="Stephen Flavin"/><br /><sub><b>Stephen Flavin</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=StephenFlavin" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://applin.ca"><img src="https://avatars.githubusercontent.com/u/16511950?v=4?s=100" width="100px;" alt="Olivier L Applin"/><br /><sub><b>Olivier L Applin</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=L-Applin" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/breader124"><img src="https://avatars.githubusercontent.com/u/36669019?v=4?s=100" width="100px;" alt="Adrian Chlebosz"/><br /><sub><b>Adrian Chlebosz</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=breader124" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.buymeacoffee.com/chadwilson"><img src="https://avatars.githubusercontent.com/u/29788154?v=4?s=100" width="100px;" alt="Chad Wilson"/><br /><sub><b>Chad Wilson</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=chadlwilson" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ManishDait"><img src="https://avatars.githubusercontent.com/u/90558243?v=4?s=100" width="100px;" alt="Manish Dait"/><br /><sub><b>Manish Dait</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=ManishDait" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.dekies.de"><img src="https://avatars.githubusercontent.com/u/858827?v=4?s=100" width="100px;" alt="Dennis Kieselhorst"/><br /><sub><b>Dennis Kieselhorst</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=deki" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/psnilesh"><img src="https://avatars.githubusercontent.com/u/12656997?v=4?s=100" width="100px;" alt="Nilesh PS"/><br /><sub><b>Nilesh PS</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=psnilesh" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/swar8080"><img src="https://avatars.githubusercontent.com/u/17691679?v=4?s=100" width="100px;" alt="Steven Swartz"/><br /><sub><b>Steven Swartz</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=swar8080" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/michaeldimchuk"><img src="https://avatars.githubusercontent.com/u/22773297?v=4?s=100" width="100px;" alt="Michael Dimchuk"/><br /><sub><b>Michael Dimchuk</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=michaeldimchuk" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/faucct"><img src="https://avatars.githubusercontent.com/u/5202503?v=4?s=100" width="100px;" alt="Nikita Sokolov"/><br /><sub><b>Nikita Sokolov</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=faucct" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sugmanue"><img src="https://avatars.githubusercontent.com/u/108146565?v=4?s=100" width="100px;" alt="Manuel Sugawara"/><br /><sub><b>Manuel Sugawara</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=sugmanue" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/anirudh9391"><img src="https://avatars.githubusercontent.com/u/15699250?v=4?s=100" width="100px;" alt="Anirudh"/><br /><sub><b>Anirudh</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=anirudh9391" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/haydenbaker"><img src="https://avatars.githubusercontent.com/u/26096419?v=4?s=100" width="100px;" alt="Hayden Baker"/><br /><sub><b>Hayden Baker</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=haydenbaker" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gosar"><img src="https://avatars.githubusercontent.com/u/5666661?v=4?s=100" width="100px;" alt="Jaykumar Gosar"/><br /><sub><b>Jaykumar Gosar</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=gosar" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/graebm"><img src="https://avatars.githubusercontent.com/u/24399397?v=4?s=100" width="100px;" alt="Michael Graeb"/><br /><sub><b>Michael Graeb</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=graebm" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mgrundie-r7"><img src="https://avatars.githubusercontent.com/u/103498312?v=4?s=100" width="100px;" alt="Michael Grundie"/><br /><sub><b>Michael Grundie</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=mgrundie-r7" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/eckardnet"><img src="https://avatars.githubusercontent.com/u/13320705?v=4?s=100" width="100px;" alt="Eckard Mühlich"/><br /><sub><b>Eckard Mühlich</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=eckardnet" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://wicket.apache.org"><img src="https://avatars.githubusercontent.com/u/980773?v=4?s=100" width="100px;" alt="Tobias Soloschenko"/><br /><sub><b>Tobias Soloschenko</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=klopfdreh" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Madrigal"><img src="https://avatars.githubusercontent.com/u/599908?v=4?s=100" width="100px;" alt="Luis Madrigal"/><br /><sub><b>Luis Madrigal</b></sub></a><br /><a href="https://github.com/aws/aws-sdk-java-v2/commits?author=Madrigal" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
| 0 |
spring-projects/spring-integration-samples | You are looking for examples, code snippets, sample applications for Spring Integration? This is the place. | 2011-08-10T04:40:02Z | null | Spring Integration Samples
==========================
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.spring.io/scans?search.rootProjectNames=spring-integration-samples)
Welcome to the **Spring Integration Samples** repository which provides **50+ samples** to help you learn [Spring Integration][]. To simplify your experience, the *Spring Integration* samples are split into 4 distinct categories:
* Basic
* Intermediate
* Advanced
* Applications
* DSL
Inside of each category you'll find a **README.md** file, which will contain a more detailed description of that category. Each sample also comes with its own **README.md** file explaining further details, e.g. how to run the respective sample.
| For additional samples, please also checkout the [Spring Integration Extensions][] project as it also provides numerous samples.
*Happy Integration!*
# Note
This (main) branch requires Spring Integration 6.0 or above.
For samples running against earlier versions of Spring Integration, use the __5.5.x__ and other branches.
The project requires now Java 17 or above.
To open the project in the IDE, use its `import` option against a `build.gradle` file from the root project directory.
## Related GitHub projects
* [Spring Integration][]
* [Spring Integration Extensions][]
## Community Sample Projects
* [Xavier Padró][]
# Categories
Below is a short description of each category.
## DSL
This directory holds demos/samples for Spring Integration 4.0 Java Configuration as well as the Java DSL Extension.
## Basic
This is a good place to get started. The samples here are technically motivated and demonstrate the bare minimum with regard to configuration and code to help you to get introduced to the basic concepts, API and configuration of Spring Integration. For example, if you are looking for an answer on how to wire a **Service Activator** to a **Channel** or how to apply a **Gateway** to your message exchange or how to get started with using the **MAIL** or **XML** module, this would be the right place to find a relevant sample. The bottom line is that this is a good starting point.
* **amqp** - Demonstrates the functionality of the various **AMQP Adapters**
* **barrier** - Shows how to suspend a thread until some asynchronous event occurs
* **control-bus** - Demonstrates the functionality of the **Control Bus**
* **enricher** - This sample demonstrates how the Enricher components can be used
* **feed** - Demonstrates the functionality of the **Feed Adapter** (RSS/ATOM)
* **file** - Demonstrates aspects of the various File Adapters (e.g. **File Inbound/Outbound Channel Adapters**, file **polling**)
* **ftp** - Demonstrates the **FTP support** available with Spring Integration
* **helloworld** - Very simple starting example illustrating a basic message flow (using **Channel**, **ServiceActivator**, **QueueChannel**)
* **http** - Demonstrates request/reply communication when using a pair of **HTTP Inbound/Outbound gateways**
* **jdbc** - Illustrates the usage of the Jdbc Adapters, including object persistence and retrieval
* **jms** - Demonstrates **JMS** support available with Spring Integration
* **jmx** - Demonstrates **JMX** support using a **JMX Attribute Polling Channel** and **JMX Operation Invoking Channel Adapter**
* **jpa** - Shows the usage of the JPA Components
* **mail** - Example showing **IMAP** and **POP3** support
* **mqtt** - Demonstrates the functionality of inbound and outbound **MQTT Adapters**
* **mongodb** - Shows how to persist a Message payload to a **MongoDb** document store and how to read documents from **MongoDb**
* **oddeven** - Example combining the functionality of **Inbound Channel Adapter**, **Filter**, **Router** and **Poller**
* **quote** - Example demoing core EIP support using **Channel Adapter (Inbound and Stdout)**, **Poller** with Interval Triggers, **Service Activator**
* **sftp** - Demonstrating SFTP support using **SFTP Inbound / Outbound Channel Adapters**
* **tcp-amqp** - Demonstrates basic functionality of bridging the **Spring Integration TCP Adapters** with **Spring Integration AMQP Adapters**
* **tcp-broadcast** - Demonstrates broadcasting a message to multiple connected TCP clients.
* **tcp-client-server** - Demonstrates socket communication using **TcpOutboundGateway**, **TcpInboundGateway** and also uses a **Gateway** and a **Service Activator**
* **tcp-with-headers** - Demonstrates sending headers along with the payload over TCP using JSON.
* **testing-examples** - A series of test cases that show techniques to **test** Spring Integration applications.
* **twitter** - Illustrates Twitter support using the **Twitter Inbound Channel Adapter**, **Twitter Inbound Search Channel Adapter**, **Twitter Outbound Channel Adapter**
* **ws-inbound-gateway** - Example showing basic functionality of the **Web Service Gateway**
* **ws-outbound-gateway** - Shows outbound web services support using the **Web Service Outbound Gateway**, **Content Enricher**, Composed Message Processor (**Chain**)
* **xml** - Example demonstrates various aspects of the **Xml** support using an **XPath Splitter**, **XPath Router**, **XSLT Transformer** as well as **XPath Expression** support
* **xmpp** - Show the support for [**XMPP**](https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol) (formerly known as Jabber) using e.g. GoogleTalk
## Intermediate
This category targets developers who are already more familiar with the Spring Integration framework (past getting started), but need some more guidance while resolving more advanced technical problems that you have to deal with when switching to a Messaging architecture. For example, if you are looking for an answer on how to handle errors in various scenarios, or how to properly configure an **Aggregator** for the situations where some messages might not ever arrive for aggregation, or any other issue that goes beyond a basic understanding and configuration of a particular component to address "what else you can do?" types of problems, this would be the right place to find relevant examples.
* **async-gateway** - Usage example of an asynchronous **Gateway**
* **dynamic-poller** - Example shows usage of a **Poller** with a custom **Trigger** to change polling periods at runtime
* **async-gateway** - Example shows usage of an **Asynchronous Gateway**
* **errorhandling** - Demonstrates basic **Error Handling** capabilities of Spring Integration
* **file-processing** - Sample demonstrates how to wire a message flow to process files either sequentially (maintain the order) or concurrently (no order).
* **mail-attachments** - Demonstrates the processing of email attachments
* **monitoring** The project used in the *[Spring Integration Management and Monitoring Webinar](https://www.springsource.org/node/3598)* Also available on the *[SpringSourceDev YouTube Channel](https://www.youtube.com/SpringSourceDev)*
* **multipart-http** - Demonstrates the sending of HTTP multipart requests using Spring's **RestTemplate** and a Spring Integration **Http Outbound Gateway**
* **rest-http** - This sample demonstrates how to send an HTTP request to a Spring Integration's HTTP service while utilizing Spring Integration's new HTTP Path usage. This sample also uses Spring Security for HTTP Basic authentication. With HTTP Path facility, the client program can send requests with URL Variables.
* **retry-and-more** Provides samples showing the application of MessageHandler Advice Chains to endpoints - retry, circuit breaker, expression evaluating
* **splitter-aggregator-reaper** A demonstration of implementing the Splitter and Aggregator *Enterprise Integration Patterns* (EIP) together. This sample also provides a concrete example of a [message store reaper][] in action.
* **stored-procedures-derby** Provides an example of the stored procedure Outbound Gateway using *[Apache Derby](https://db.apache.org/derby/)*
* **stored-procedures-ms** Provides an example of the stored procedure Outbound Gateway using *Microsoft SQL Server*
* **stored-procedures-oracle** Provides an example of the stored procedure Outbound Gateway using *ORACLE XE*
* **stored-procedures-postgresql** Provides an example of the stored procedure Outbound Gateway using *[PostgreSQL](https://www.postgresql.org/)*
* **tcp-async-bi-directional** - Demonstrates the use of *Collaborating Channel Adapters* for arbitrary async messaging (not request/reply) between peers.
* **tcp-client-server-multiplex** - Demonstrates the use of *Collaborating Channel Adapters* with multiple in-flight requests/responses over a single connection.
* **travel** - More sophisticated example showing the retrieval of weather (SOAP Web Service) and traffic (HTTP Service) reports using real services
* **tx-synch** Provides a sample demonstrating the use of transaction synchronization, renaming an input file to a different filename, depending on whether the transaction commits, or rolls back.
## Advanced
This category targets advanced developers who are quite familiar with Spring Integration but are looking to address a specific custom need by extending the Spring Integration public API. For example, if you are looking for samples showing how to implement a custom **Channel** or **Consumer** (event-based or polling-based), or you are trying to figure out what is the most appropriate way to implement a custom **BeanParser** on top of the Spring Integration BeanParser hierarchy when implementing a custom namespace, this would be the right place to look. Here you can also find samples that will help you with adapter development. Spring Integration comes with an extensive library of adapters that allow you to connect remote systems with the Spring Integration messaging framework. However you might have a need to integrate with a system for which the core framework does not provide an adapter, so you have to implement your own. This category would include samples showing you how to implement various adapters.
* **advanced-testing-examples** - Example test cases that show advanced techniques to test Spring Integration applications
* **dynamic-ftp** - Demonstrates one technique for sending files to dynamic destinations.
* **dynamic-tcp-client** - Demonstrates a technique for dynamically creating TCP clients.
## Applications
This category targets developers and architects who have a good understanding of Message-Driven architecture and Enterprise Integration Patterns, and have an above average understanding of Spring and Spring integration and who are looking for samples that address a particular business problem. In other words, the emphasis of samples in this category is '**business use cases**' and how they can be solved via a Messaging architecture and Spring Integration in particular. For example, if you are interested to see how a Loan Broker process or Travel Agent process could be implemented and automated via Spring Integration, this would be the right place to find these types of samples.
* **cafe** - Emulates a simple operation of a coffee shop combining various Spring Integration adapters (Including **Router** and **Splitter**) see [Appendix A of the reference documentation](https://docs.spring.io/spring-integration/docs/current/reference/html/#samples) for more details. Implementations are provided for:
- AMQP
- JMS
- In memory channels
* **cafe-scripted** - Scripted implementation of the classic **cafe** sample application. Supports **JavaScript**, **Groovy**, **Ruby**, and **Python**.
* **loan-broker** - Simulates a simple banking application (Uses **Gateway**, **Chain**, **Header Enricher**, **Recipient List Router**, **Aggregator**) see [Appendix A of the reference documentation](https://docs.spring.io/spring-integration/docs/current/reference/html/#samples) for more details
* **loanshark** This extension to the loan broker sample shows how to exchange messages between Spring Integration applications (and other technologies) using **UDP**.
**file-split-ftp** - Reads a file; splits into 3 based on contents; sends files over ftp; sends email with results.
# Contributing
See the [Spring Integration Contributor Guidelines](https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.adoc) for information about how to contribute to this repository.
# Resources
For more information, please visit the Spring Integration website at: [https://projects.spring.io/spring-integration/](https://projects.spring.io/spring-integration/)
[Spring Integration]: https://github.com/spring-projects/spring-integration
[Spring Integration Extensions]: https://github.com/spring-projects/spring-integration-extensions
[message store reaper]: https://docs.spring.io/spring-integration/api/org/springframework/integration/store/MessageGroupStoreReaper.html
[Xavier Padró]: https://github.com/xpadro/spring-integration
| 1 |
dunwu/java-tutorial | :coffee: 老司机在 Java 技术领域的十年积累。 | 2017-11-29T06:39:45Z | null | <p align="center">
<a href="https://dunwu.github.io/java-tutorial/" target="_blank" rel="noopener noreferrer">
<img src="https://raw.githubusercontent.com/dunwu/images/master/common/dunwu-logo.png" alt="logo" width="150px"/>
</a>
</p>
<p align="center">
<a href="https://github.com/dunwu/java-tutorial">
<img alt="star" class="no-zoom" src="https://img.shields.io/github/stars/dunwu/java-tutorial?style=for-the-badge">
</a>
<a href="https://github.com/dunwu/java-tutorial">
<img alt="fork" class="no-zoom" src="https://img.shields.io/github/forks/dunwu/java-tutorial?style=for-the-badge">
</a>
<a href="https://github.com/dunwu/java-tutorial/commits/master">
<img alt="build" class="no-zoom" src="https://img.shields.io/github/actions/workflow/status/dunwu/java-tutorial/deploy.yml?style=for-the-badge">
</a>
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">
<img alt="code style" class="no-zoom" src="https://img.shields.io/github/license/dunwu/java-tutorial?style=for-the-badge">
</a>
</p>
<h1 align="center">JavaTutorial</h1>
> ☕ **java-tutorial** 是一个 Java 教程,汇集一个老司机在 Java 领域的十年积累。
>
> - 🔁 项目同步维护:[Github](https://github.com/dunwu/java-tutorial/) | [Gitee](https://gitee.com/turnon/java-tutorial/)
> - 📖 电子书阅读:[Github Pages](https://dunwu.github.io/java-tutorial/) | [Gitee Pages](https://turnon.gitee.io/java-tutorial/)
>
> 说明:
>
> - 下面的内容清单中,凡是有 📚 标记的技术,都已整理成详细的教程。
> - 部分技术因为可以应用于不同领域,所以可能会同时出现在不同的类别下。
## 📖 内容
### JavaSE
> 📚 [javacore](https://dunwu.github.io/javacore/) 是一个 Java 核心技术教程。内容包含:Java 基础特性、Java 高级特性、Java 并发、JVM、Java IO 等。
### JavaEE
#### JavaWeb
- [JavaWeb 面经](docs/02.JavaEE/01.JavaWeb/99.JavaWeb面经.md)
- [JavaWeb 之 Servlet 指南](docs/02.JavaEE/01.JavaWeb/01.JavaWeb之Servlet指南.md)
- [JavaWeb 之 Jsp 指南](docs/02.JavaEE/01.JavaWeb/02.JavaWeb之Jsp指南.md)
- [JavaWeb 之 Filter 和 Listener](docs/02.JavaEE/01.JavaWeb/03.JavaWeb之Filter和Listener.md)
- [JavaWeb 之 Cookie 和 Session](docs/02.JavaEE/01.JavaWeb/04.JavaWeb之Cookie和Session.md)
#### Java 服务器
> Tomcat 和 Jetty 都是 Java 比较流行的轻量级服务器。
>
> Nginx 是目前最流行的反向代理服务器,也常用于负载均衡。
- [Tomcat 快速入门](docs/02.JavaEE/02.服务器/01.Tomcat/01.Tomcat快速入门.md)
- [Tomcat 连接器](docs/02.JavaEE/02.服务器/01.Tomcat/02.Tomcat连接器.md)
- [Tomcat 容器](docs/02.JavaEE/02.服务器/01.Tomcat/03.Tomcat容器.md)
- [Tomcat 优化](docs/02.JavaEE/02.服务器/01.Tomcat/04.Tomcat优化.md)
- [Tomcat 和 Jetty](docs/02.JavaEE/02.服务器/01.Tomcat/05.Tomcat和Jetty.md)
- [Jetty](docs/02.JavaEE/02.服务器/02.Jetty.md)
### Java 软件
#### Java 构建
> Java 项目需要通过 [**构建工具**](docs/11.软件/01.构建) 来管理项目依赖,完成编译、打包、发布、生成 JavaDoc 等任务。
>
> - 目前最主流的构建工具是 Maven,它的功能非常强大。
> - Gradle 号称是要替代 Maven 等构件工具,它的版本管理确实简洁,但是需要学习 Groovy,学习成本比 Maven 高。
> - Ant 功能比 Maven 和 Gradle 要弱,现代 Java 项目基本不用了,但也有一些传统的 Java 项目还在使用。
- [Maven](docs/11.软件/01.构建/01.Maven) 📚
- [Maven 快速入门](docs/11.软件/01.构建/01.Maven/01.Maven快速入门.md)
- [Maven 教程之 pom.xml 详解](docs/11.软件/01.构建/01.Maven/02.Maven教程之pom.xml详解.md)
- [Maven 教程之 settings.xml 详解](docs/11.软件/01.构建/01.Maven/03.Maven教程之settings.xml详解.md)
- [Maven 实战问题和最佳实践](docs/11.软件/01.构建/01.Maven/04.Maven实战问题和最佳实践.md)
- [Maven 教程之发布 jar 到私服或中央仓库](docs/11.软件/01.构建/01.Maven/05.Maven教程之发布jar到私服或中央仓库.md)
- [Maven 插件之代码检查](docs/11.软件/01.构建/01.Maven/06.Maven插件之代码检查.md)
- [Ant 简易教程](docs/11.软件/01.构建/02.Ant.md)
#### Java IDE
> 自从有了 [**IDE**](docs/11.软件/02.IDE),写代码从此就告别了刀耕火种的蛮荒时代。
>
> - [Eclipse](docs/11.软件/02.IDE/02.Eclipse.md) 是久负盛名的开源 Java IDE,我的学生时代一直使用它写 Java。
> - 曾经抗拒从转 [Intellij Idea](docs/11.软件/02.IDE/01.Intellij.md) ,但后来发现真香,不得不说,确实是目前最优秀的 Java IDE。
> - 你可以在 [vscode](docs/11.软件/02.IDE/03.VsCode.md) 中写各种语言,只要安装相应插件即可。如果你的项目中使用了很多种编程语言,又懒得在多个 IDE 之间切换,那么就用 vscode 来一网打尽吧。
- [Intellij Idea](docs/11.软件/02.IDE/01.Intellij.md)
- [Eclipse](docs/11.软件/02.IDE/02.Eclipse.md)
- [vscode](docs/11.软件/02.IDE/03.VsCode.md)
#### Java 监控诊断
> [监控/诊断](docs/11.软件/03.监控诊断) 工具主要用于 Java 应用的运维。通过采集、分析、存储、可视化应用的有效数据,帮助开发者、使用者快速定位问题,找到性能瓶颈。
- [监控工具对比](docs/11.软件/03.监控诊断/01.监控工具对比.md)
- [CAT](docs/11.软件/03.监控诊断/02.CAT.md)
- [Zipkin](docs/11.软件/03.监控诊断/03.Zipkin.md)
- [SkyWalking](docs/11.软件/03.监控诊断/04.Skywalking.md)
- [Arthas](docs/11.软件/03.监控诊断/05.Arthas.md)
### Java 工具
#### Java IO
- [JSON 序列化](docs/12.工具/01.IO/01.JSON序列化.md) - [fastjson](https://github.com/alibaba/fastjson)、[Jackson](https://github.com/FasterXML/jackson)、[Gson](https://github.com/google/gson)
- [二进制序列化](docs/12.工具/01.IO/02.二进制序列化.md) - [Protobuf](https://developers.google.com/protocol-buffers)、[Thrift](https://thrift.apache.org/)、[Hessian](http://hessian.caucho.com/)、[Kryo](https://github.com/EsotericSoftware/kryo)、[FST](https://github.com/RuedigerMoeller/fast-serialization)
#### JavaBean 工具
- [Lombok](docs/12.工具/02.JavaBean/01.Lombok.md)
- [Dozer](docs/12.工具/02.JavaBean/02.Dozer.md)
#### Java 模板引擎
- [Freemark](docs/12.工具/03.模板引擎/01.Freemark.md)
- [Velocity](docs/12.工具/03.模板引擎/03.Velocity.md)
- [Thymeleaf](docs/12.工具/03.模板引擎/02.Thymeleaf.md)
#### Java 测试工具
- [Junit](docs/12.工具/04.测试/01.Junit.md)
- [Mockito](docs/12.工具/04.测试/02.Mockito.md)
- [Jmeter](docs/12.工具/04.测试/03.Jmeter.md)
- [JMH](docs/12.工具/04.测试/04.JMH.md)
#### 其他
- [Java 日志](docs/12.工具/99.其他/01.Java日志.md)
- [Java 工具包](docs/12.工具/99.其他/02.Java工具包.md)
- [Reflections](docs/12.工具/99.其他/03.Reflections.md)
- [JavaMail](docs/12.工具/99.其他/04.JavaMail.md)
- [Jsoup](docs/12.工具/99.其他/05.Jsoup.md)
- [Thumbnailator](docs/12.工具/99.其他/06.Thumbnailator.md)
- [Zxing](docs/12.工具/99.其他/07.Zxing.md)
### Java 框架
#### ORM
- [Mybatis 快速入门](docs/13.框架/11.ORM/01.Mybatis快速入门.md)
- [Mybatis 原理](docs/13.框架/11.ORM/02.Mybatis原理.md)
#### Spring
📚 [spring-tutorial](https://dunwu.github.io/spring-tutorial/) 是一个 Spring 实战教程。
#### Spring Boot
📚 [Spring Boot 教程](https://dunwu.github.io/spring-boot-tutorial/) 是一个 Spring Boot 实战教程。
#### 安全
> Java 领域比较流行的安全框架就是 shiro 和 spring-security。
>
> shiro 更为简单、轻便,容易理解,能满足大多数基本安全场景下的需要。
>
> spring-security 功能更丰富,也比 shiro 更复杂。值得一提的是由于 spring-security 是 spring 团队开发,所以集成 spring 和 spring-boot 框架更容易。
- [Shiro](docs/13.框架/12.安全/01.Shiro.md)
- [SpringSecurity](docs/13.框架/12.安全/02.SpringSecurity.md)
#### IO
- [Shiro](docs/13.框架/13.IO/01.Netty.md)
#### 微服务
- [Dubbo](docs/13.框架/14.微服务/01.Dubbo.md)
### Java 中间件
#### MQ
> 消息队列(Message Queue,简称 MQ)技术是分布式应用间交换信息的一种技术。
>
> 消息队列主要解决应用耦合,异步消息,流量削锋等问题,实现高性能,高可用,可伸缩和最终一致性架构。是大型分布式系统不可缺少的中间件。
>
> 如果想深入学习各种消息队列产品,建议先了解一下 [消息队列基本原理](https://dunwu.github.io/blog/pages/1fd240/) ,有助于理解消息队列特性的实现和设计思路。
- [消息队列面试](docs/14.中间件/01.MQ/01.消息队列面试.md)
- [消息队列基本原理](docs/14.中间件/01.MQ/02.消息队列基本原理.md)
- [RocketMQ](docs/14.中间件/01.MQ/03.RocketMQ.md)
- [ActiveMQ](docs/14.中间件/01.MQ/04.ActiveMQ.md)
#### 缓存
> 缓存可以说是优化系统性能的第一手段,在各种技术中都会有缓存的应用。
>
> 如果想深入学习缓存,建议先了解一下 [缓存基本原理](https://dunwu.github.io/design/distributed/分布式缓存.html),有助于理解缓存的特性、原理,使用缓存常见的问题及解决方案。
- [缓存面试题](docs/14.中间件/02.缓存/01.缓存面试题.md)
- [Java 缓存中间件](docs/14.中间件/02.缓存/02.Java缓存中间件.md)
- [Memcached 快速入门](docs/14.中间件/02.缓存/03.Memcached.md)
- [Ehcache 快速入门](docs/14.中间件/02.缓存/04.Ehcache.md)
- [Java 进程内缓存](docs/14.中间件/02.缓存/05.Java进程内缓存.md)
- [Http 缓存](docs/14.中间件/02.缓存/06.Http缓存.md)
#### 流量控制
- [Hystrix](docs/14.中间件/03.流量控制/01.Hystrix.md)
### [大数据](https://dunwu.github.io/bigdata-tutorial)
> 大数据技术点以归档在:[bigdata-tutorial](https://dunwu.github.io/bigdata-tutorial)
- [Hdfs](https://dunwu.github.io/bigdata-tutorial/hdfs) 📚
- [Hbase](https://dunwu.github.io/bigdata-tutorial/hbase) 📚
- [Hive](https://dunwu.github.io/bigdata-tutorial/hive) 📚
- [MapReduce](https://dunwu.github.io/bigdata-tutorial/mapreduce)
- [Yarn](https://dunwu.github.io/bigdata-tutorial/yarn)
- [ZooKeeper](https://dunwu.github.io/bigdata-tutorial/zookeeper) 📚
- [Kafka](https://dunwu.github.io/bigdata-tutorial/kafka) 📚
- Spark
- Storm
- [Flink](https://dunwu.github.io/bigdata-tutorial/tree/master/docs/flink)
## 📚 资料
- Java 经典书籍
- [《Effective Java 中文版》](https://item.jd.com/12507084.html) - 本书介绍了在 Java 编程中 78 条极具实用价值的经验规则,这些经验规则涵盖了大多数开发人员每天所面临的问题的解决方案。同推荐《重构 : 改善既有代码的设计》、《代码整洁之道》、《代码大全》,有一定的内容重叠。
- [《Java 并发编程实战》](https://item.jd.com/10922250.html) - 本书深入浅出地介绍了 Java 线程和并发,是一本完美的 Java 并发参考手册。
- [《深入理解 Java 虚拟机》](https://item.jd.com/11252778.html) - 不去了解 JVM 的工程师,和咸鱼有什么区
- [《Maven 实战》](https://item.jd.com/10476794.html) - 国内最权威的 Maven 专家的力作,唯一一本哦!
- 其他领域书籍
- [《Redis 设计与实现》](https://item.jd.com/11486101.html) - 系统而全面地描述了 Redis 内部运行机制。图示丰富,描述清晰,并给出大量参考信息,是 NoSQL 数据库开发人员案头必备。
- [《鸟哥的 Linux 私房菜 (基础学习篇)》](https://item.jd.com/12443890.html) - 本书是最具知名度的 Linux 入门书《鸟哥的 Linux 私房菜基础学习篇》的最新版,全面而详细地介绍了 Linux 操作系统。内容非常全面,建议挑选和自己实际工作相关度较高的,其他部分有需要再阅读。
- [《Head First 设计模式》](https://item.jd.com/10100236.html) - 《Head First 设计模式》(中文版)共有 14 章,每章都介绍了几个设计模式,完整地涵盖了四人组版本全部 23 个设计模式。
- [《HTTP 权威指南》](https://item.jd.com/11056556.html) - 本书尝试着将 HTTP 中一些互相关联且常被误解的规则梳理清楚,并编写了一系列基于各种主题的章节,对 HTTP 各方面的特性进行了介绍。纵观全书,对 HTTP“为什么”这样做进行了详细的解释,而不仅仅停留在它是“怎么做”的。
- [《TCP/IP 详解 系列》](https://item.jd.com/11966296.html) - 完整而详细的 TCP/IP 协议指南。针对任何希望理解 TCP/IP 协议是如何实现的读者设计。
- [《剑指 Offer:名企面试官精讲典型编程题》](https://item.jd.com/12163054.html) - 剖析了 80 个典型的编程面试题,系统整理基础知识、代码质量、解题思路、优化效率和综合能力这 5 个面试要点。
## 🚪 传送
◾ 🏠 [JAVA-TUTORIAL 首页](https://github.com/dunwu/java-tutorial) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
> 你可能会感兴趣:
- [Java 教程](https://github.com/dunwu/java-tutorial) 📚
- [JavaCore 教程](https://dunwu.github.io/javacore/) 📚
- [Spring 教程](https://dunwu.github.io/spring-tutorial/) 📚
- [Spring Boot 教程](https://dunwu.github.io/spring-boot-tutorial/) 📚
- [数据库教程](https://dunwu.github.io/db-tutorial/) 📚
- [数据结构和算法教程](https://dunwu.github.io/algorithm-tutorial/) 📚
- [Linux 教程](https://dunwu.github.io/linux-tutorial/) 📚
- [Nginx 教程](https://github.com/dunwu/nginx-tutorial/) 📚
| 1 |
kekingcn/kkFileView | Universal File Online Preview Project based on Spring-Boot | 2017-12-12T11:41:08Z | null | # kkFileView
### Introduction
Document online preview project solution, built using the popular Spring Boot framework for easy setup and deployment. This versatile open source project provides basic support for a wide range of document formats, including:
1. Supports Office documents such as `doc`, `docx`, `xls`, `xlsx`, `xlsm`, `ppt`, `pptx`, `csv`, `tsv`, , `dotm`, `xlt`, `xltm`, `dot`, `xlam`, `dotx`, `xla,` ,`pages` etc.
2. Supports domestic WPS Office documents such as `wps`, `dps`, `et` , `ett`, ` wpt`.
3. Supports OpenOffice, LibreOffice office documents such as `odt`, `ods`, `ots`, `odp`, `otp`, `six`, `ott`, `fodt` and `fods`.
4. Supports Visio flowchart files such as `vsd`, `vsdx`.
5. Supports Windows system image files such as `wmf`, `emf`.
6. Supports Photoshop software model files such as `psd` ,`eps`.
7. Supports document formats like `pdf`, `ofd`, and `rtf`.
8. Supports software model files like `xmind`.
9. Support for `bpmn` workflow files.
10. Support for `eml` mail files
11. Support for `epub` book documents
12. Supports 3D model files like `obj`, `3ds`, `stl`, `ply`, `gltf`, `glb`, `off`, `3dm`, `fbx`, `dae`, `wrl`, `3mf`, `ifc`, `brep`, `step`, `iges`, `fcstd`, `bim`, etc.
13. Supports CAD model files such as `dwg`, `dxf`, `dwf` `iges` ,` igs`, `dwt` , `dng` , `ifc` , `dwfx` , `stl` , `cf2` , `plt`, etc.
14. Supports all plain text files such as `txt`, `xml` (rendering), `md` (rendering), `java`, `php`, `py`, `js`, `css`, etc.
15. Supports compressed packages such as `zip`, `rar`, `jar`, `tar`, `gzip`, `7z`, etc.
16. Supports image previewing (flip, zoom, mirror) of `jpg`, `jpeg`, `png`, `gif`, `bmp`, `ico`, `jfif`, `webp`, etc.
17. Supports image information model files such as `tif` and `tiff`.
18. Supports image format files such as `tga`.
19. Supports vector image format files such as `svg`.
20. Supports `mp3`,`wav`,`mp4`,`flv` .
21. Supports many audio and video format files such as `avi`, `mov`, `wmv`, `mkv`, `3gp`, and `rm`.
22. Supports for `dcm` .
23. Supports for `drawio` .
### Features
- Build with the popular frame spring boot
- Easy to build and deploy
- Basically support online preview of mainstream office documents, such as Doc, docx, Excel, PDF, TXT, zip, rar, pictures, etc
- REST API
- Abstract file preview interface so that it is easy to extend more file extensions and develop this project on your own
### Official website and DOCS
URL:[https://kkview.cn](https://kkview.cn/)
### Live demo
> Please treat public service kindly, or this would stop at any time.
URL:[https://file.kkview.cn](https://file.kkview.cn)
### Contact Us
> We will answer your questions carefully and solve any problems you encounter while using the project. We also kindly ask that you at least Google or Baidu before asking questions in order to save time and avoid ineffective communication. Let's cherish our lives and stay away from ineffective communication.
<img src="./doc/github星球.png/" width="50%">
### Quick Start
> Technology stack
- Spring boot: [spring boot Development Reference Guide](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
- Freemarker
- Redisson
- Jodconverter
> Dependencies
- Redis(Optional, Unnecessary by default)
- OpenOffice or LibreOffice(Integrated on Windows, will be installed automatically on Linux, need to be manually installed on Mac OS)
1. First step:`git pull https://github.com/kekingcn/kkFileView.git`
2. second step:Run the main method of `/server/src/main/java/cn/keking/ServerMain.java`. After starting,visit `http://localhost:8012/`.
### Changelog
> December 14, 2022, version 4.1.0 released:
1. Updated homepage design by @wsd7747.
2. Compatible with multipage tif for pdf and jpg conversion and multiple page online preview for tif image preview by @zhangzhen1979.
3. Optimized docker build, using layered build method by @yl-yue.
4. Implemented file encryption based on userToken cache by @yl-yue.
5. Implemented preview for encrypted Word, PPT, and Excel files by @yl-yue.
6. Upgraded Linux & Docker images to LibreOffice 7.3.
7. Updated OFD preview component, tif preview component, and added support for PPT watermarking.
8. Numerous other upgrades, optimizations, and bug fixes.
We thank @yl-yue, @wsd7747, @zhangzhen1979, @tomhusky, @shenghuadun, and @kischn.sun for their code contributions.
> July 6, 2021, version 4.0.0 released:
1. The integration of OpenOffice in the underlying system has been replaced with LibreOffice, resulting in enhanced compatibility and improved preview effects for Office files.
2. Fixed the directory traversal vulnerability in compressed files.
3. Fixed the issue where previewing PPT files in PDF mode was ineffective.
4. Fixed the issue where the front-end display of image preview mode for PPT files was abnormal.
5. Added a new feature: the file upload function on the homepage can be enabled or disabled in real-time through configuration.
6. Optimized the logging of Office process shutdown.
7. Optimized the logic for finding Office components in Windows environment, with built-in LibreOffice taking priority.
8. Optimized the synchronous execution of starting Office processes.
> June 17, 2021, version 3.6.0 released:
This version includes support for OFD file type versions, and all the important features in this release were contributed by the community. We thank @gaoxingzaq and @zhangxiaoxiao9527 for their code contributions.
1. Added support for previewing OFD type files. OFD is a domestically produced file format similar to PDF.
2. Added support for transcoding and previewing video files through ffmpeg. With transcoding enabled, theoretically, all mainstream video file formats such as RM, RMVB, FLV, etc. are supported for preview.
3. Beautified the preview effect of PPT and PPTX file types, much better looking than the previous version.
4. Updated the versions of dependencies such as pdfbox, xstream, common-io.
> January 28, 2021:
The final update of the Lunar New Year 2020 has been released, mainly including some UI improvements, bug fixes reported by QQ group users and issues, and most importantly, it is a new version for a good year.
1. Introduced galimatias to solve the problem of abnormal file download caused by non-standard file names.
2. Updated UI style of index access demonstration interface.
3. Updated UI style of markdown file preview.
4. Updated UI style of XML file preview, adjusted the architecture of text file preview to facilitate expansion.
5. Updated UI style of simTxT file preview.
6. Adjusted the UI of continuous preview of multiple images to flip up and down.
7. Simplified all file download IO operations by adopting the apache-common-io package.
8. XML file preview supports switching to pure text mode.
9. Enhanced prompt information when url base64 decoding fails.
10. Fixed import errors and image preview bug.
11. Fixed the problem of missing log directory when running the release package.
12. Fixed the bug of continuous preview of multiple images in the compressed package.
13. Fixed the problem of no universal matching for file type suffixes in uppercase and lowercase.
14. Specified the use of the Apache Commons-code implementation for Base64 encoding to fix exceptions occurring in some JDK versions.
15. Fixed the bug of HTML file preview of text-like files.
16. Fixed the problem of inability to switch between jpg and pdf when previewing dwg files.
17. Escaped dangerous characters to prevent reflected xss.
18. Fixed the problem of duplicate encoding causing the failure of document-to-image preview and standardized the encoding.
> December 27, 2020:
The year-end major update of 2020 includes comprehensive architecture design, complete code refactoring, significant improvement in code quality, and more convenient secondary development. We welcome you to review the source code and contribute to building by raising issues and pull requests.
1. Adjusted architecture modules, extensively refactored code, and improved code quality by several levels. Please feel free to review.
2. Enhanced XML file preview effect and added preview of XML document structure.
3. Added support for markdown file preview, including support for md rendering and switching between source text and preview.
4. Switched the underlying web server to jetty, resolving the issue: https://github.com/kekingcn/kkFileView/issues/168
5. Introduced cpdetector to solve the problem of file encoding recognition.
6. Adopted double encoding with base64 and urlencode for URLs to completely solve preview problems with bizarre file names.
7. Added configuration item office.preview.switch.disabled to control the switch of office file preview.
8. Optimized text file preview logic, transmitting content through Base64 to avoid requesting file content again during preview.
9. Disabled the image zoom effect in office preview mode to achieve consistent experience with image and pdf preview.
10. Directly set pdfbox to be compatible with lower version JDK, and there will be no warning prompts even when run in IDEA.
11. Removed non-essential toolkits like Guava and Hutool to reduce code volume.
12. Asynchronous loading of Office components speeds up application launch to within 5 seconds.
13. Reasonable settings of the number of threads in the preview consumption queue.
14. Fixed the bug where files in compressed packages failed to preview again.
15. Fixed the bug in image preview.
> May 20th 2020 :
1. Support for global watermark and dynamic change of watermark content through parameters
2. Support for CAD file Preview
3. Add configuration item base.url, support using nginx reverse proxy and set context-path
4. All configuration items can be read from environment variables, which is convenient for docker image deployment and large-scale use in cluster
5. Support the configuration of TrustHost (only the file source from the trust site can be previewed), and protect the preview service from abuse
6. Support configuration of customize cache cleanup time (cron expression)
7. All recognizable plain text can be previewed directly without downloading, such as .md .java .py, etc
8. Support configuration to limit PDF file download after conversion
9. Optimize Maven packaging configuration to solve the problem of line break in .sh script
10. Place all CDN dependencies on the front end locally for users without external network connection
11. Comment Service on home page switched from Sohu ChangYan to gitalk
12. Fixed preview exceptions that may be caused by special characters in the URL
13. Fixed the addtask exception of the transformation file queue
14. Fixed other known issues
15. Official website build: [https://kkview.cn](https://kkview.cn)
16. Official docker image repository build: [https://hub.docker.com/r/keking/kkfileview](https://hub.docker.com/r/keking/kkfileview)
> June 18th 2019 :
1. Support automatic cleaning of cache and preview files
2. Support http/https stream url file preview
3. Support FTP url file preview
4. Add Docker build
> April 8th 2019
1. Cache and queue implementations abstract, providing JDK and REDIS implementations (REDIS becomes optional dependencies)
2. Provides zip and tar.gz packages, and provides a one-click startup script
> January 17th 2018
1. Refined the project directory, abstract file preview interface, Easy to extend more file extensions and depoly this project on your own
1. Added English documentation (@幻幻Fate,@汝辉) contribution
1. Support for more image file extensions
1. Fixed the issue that image carousel in zip file will always start from the first
> January 12th 2018
1. Support for multiple images preview
1. Support for images rotation preview in rar/zip
> January 2nd 2018
1. Fixed gibberish issue when preview a txt document caused by the file encoding problem
1. Fixed the issue that some module dependencies can not be found
1. Add a spring boot profile, and support for Multi-environment configuration
1. Add `pdf.js` to preview the documents such as doc,etc.,support for generating doc headlines as pdf menu,support for mobile preview
### Sponsor Us
If this project has been helpful to you, we welcome your sponsorship. Your support is our greatest motivation.!
| 0 |
apache/phoenix | Apache Phoenix | 2014-06-04T07:00:08Z | null | <!--
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.
-->
![logo](http://phoenix.apache.org/images/logo.png)
<b>[Apache Phoenix](http://phoenix.apache.org/)</b> is a SQL skin over HBase delivered as a client-embedded JDBC driver targeting low latency queries over HBase data. Visit the Apache Phoenix website <b>[here](http://phoenix.apache.org/)</b>.
Copyright ©2014 [Apache Software Foundation](http://www.apache.org/). All Rights Reserved.
| 0 |
jbellis/jvector | JVector: the most advanced embedded vector search engine | 2023-08-25T01:45:20Z | null | ## Introduction to approximate nearest neighbor search
Exact nearest neighbor search (k-nearest-neighbor or KNN) is prohibitively expensive at higher dimensions, because approaches to segment the search space that work in 2D or 3D like quadtree or k-d tree devolve to linear scans at higher dimensions. This is one aspect of what is called “[the curse of dimensionality](https://en.wikipedia.org/wiki/Curse_of_dimensionality).”
With larger datasets, it is almost always more useful to get an approximate answer in logarithmic time, than the exact answer in linear time. This is abbreviated as ANN (approximate nearest neighbor) search.
There are two broad categories of ANN index:
* Partition-based indexes, like [LSH or IVF](https://www.datastax.com/guides/what-is-a-vector-index) or [SCANN](https://github.com/google-research/google-research/tree/master/scann)
* Graph indexes, like [HNSW](https://arxiv.org/abs/1603.09320) or [DiskANN](https://www.microsoft.com/en-us/research/project/project-akupara-approximate-nearest-neighbor-search-for-large-scale-semantic-search/)
Graph-based indexes tend to be simpler to implement and faster, but more importantly they can be constructed and updated incrementally. This makes them a much better fit for a general-purpose index than partitioning approaches that only work on static datasets that are completely specified up front. That is why all the major commercial vector indexes use graph approaches.
JVector is a graph index in the DiskANN family tree.
## JVector Architecture
JVector is a graph-based index that builds on the DiskANN design with composeable extensions.
JVector implements a single-layer graph with nonblocking concurrency control, allowing construction to scale linearly with the number of cores:
![JVector scales linearly as thread count increases](https://github.com/jbellis/jvector/assets/42158/f0127bfc-6c45-48b9-96ea-95b2120da0d9)
The graph is represented by an on-disk adjacency list per node, with additional data stored inline to support two-pass searches, with the first pass powered by lossily compressed representations of the vectors kept in memory, and the second by a more accurate representation read from disk. The first pass can be performed with
* Product quantization (PQ), optionally with [anisotropic weighting](https://arxiv.org/abs/1908.10396)
* [Binary quantization](https://huggingface.co/blog/embedding-quantization) (BQ)
* Fused ADC, where PQ codebooks are transposed and written inline with the graph adjacency list
The second pass can be performed with
* Full resolution float32 vectors
* [LVQ](https://arxiv.org/abs/2304.04759)-compressed int8 vectors
[This two-pass design reduces memory usage and reduces latency while preserving accuracy](https://thenewstack.io/why-vector-size-matters/).
Additionally, JVector is unique in offering the ability to construct the index itself using two-pass searches, allowing larger-than-memory indexes to be built:
![Much larger indexes](https://github.com/jbellis/jvector/assets/42158/34cb8094-68fa-4dc3-b3ce-4582fdbd77e1)
This is important because it allows you to take advantage of logarithmic search within a single index, instead of spilling over to linear-time merging of results from multiple indexes.
## JVector step-by-step
All code samples are from [SiftSmall](https://github.com/jbellis/jvector/blob/main/jvector-examples/src/main/java/io/github/jbellis/jvector/example/SiftSmall.java) in the JVector source repo, which includes the siftsmall dataset as well. Just import the project in your IDE and click Run to try it out!
#### Step 1: Build and query an index in memory
First the code:
```java
public static void siftInMemory(ArrayList<VectorFloat<?>> baseVectors) throws IOException {
// infer the dimensionality from the first vector
int originalDimension = baseVectors.get(0).length();
// wrap the raw vectors in a RandomAccessVectorValues
RandomAccessVectorValues ravv = new ListRandomAccessVectorValues(baseVectors, originalDimension);
// score provider using the raw, in-memory vectors
BuildScoreProvider bsp = BuildScoreProvider.randomAccessScoreProvider(ravv, VectorSimilarityFunction.EUCLIDEAN);
try (GraphIndexBuilder builder = new GraphIndexBuilder(bsp,
ravv.dimension(),
16, // graph degree
100, // construction search depth
1.2f, // allow degree overflow during construction by this factor
1.2f)) // relax neighbor diversity requirement by this factor
{
// build the index (in memory)
OnHeapGraphIndex index = builder.build(ravv);
// search for a random vector
VectorFloat<?> q = randomVector(originalDimension);
SearchResult sr = GraphSearcher.search(q,
10, // number of results
ravv, // vectors we're searching, used for scoring
VectorSimilarityFunction.EUCLIDEAN, // how to score
index,
Bits.ALL); // valid ordinals to consider
for (SearchResult.NodeScore ns : sr.getNodes()) {
System.out.println(ns);
}
}
}
```
Commentary:
* All indexes assume that you have a source of vectors that has a consistent, fixed dimension (number of float32 components).
* Vector sources are usually represented as a subclass of [RandomAccessVectorValues](https://javadoc.io/doc/io.github.jbellis/jvector/latest/io/github/jbellis/jvector/graph/RandomAccessVectorValues.html), which offers a simple API around getVector / getVectorInto. Do be aware of isValueShared() in a multithreaded context; as a rule of thumb, in-memory RAVV will not use shared values and from-disk RAVV will (as an optimization to avoid allocating a new on-heap vector for every call).
* You do NOT have to provide all the vectors to the index at once, but since this is a common scenario when prototyping, a convenience method is provided to do so. We will cover how to build an index incrementally later.
* For the overflow Builder parameter, the sweet spot is about 1.2 for in-memory construction and 1.5 for on-disk. (The more overflow is allowed, the fewer recomputations of best edges are required, but the more neighbors will be consulted in every search.)
* The alpha parameter controls the tradeoff between edge distance and diversity; usually 1.2 is sufficient for high-dimensional vectors; 2.0 is recommended for 2D or 3D datasets. See [the DiskANN paper](https://suhasjs.github.io/files/diskann_neurips19.pdf) for more details.
* The Bits parameter to GraphSearcher is intended for controlling your resultset based on external predicates and won’t be used in this tutorial.
#### Step 2: more control over GraphSearcher
Keeping the Builder the same, the updated search code looks like this:
```java
// search for a random vector using a GraphSearcher and SearchScoreProvider
VectorFloat<?> q = randomVector(originalDimension);
try (GraphSearcher searcher = new GraphSearcher(index)) {
SearchScoreProvider ssp = SearchScoreProvider.exact(q, VectorSimilarityFunction.EUCLIDEAN, ravv);
SearchResult sr = searcher.search(ssp, 10, Bits.ALL);
for (SearchResult.NodeScore ns : sr.getNodes()) {
System.out.println(ns);
}
}
```
Commentary:
* Searcher allocation is modestly expensive since there is a bunch of internal state to initialize at construction time. Therefore, JVector supports pooling searchers (e.g. with [ExplicitThreadLocal](https://javadoc.io/doc/io.github.jbellis/jvector/latest/io/github/jbellis/jvector/util/ExplicitThreadLocal.html), covered below).
* When managing GraphSearcher instances, you’re also responsible for constructing a SearchScoreProvider, which you can think of as: given a query vector, tell JVector how to compute scores for other nodes in the index. SearchScoreProvider can be exact, as shown here, or a combination of an ApproximateScoreFunction and a Reranker, covered below.
#### Step 3: Measuring recall
A blisteringly-fast vector index isn’t very useful if it doesn’t return accurate results. As a sanity check, SiftSmall includes a helper method _testRecall_. Wiring up that to our code mostly involves turning the SearchScoreProvider into a factory lambda:
```java
Function<VectorFloat<?>, SearchScoreProvider> sspFactory = q -> SearchScoreProvider.exact(q, VectorSimilarityFunction.EUCLIDEAN, ravv);
testRecall(index, queryVectors, groundTruth, sspFactory);
```
If you run the code, you will see slight differences in recall every time (printed by `testRecall`):
```
(OnHeapGraphIndex) Recall: 0.9898
...
(OnHeapGraphIndex) Recall: 0.9890
```
This is expected given the approximate nature of the index being created and the perturbations introduced by the multithreaded concurrency of the `build` call.
#### Step 4: write and load index to and from disk
The code:
```java
Path indexPath = Files.createTempFile("siftsmall", ".inline");
try (GraphIndexBuilder builder = new GraphIndexBuilder(bsp, ravv.dimension(), 16, 100, 1.2f, 1.2f)) {
// build the index (in memory)
OnHeapGraphIndex index = builder.build(ravv);
// write the index to disk with default options
OnDiskGraphIndex.write(index, ravv, indexPath);
}
// on-disk indexes require a ReaderSupplier (not just a Reader) because we will want it to
// open additional readers for searching
ReaderSupplier rs = new SimpleMappedReaderSupplier(indexPath);
OnDiskGraphIndex index = OnDiskGraphIndex.load(rs);
// measure our recall against the (exactly computed) ground truth
Function<VectorFloat<?>, SearchScoreProvider> sspFactory = q -> SearchScoreProvider.exact(q, VectorSimilarityFunction.EUCLIDEAN, ravv);
testRecall(index, queryVectors, groundTruth, sspFactory);
```
Commentary:
* We can write indexes that are constructed in-memory, like this one, to disk with a single method call.
* Loading and searching against on-disk indexes require a ReaderSupplier, which supplies RandomAccessReader objects. The RandomAccessReader interface is intended to be extended by the consuming project. For instance, [DataStax Astra](https://www.datastax.com/products/datastax-astra) implements a RandomAccessReader backed by the Cassandra chunk cache. JVector provides two implementations out of the box.
* SimpleMappedReader: implemented using FileChannel.map, which means it is compatible with all Java versions that can run JVector, but also means it is limited to 2GB file sizes. SimpleMappedReader is primarily intended for example code.
* MemorySegmentReader: implemented using the newer MemorySegment API, with no file size limit, but is limited to Java 22+. (The actual MemorySegmentReader code is compatible with Java 20+, but [we left it in the 22+ module for convenience](https://github.com/jbellis/jvector/pull/296). The motivated reader is welcome to refactor the build to improve this.) If you have no specialized requirements then MemorySegmentReader is recommended for production.
#### Step 5: use compressed vectors in the search
Compressing the vectors with product quantization is done as follows:
```java
// compute and write compressed vectors to disk
Path pqPath = Files.createTempFile("siftsmall", ".pq");
try (DataOutputStream out = new DataOutputStream(new BufferedOutputStream(Files.newOutputStream(pqPath)))) {
// Compress the original vectors using PQ. this represents a compression ratio of 128 * 4 / 16 = 32x
ProductQuantization pq = ProductQuantization.compute(ravv,
16, // number of subspaces
256, // number of centroids per subspace
true); // center the dataset
ByteSequence<?>[] compressed = pq.encodeAll(ravv);
// write the compressed vectors to disk
PQVectors pqv = new PQVectors(pq, compressed);
pqv.write(out);
}
```
* JVector also supports Binary Quantization, but [BQ is generally less useful than PQ since it takes such a large toll on search accuracy](https://thenewstack.io/why-vector-size-matters/).
Then we can wire up the compressed vectors to a two-phase search by getting the fast ApproximateScoreFunction from PQVectors, and the Reranker from the index View:
```java
ReaderSupplier rs = new MMapReaderSupplier(indexPath);
OnDiskGraphIndex index = OnDiskGraphIndex.load(rs);
// load the PQVectors that we just wrote to disk
try (RandomAccessReader in = new SimpleMappedReader(pqPath)) {
PQVectors pqv = PQVectors.load(in);
// SearchScoreProvider that does a first pass with the loaded-in-memory PQVectors,
// then reranks with the exact vectors that are stored on disk in the index
Function<VectorFloat<?>, SearchScoreProvider> sspFactory = q -> {
ApproximateScoreFunction asf = pqv.precomputedScoreFunctionFor(q, VectorSimilarityFunction.EUCLIDEAN);
Reranker reranker = index.getView().rerankerFor(q, VectorSimilarityFunction.EUCLIDEAN);
return new SearchScoreProvider(asf, reranker);
};
// measure our recall against the (exactly computed) ground truth
testRecall(index, queryVectors, groundTruth, sspFactory);
}
```
* PQVectors offers both precomputedScoreFunctionFor and scoreFunctionFor factories. As the name implies, the first precalculates the fragments of distance needed from the PQ codebook for assembly by ADC (asymmetric distance computation). This is faster for searching all but the smallest of indexes, but if you do have a tiny index or you need to perform ADC in another context, the scoreFunctionFor version with no precomputation will come in handy.
This set of functionality is the classic DiskANN design.
#### Step 6: building a larger-than-memory index
JVector can also apply two-phase search to allow building a larger than memory index–only the compressed vectors are kept in memory, while the full-sized ones are kept in the on-disk index.
First we need to set up an OnDiskGraphIndexWriter with full control over the construction process. From that we’ll derive a RandomAccessVectorValues class called InlineVectorValues that knows how to read the full-resolution vectors from the index while it is being constructed.
```java
// compute the codebook, but don't encode any vectors yet
ProductQuantization pq = ProductQuantization.compute(ravv, 16, 256, true);
Path indexPath = Files.createTempFile("siftsmall", ".inline");
Path pqPath = Files.createTempFile("siftsmall", ".pq");
// Builder creation looks mostly the same, but we need to set the BuildScoreProvider after the PQVectors are created
try (GraphIndexBuilder builder = new GraphIndexBuilder(null,
ravv.dimension(), 16, 100, 1.2f, 1.2f);
// explicit Writer for the first time, this is what's behind OnDiskGraphIndex.write
OnDiskGraphIndexWriter writer = new OnDiskGraphIndexWriter.Builder(builder.getGraph(), indexPath)
.with(new InlineVectors(ravv.dimension()))
.withMapper(new OnDiskGraphIndexWriter.IdentityMapper())
.build();
// you can use the partially written index as a source of the vectors written so far
InlineVectorValues ivv = new InlineVectorValues(ravv.dimension(), writer);
// output for the compressed vectors
DataOutputStream pqOut = new DataOutputStream(new BufferedOutputStream(Files.newOutputStream(pqPath))))
```
Then we need to set up a PQVectors instance that we can add new vectors to, and a BuildScoreProvider using it:
```java
// as we build the index we'll compress the new vectors and add them to this List backing a PQVectors
List<ByteSequence<?>> incrementallyCompressedVectors = new ArrayList<>();
PQVectors pqv = new PQVectors(pq, incrementallyCompressedVectors);
// now we can create the actual BuildScoreProvider based on PQ + reranking
BuildScoreProvider bsp = BuildScoreProvider.pqBuildScoreProvider(VectorSimilarityFunction.EUCLIDEAN, ivv, pqv);
builder.setBuildScoreProvider(bsp);
```
Once that’s done, we can index vectors one at a time:
```java
// build the index vector-at-a-time (on disk)
for (VectorFloat<?> v : baseVectors) {
// compress the new vector and add it to the PQVectors (via incrementallyCompressedVectors)
int ordinal = incrementallyCompressedVectors.size();
incrementallyCompressedVectors.add(pq.encode(v));
// write the full vector to disk
writer.writeInline(ordinal, Feature.singleState(FeatureId.INLINE_VECTORS, new InlineVectors.State(v)));
// now add it to the graph -- the previous steps must be completed first since the PQVectors
// and InlineVectorValues are both used during the search that runs as part of addGraphNode construction
builder.addGraphNode(ordinal, v);
}
```
Finally, we need to run cleanup() and write the index and the PQVectors to disk:
```java
// cleanup does a final enforcement of maxDegree and handles other scenarios like deleted nodes
// that we don't need to worry about here
builder.cleanup();
// finish writing the index (by filling in the edge lists) and write our completed PQVectors
writer.write(Map.of());
pqv.write(pqOut);
````
Commentary:
* The search code doesn’t change when switching to incremental index construction – it’s the same index structure on disk, just (potentially) much larger.
* OnDiskGraphIndexWriter::writeInline is threadsafe via synchronization, but care must be taken that the support structures are threadsafe as well if you plan to use them in a multithreaded scenario (which this example is not). Alternatively, you can serialize the updates to PQVectors and leave only the call to GraphIndexBuilder::addGraphNode concurrent. This represents the lion’s share of construction time so you will see good performance with that approach.
### Less-obvious points
* Embeddings models product output from a consistent distribution of vectors. This means that you can save and re-use ProductQuantization codebooks, even for a different set of vectors, as long as you had a sufficiently large training set to build it the first time around. ProductQuantization.MAX_PQ_TRAINING_SET_SIZE (128,000 vectors) has proven to be sufficiently large.
* JDK ThreadLocal objects cannot be referenced except from the thread that created them. This is a difficult design into which to fit caching of Closeable objects like GraphSearcher. JVector provides the ExplicitThreadLocal class to solve this.
* Fused ADC is only compatible with Product Quantization, not Binary Quantization. This is no great loss since [very few models generate embeddings that are best suited for BQ](https://thenewstack.io/why-vector-size-matters/). That said, BQ continues to be supported with non-Fused indexes.
* JVector heavily utilizes the Panama Vector API(SIMD) for ANN indexing and search. We have seen cases where the memory bandwidth is saturated during indexing and product quantization and can cause the process to slow down. To avoid this, the batch methods for index and PQ builds use a [PhysicalCoreExecutor](https://javadoc.io/doc/io.github.jbellis/jvector/latest/io/github/jbellis/jvector/util/PhysicalCoreExecutor.html) to limit the amount of operations to the physical core count. The default value is 1/2 the processor count seen by Java. This may not be correct in all setups (e.g. no hyperthreading or hybrid architectures) so if you wish to override the default use the `-Djvector.physical_core_count` property, or pass in your own ForkJoinPool instance.
### Advanced features
* Fused ADC and LVQ are both represented as Features that are supported during incremental index construction, like InlineVectors above. [See the Grid class for sample code](https://github.com/jbellis/jvector/blob/main/jvector-examples/src/main/java/io/github/jbellis/jvector/example/Grid.java).
* Anisotropic PQ is built into the ProductQuantization class and can improve recall, but nobody knows how to tune it (with the T/threshold parameter) except experimentally on a per-model basis, and choosing the wrong setting can make things worse. From Figure 3 in the paper:
![APQ performnce on Glove first improves and then degrades as T increases](https://github.com/jbellis/jvector/assets/42158/fd459222-6929-43ca-a405-ac34dbaf6646)
* JVector supports in-place deletes via GraphIndexBuilder::markNodeDeleted. Deleted nodes are removed and connections replaced during GraphIndexBuilder::cleanup, with runtime proportional to the number of deleted nodes.
* To checkpoint a graph and reload it for continued editing, use OnHeapGraphIndex::save and GraphIndexBuilder.load.
## The research behind the algorithms
* Foundational work: [HNSW](https://ieeexplore.ieee.org/abstract/document/8594636) and [DiskANN](https://suhasjs.github.io/files/diskann_neurips19.pdf) papers, and [a higher level explainer](https://www.datastax.com/guides/hierarchical-navigable-small-worlds)
* [LVQ paper](https://arxiv.org/abs/2402.02044)
* [Anisotropic PQ paper](https://arxiv.org/abs/1908.10396)
* [Quicker ADC paper](https://arxiv.org/abs/1812.09162)
## Developing and Testing
This project is organized as a [multimodule Maven build](https://maven.apache.org/guides/mini/guide-multiple-modules.html). The intent is to produce a multirelease jar suitable for use as
a dependency from any Java 11 code. When run on a Java 20+ JVM with the Vector module enabled, optimized vector
providers will be used. In general, the project is structured to be built with JDK 20+, but when `JAVA_HOME` is set to
Java 11 -> Java 19, certain build features will still be available.
Base code is in [jvector-base](./jvector-base) and will be built for Java 11 releases, restricting language features and APIs
appropriately. Code in [jvector-twenty](./jvector-twenty) will be compiled for Java 20 language features/APIs and included in the final
multirelease jar targeting supported JVMs. [jvector-multirelease](./jvector-multirelease) packages [jvector-base](./jvector-base) and [jvector-twenty](./jvector-twenty) as a
multirelease jar for release. [jvector-examples](./jvector-examples) is an additional sibling module that uses the reactor-representation of
jvector-base/jvector-twenty to run example code. [jvector-tests](./jvector-tests) contains tests for the project, capable of running against
both Java 11 and Java 20+ JVMs.
To run tests, use `mvn test`. To run tests against Java 20+, use `mvn test`. To run tests against Java 11, use `mvn -Pjdk11 test`. To run a single test class,
use the Maven Surefire test filtering capability, e.g., `mvn -Dtest=TestNeighborArray test`. You may also use method-level filtering and patterns, e.g.,
`mvn -Dtest=TestNeighborArray#testRetain* test`.
You can run `SiftSmall` and `Bench` directly to get an idea of what all is going on here. `Bench` will automatically download required datasets to the `fvec` and `hdf5` directories.
The files used by `SiftSmall` can be found in the [siftsmall directory](./siftsmall) in the project root.
To run either class, you can use the Maven exec-plugin via the following incantations:
> `mvn compile exec:exec@bench`
or for Sift:
> `mvn compile exec:exec@sift`
`Bench` takes an optional `benchArgs` argument that can be set to a list of whitespace-separated regexes. If any of the
provided regexes match within a dataset name, that dataset will be included in the benchmark. For example, to run only the glove
and nytimes datasets, you could use:
> `mvn compile exec:exec@bench -DbenchArgs="glove nytimes"`
To run Sift/Bench without the JVM vector module available, you can use the following invocations:
> `mvn -Pjdk11 compile exec:exec@bench`
> `mvn -Pjdk11 compile exec:exec@sift`
The `... -Pjdk11` invocations will also work with `JAVA_HOME` pointing at a Java 11 installation.
To release, configure `~/.m2/settings.xml` to point to OSSRH and run `mvn -Prelease clean deploy`.
---
| 0 |
ZainZhao/HIS | HIS英文全称 hospital information system(医疗信息就诊系统),系统主要功能按照数据流量、流向及处理过程分为临床诊疗、药品管理、财务管理、患者管理。诊疗活动由各工作站配合完成,并将临床信息进行整理、处理、汇总、统计、分析等。本系统包括以下工作站:门诊医生工作站、药房医生工作站、医技医生工作站、收费员工作站、对帐员工作站、管理员工作站。需求为东软提供的云医院。 | 2019-07-11T15:28:30Z | null | HIS
HIS 英文全称 Hospital Information System(医院信息系统),主要功能按照数据流量、流向及处理过程分为临床诊疗、药品管理、财务管理、患者管理。诊疗活动由各工作站配合完成,并将临床信息进行整理、处理、汇总、统计、分析等。本系统包括以下工作站:门诊医生工作站、药房医生工作站、医技医生工作站、收费员工作站、对帐员工作站、管理员工作站。基于 Spring Cloud Netflix 和 Spring Boot 2.x 实现
``有问题请直接 issue(商用请联系本人邮箱)``
演示地址:http://eatoffer.cn
登录用户:演示用户
登录密码:test
## 前言
HIS 项目致力于打造一个医疗系统demo
本仓库包含
| 系统 | 描述 |
| ---------- | ---------------- |
| HIS-master | 单体应用 |
| his-cloud | 分布式微服务应用 |
| HIS-web | 诊疗前端 |
| HIS-app | 患者前端 |
``注:单体应用和分布式实现业务完全相同``
## 一. 项目架构
![项目开发进度图](document/picture/架构图.png)
### 后端技术栈
| 技术 | 版本 | 说明 |
| -------------------- | ---------------- | -------------------- |
| Spring Cloud Netflix | Finchley.RELEASE | 分布式全家桶 |
| Spring Cloud Eureka | 2.0.0.RELEASE | 服务注册 |
| Spring Cloud Zipkin | 2.0.0.RELEASE | 服务链路 |
| Spring Cloud config | 2.0.0.RELEASE | 服务配置 |
| Spring Cloud Feign | 2.0.0.RELEASE | 服务调用 |
| Spring Cloud Zuul | 2.0.0.RELEASE | 服务网关 |
| Spring Cloud Hystrix | 2.0.0.RELEASE | 服务熔断 |
| Spring Cloud Turbine | 2.0.0.RELEASE | 服务熔断监控 |
| Spring Boot Admin | 2.0.1 | 服务监控 |
| Spring Boot | 2.0.3.RELEASE | 容器+MVC框架 |
| Spring Security | 5.1.4.RELEASE | 认证和授权框架 |
| MyBatis | 3.4.6 | ORM框架 |
| MyBatisGenerator | 1.3.3 | 数据层代码生成 |
| PageHelper | 5.1.8 | MyBatis物理分页插件 |
| Maven | 3.6.1 | 项目管理工具 |
| Swagger2 | 2.7.0 | 交互式API文档 |
| Elasticsearch | 6.2.2 | 搜索引擎 |
| kibana | 6.2.2 | 数据分析和可视化平台 |
| LogStash | 6.2.2 | 数据采集引擎 |
| RabbitMq | 3.7.14 | 消息队列 |
| Redis | 3.2 | 缓存 |
| Druid | 1.1.10 | 数据库连接池 |
| OSS | 2.5.0 | 对象存储 |
| JWT | 0.9.1 | 跨域身份验证解决方案 |
| Lombok | 1.18.6 | 简化对象封装工具 |
| Junit | 4.12 | 单元测试框架 |
| Logback | 1.2.3 | 日志框架 |
| Java doc | ———— | API帮助文档 |
| Docker | 18.09.6 | 应用容器引擎 |
| Docker-compose | 18.09.6 | 容器快速编排 |
### 前端技术栈
| 技术 | 版本 | 说明 |
| ---------- | ----------- | ------------------- |
| Vue | 2.6.10 | 前端框架 |
| Vue-router | 3.0.2 | 前端路由框架 |
| Vuex | 3.1.0 | vue状态管理组件 |
| Vue-cli | ———— | Vue脚手架 |
| Element-ui | 2.7.0 | 前端UI框架 |
| Echarts | 4.2.1 | 数据可视化框架 |
| Uni-app | ———— | 跨平台前端框架 |
| Mockjs | 1.0.1-beta3 | 模拟后端数据 |
| Axios | 0.18.0 | 基于Promise的Http库 |
| Js-cookie | 2.2.0 | Cookie组件 |
| Jsonlint | 1.6.3 | Json解析组件 |
| screenfull | 4.2.0 | 全屏组件 |
| Xlsx | 0.14.1 | Excel表导出组件 |
| Webpack | ———— | 模板打包器 |
## 二. 项目展示
- 主页
![主页](document/picture/PC-主页.png)
- 门诊医生工作台
![门诊医生工作台](document/picture/PC-门诊医生工作台-1.png)
- 医技医生工作台
![医技医生工作台](document/picture/PC-医技医生工作台-1.png)
- 药房医生工作台
![药房医生工作台 ](document/picture/PC-药房医生工作台-1.png)
- 收银员工作台
![收银员工作台 ](document/picture/收银员工作台.png)
- 对账员工作台
![对账员工作台](document/picture/PC-日结-1.png)
- 病历模板
![病历模板](document/picture/PC-病历模板管理.png)
- 排班管理
![排班管理](document/picture/PC-排班-1.png)
- App挂号
![App挂号](document/picture/APP-挂号-1.png)
- Spring boot admin
![Spring boot admin](document/picture/admin-1.png)
- Spring boot admin
![Spring boot admin](document/picture/admin-2.png)
- ZinKin链路追踪
![ZinKin链路追踪](document/picture/ZinKin链路追踪.png)
- 分布式日志收集
![分布式日志收集](document/picture/分布式日志收集.png)
- Hystrix dashboard
![Hystrix dashboard](document/picture/Hystrix-dashboard.png)
## 三. 环境搭建
### 开发工具
| 工具 | 版本 | 说明 |
| ------------------------ | ------------- | ------------------------ |
| IDEA | 2019.1.1 | 后端开发IDE |
| WebStorm | 2019.1.1 | 前端开发IDE |
| Visual Studio Code | 1.35.1 | 前端开发IDE |
| HbuilderX | V2.0.1 | 前端开发IDE |
| Git | 2.21.0 | 代码托管平台 |
| Google Chrome | 75.0.3770.100 | 浏览器、前端调试工具 |
| VMware Workstation Pro | 14.1.3 | 虚拟机 |
| PowerDesigner | 15 | 数据库设计工具 |
| Navicat | 11.1.13 | 数据库连接工具 |
| SQLyog | 12.0.3 | 数据库连接工具 |
| Visio | 2013 | 时序图、流程图等绘制工具 |
| ProcessOn | —— | 架构图等绘制工具 |
| XMind ZEN | 9.2.0 | 思维导图绘制工具 |
| RedisDesktop | 0.9.3.817 | redis客户端连接工具 |
| Postman | 7.1.0 | 接口测试工具 |
## 三. 业务需求
### 业务流程图
![项目开发进度图](document/picture/业务流程图.png)
## 需求
![项目开发进度图](document/picture/需求思维图.png)
## 版权声明
本系统已申请著作权,商业和自媒体转载前务必联系作者 zy.zain@qq.com
个人转载请注明作者和仓库地址
## 许可证
[Apache License 2.0](https://github.com/macrozheng/mall/blob/master/LICENSE)
Copyright (c) 2018-2019 ZainZhao
| 0 |
trinodb/trino | Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io) | 2019-01-19T06:38:14Z | null | <p align="center">
<a href="https://trino.io/"><img alt="Trino Logo" src=".github/homepage.png" /></a>
</p>
<p align="center">
<b>Trino is a fast distributed SQL query engine for big data analytics.</b>
</p>
<p align="center">
See the <a href="https://trino.io/docs/current/">User Manual</a> for deployment instructions and end user documentation.
</p>
<p align="center">
<a href="https://trino.io/download.html">
<img src="https://img.shields.io/maven-central/v/io.trino/trino-server.svg?label=Trino" alt="Trino download" />
</a>
<a href="https://trino.io/slack.html">
<img src="https://img.shields.io/static/v1?logo=slack&logoColor=959DA5&label=Slack&labelColor=333a41&message=join%20conversation&color=3AC358" alt="Trino Slack" />
</a>
<a href="https://trino.io/trino-the-definitive-guide.html">
<img src="https://img.shields.io/badge/Trino%3A%20The%20Definitive%20Guide-download-brightgreen" alt="Trino: The Definitive Guide book download" />
</a>
</p>
## Development
See [DEVELOPMENT](.github/DEVELOPMENT.md) for information about code style,
development process, and guidelines.
See [CONTRIBUTING](.github/CONTRIBUTING.md) for contribution requirements.
## Security
See the project [security policy](.github/SECURITY.md) for
information about reporting vulnerabilities.
## Build requirements
* Mac OS X or Linux
* Java 22.0.0+, 64-bit
* Docker
* Turn SELinux or other systems disabling write access to the local checkout
off, to allow containers to mount parts of the Trino source tree
## Building Trino
Trino is a standard Maven project. Simply run the following command from the
project root directory:
./mvnw clean install -DskipTests
On the first build, Maven downloads all the dependencies from the internet
and caches them in the local repository (`~/.m2/repository`), which can take a
while, depending on your connection speed. Subsequent builds are faster.
Trino has a comprehensive set of tests that take a considerable amount of time
to run, and are thus disabled by the above command. These tests are run by the
CI system when you submit a pull request. We recommend only running tests
locally for the areas of code that you change.
## Running Trino in your IDE
### Overview
After building Trino for the first time, you can load the project into your IDE
and run the server. We recommend using
[IntelliJ IDEA](http://www.jetbrains.com/idea/). Because Trino is a standard
Maven project, you easily can import it into your IDE. In IntelliJ, choose
*Open Project* from the *Quick Start* box or choose *Open*
from the *File* menu and select the root `pom.xml` file.
After opening the project in IntelliJ, double check that the Java SDK is
properly configured for the project:
* Open the File menu and select Project Structure
* In the SDKs section, ensure that JDK 22 is selected (create one if none exist)
* In the Project section, ensure the Project language level is set to 22
### Running a testing server
The simplest way to run Trino for development is to run the `TpchQueryRunner`
class. It will start a development version of the server that is configured with
the TPCH connector. You can then use the CLI to execute queries against this
server. Many other connectors have their own `*QueryRunner` class that you can
use when working on a specific connector.
### Running the full server
Trino comes with sample configuration that should work out-of-the-box for
development. Use the following options to create a run configuration:
* Main Class: `io.trino.server.DevelopmentServer`
* VM Options: `-ea -Dconfig=etc/config.properties -Dlog.levels-file=etc/log.properties -Djdk.attach.allowAttachSelf=true`
* Working directory: `$MODULE_DIR$`
* Use classpath of module: `trino-server-dev`
The working directory should be the `trino-server-dev` subdirectory. In
IntelliJ, using `$MODULE_DIR$` accomplishes this automatically.
If `VM options` doesn't exist in the dialog, you need to select `Modify options`
and enable `Add VM options`.
### Running the CLI
Start the CLI to connect to the server and run SQL queries:
client/trino-cli/target/trino-cli-*-executable.jar
Run a query to see the nodes in the cluster:
SELECT * FROM system.runtime.nodes;
Run a query against the TPCH connector:
SELECT * FROM tpch.tiny.region;
| 0 |
eclipse-jdtls/eclipse.jdt.ls | Java language server | 2016-06-27T13:06:53Z | null | [![Build Status](https://img.shields.io/jenkins/tests?jobUrl=https%3A%2F%2Fci.eclipse.org%2Fls%2Fjob%2Fjdt-ls-master%2F&logo=jenkins&logoColor=white&style=for-the-badge)](https://ci.eclipse.org/ls/job/jdt-ls-master)
Eclipse JDT Language Server
===========================
The Eclipse JDT Language Server is a Java language specific implementation of the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol)
and can be used with any editor that supports the protocol, to offer good support for the Java Language. The server is based on:
* [Eclipse LSP4J](https://github.com/eclipse/lsp4j), the Java binding for the Language Server Protocol,
* [Eclipse JDT](http://www.eclipse.org/jdt/), which provides Java support (code completion, references, diagnostics...),
* [M2Eclipse](http://www.eclipse.org/m2e/), which provides Maven support,
* [Buildship](https://github.com/eclipse/buildship), which provides Gradle support.
Features
--------------
* Supports compiling projects from Java 1.5 through 19
* Maven pom.xml project support
* Gradle project support (with experimental Android project import support)
* Standalone Java files support
* As-you-type reporting of syntax and compilation errors
* Code completion
* Javadoc hovers
* Organize imports
* Type search
* Code actions (quick fixes, source actions & refactorings)
* Code outline
* Code folding
* Code navigation
* Code lens (references/implementations)
* Code formatting (on-type/selection/file)
* Code snippets
* Highlights (semantic highlighting)
* Semantic selection
* Diagnostic tags
* Call Hierarchy
* Type Hierarchy
* Annotation processing support (automatic for Maven projects)
* Automatic source resolution for classes in jars with maven coordinates
* Extensibility
Requirements
------------
The language server requires a runtime environment of **Java 17** (at a minimum) to run. This should either be set in the `JAVA_HOME` environment variable, or on the user's path.
Installation
------------
There are several options to install eclipse.jdt.ls:
- Download and extract a milestone build from [http://download.eclipse.org/jdtls/milestones/](http://download.eclipse.org/jdtls/milestones/?d)
- Download and extract a snapshot build from [http://download.eclipse.org/jdtls/snapshots/](http://download.eclipse.org/jdtls/snapshots/?d)
- Under some Linux distributions you can use the package manager. Search the package repositories for `jdtls` or `eclipse.jdt.ls`.
- Build it from source. Clone the repository via `git clone` and build the project via `JAVA_HOME=/path/to/java/17 ./mvnw clean verify`. Optionally append `-DskipTests=true` to by-pass the tests. This command builds the server into the `./org.eclipse.jdt.ls.product/target/repository` folder.
Some editors or editor extensions bundle eclipse.jdt.ls or contain logic to install it. If that is the case, you only need to install the editor extension. For example for Visual Studio Code you can install the [Extension Pack for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack) and it will take care of the rest.
Running from the command line
------------------------------
If you built eclipse.jdt.ls from source, `cd` into `./org.eclipse.jdt.ls.product/target/repository`. If you downloaded a milestone or snapshot build, extract the contents.
To start the server in the active terminal, adjust the following command as described further below and run it:
```bash
java \
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
-Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-Dlog.level=ALL \
-Xmx1G \
--add-modules=ALL-SYSTEM \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
-jar ./plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar \
-configuration ./config_linux \
-data /path/to/data
```
1. Choose a value for `-configuration`: this is the path to your platform's configuration directory. For Linux, use `./config_linux`. For windows, use `./config_win`. For mac/OS X, use `./config_mac`.
2. Change the filename of the jar in `-jar ./plugins/...` to match the version you built or downloaded.
3. Choose a value for `-data`: An absolute path to your data directory. eclipse.jdt.ls stores workspace specific information in it. This should be unique per workspace/project.
If you want to debug eclipse.jdt.ls itself, add `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044` right after `java` and ensure nothing else is running on port 1044. If you want to debug from the start of execution, change `suspend=n` to `suspend=y` so the JVM will wait for your debugger prior to starting the server.
Running from command line with wrapper script
---------------------------------------------
There is also a Python wrapper script available that makes the start up of eclipse.jdt.ls more convenient (no need to juggle with Java options etc.). A sample usage is described below. The script requires Python 3.9.
```bash
./org.eclipse.jdt.ls.product/target/repository/bin/jdtls \
-configuration ~/.cache/jdtls \
-data /path/to/data
```
All shown Java options will be set by the wrapper script. Please, note that the `-configuration` options points to a user's folder to ensure that the configuration folder in `org.eclipse.jdt.ls.product/target/repository/config_*` remains untouched.
Development Setup
-----------------
See [Contributing](CONTRIBUTING.md)
Managing connection types
-------------------------
The Java Language server supports sockets, named pipes, and standard streams of the server process
to communicate with the client. Client can communicate its preferred connection methods
by setting up environment variables or alternatively using system properties (e.g. `-DCLIENT_PORT=...`)
* To use a **plain socket**, set the following environment variables or system properties before starting the server:
* `CLIENT_PORT`: the port of the socket to connect to
* `CLIENT_HOST`: the host name to connect to. If not set, defaults to `localhost`.
The connection will be used for in and output.
* To use standard streams(stdin, stdout) of the server process do not set any
of the above environment variables and the server will fall back to standard streams.
For socket and named pipes, the client is expected to create the connections
and wait for the server to connect.
Feedback
---------
* File a bug in [GitHub Issues](https://github.com/eclipse/eclipse.jdt.ls/issues).
* Join the discussion on our [Mattermost channel](https://mattermost.eclipse.org/eclipse/channels/eclipsejdtls)
* [Tweet](https://twitter.com/GorkemErcan) [us](https://twitter.com/fbricon) with other feedback.
Clients
-------
This repository only contains the server implementation. Here are some known clients consuming this server:
* [vscode-java](https://github.com/redhat-developer/vscode-java) : an extension for Visual Studio Code
* [ide-java](https://github.com/atom/ide-java) : an extension for Atom
* [ycmd](https://github.com/Valloric/ycmd) : a code-completion and code-comprehension server for multiple clients
* [Oni](https://github.com/onivim/oni/wiki/Language-Support#java) : modern modal editing - powered by Neovim.
* [LSP Java](https://github.com/emacs-lsp/lsp-java) : a Java LSP client for Emacs
* [Eclipse Theia](https://github.com/theia-ide/theia) : Theia is a cloud & desktop IDE framework implemented in TypeScript
* [Eclipse IDE JDT.LS](https://github.com/redhat-developer/eclipseide-jdtls/) : an extension for Eclipse IDE
* [coc-java](https://github.com/neoclide/coc-java) : an extension for [coc.nvim](https://github.com/neoclide/coc.nvim)
* [MS Paint IDE](https://github.com/MSPaintIDE/MSPaintIDE) : an IDE for programming in MS Paint
* [nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls) : an extension for Neovim
* [multilspy from monitors4codegen](https://github.com/microsoft/monitors4codegen#4-multilspy) : A language-agnostic LSP client in Python, with a library interface. Intended to be used to build applications around language servers
* [OpenSumi](https://opensumi.com/en) : A framework that helps you quickly build Cloud or Desktop IDE products.
Continuous Integration Builds
-----------------------------
Our [CI server](https://ci.eclipse.org/ls/) publishes the server binaries to [http://download.eclipse.org/jdtls/snapshots/](http://download.eclipse.org/jdtls/snapshots/?d).
P2 repositories are available under [http://download.eclipse.org/jdtls/snapshots/repository/](http://download.eclipse.org/jdtls/snapshots/repository?d).
Milestone builds are available under [http://download.eclipse.org/jdtls/milestones/](http://download.eclipse.org/jdtls/milestones/?d).
License
-------
EPL 2.0, See [LICENSE](LICENSE) file.
| 0 |
youlaitech/youlai-mall | 🚀基于 Spring Boot 3、Spring Cloud & Alibaba 2022、SAS OAuth2 、Vue3、Element-Plus、uni-app 构建的开源全栈商城。 | 2020-03-01T02:19:27Z | null | <p align="center">
<img alt="有来技术" src="https://img.shields.io/badge/Java-17-brightgreen.svg"/>
<img alt="有来技术" src="https://img.shields.io/badge/SpringBoot-3.1.5-green.svg"/>
<img alt="有来技术" src="https://img.shields.io/badge/SpringCloud & Alibaba-2022-yellowgreen.svg"/>
<a href="https://gitee.com/youlaitech/youlai-mall" target="_blank">
<img alt="有来技术" src="https://gitee.com/youlaitech/youlai-mall/badge/star.svg"/>
</a>
<a href="https://github.com/hxrui" target="_blank">
<img alt="有来技术" src="https://img.shields.io/github/stars/youlaitech/youlai-mall.svg?style=social&label=Stars"/>
</a>
<br/>
<img alt="有来技术" src="https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg"/>
<a href="https://gitee.com/youlaiorg" target="_blank">
<img alt="有来技术" src="https://img.shields.io/badge/Author-有来开源组织-orange.svg"/>
</a>
</p>
<p align="center">
<a target="_blank" href="https://www.youlai.tech">有来技术官网</a> |
<a target="_blank" href="https://youlai.blog.csdn.net">有来技术博客</a>|
<a target="_blank" href="https://gitee.com/haoxr">Gitee</a>|
<a target="_blank" href="https://github.com/haoxianrui">Github</a>
</p>
## 🌱分支说明
| | 说明 | 适配管理前端分支 | 适配移动端分支 |
|-------------------|-------------------------------------------------------|------------------------------------------------------------------------|--------------------------------------------------------------------|
| ✅master | Java 17 + Spring Boot 3 + Spring Authorization Server | [mall-admin:master](https://gitee.com/youlaiorg/mall-admin) | [mall-app:master](https://gitee.com/youlaiorg/mall-app) |
| java8 | Java 8 + Spring Boot 2 + Spring Security OAuth2 | [mall-admin:java8](https://gitee.com/youlaiorg/mall-admin/tree/java8/) | [mall-app:java8](https://gitee.com/youlaiorg/mall-app/tree/java8/) |
## 🚀项目简介
[youlai-mall](https://gitee.com/haoxr) 是基于Spring Boot 3 、Spring Cloud & Alibaba
2022、Vue3、Element-Plus、uni-app等全栈主流技术栈构建的开源商城项目,涉及 [微服务接口](https://gitee.com/youlaitech/youlai-mall)、 [管理前端](https://gitee.com/youlaitech/youlai-mall-admin)、 [微信小程序](https://gitee.com/youlaitech/youlai-mall-weapp)
和 [APP应用](https://gitee.com/youlaitech/youlai-mall-weapp)等多端的开发。
- 项目使用皆是当前主流前后端技术栈(持续更新...),无过度自定义封装,易理解学习和二次扩展;
- Spring Boot 3 、SpringCloud & Alibaba 2022 一站式微服务开箱即用的解决方案;
- Spring Authorization Server 、 JWT 常用 OAuth2 授权模式扩展;
- 移动端采用终极跨平台解决方案 uni-app, 一套代码编译iOS、Android、H5和小程序等多个平台;
- Jenkins、K8s、Docker实现微服务持续集成与交付(CI/CD)。
## 🌈在线预览
| 项目 | 地址 | 用户名/密码 |
|---------|---------------------------|--------------------|
| 管理端 | https://admin.youlai.tech | admin/123456 |
| 移动端(H5) | http://app.youlai.tech | 18866668888/666666 |
| 微信小程序 | 关注【有来技术】公众号| 获取体验码申请体验 |
## 🍀源码地址
| | Gitee | Github | GitCode |
|------|--------------------------------------------------------|----------------------------------------------------------|---------|
| 后端接口 | [youlai-mall](https://gitee.com/youlaiorg/youlai-mall) | [youlai-mall](https://github.com/youlaitech/youlai-mall) | - |
| 管理前端 | [mall-admin](https://gitee.com/youlaiorg/mall-admin) | [mall-admin](https://github.com/youlaitech/mall-admin) | - |
| 移动端 | [mall-app](https://gitee.com/youlaiorg/mall-app) | [mall-app](https://github.com/youlaitech/mall-app) | - |
## 📁目录结构
``` text
youlai-mall
├── docs
├── nacos # Nacos配置
├── nacos_config.zip # Nacos脚本
├── sql # SQL脚本
├── mysql5 # MySQL5脚本
├── mysql8 # MySQL8脚本
├── mall-oms # 订单服务
├── mall-pms # 商品服务
├── mall-sms # 营销服务
├── mall-ums # 会员服务
├── youlai-auth # 认证授权中心
├── youlai-common # 公共模块
├── common-core # 基础依赖
├── common-log # 日志公共模块
├── common-mybatis # Mybatis 公共模块
├── common-rabbitmq # RabbitMQ 公共模块
├── common-redis # Redis 公共模块
├── common-seata # Seata 公共模块
├── common-security # 资源服务器安全公共模块
├── common-web # Web 公共模块
├── youlai-gateway # 网关
├── youlai-system # 系统服务
├── system-api # 系统Feign接口
├── system-boot # 系统管理接口
└── end
```
## 🌌启动项目
### 环境要求
- JDK 17
- MySQL 8 或 MySQL 5.7
- Nacos 2.2+
### 安装中间件
| | Windows | Linux | 是否必装 |
| -------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------ |
| Nacos | [Windows 安装 Nacos 2.2](https://youlai.blog.csdn.net/article/details/130864925) | [Linux 安装 Nacos 2.3](https://youlai.blog.csdn.net/article/details/132592040) | 是 |
| MySQL | [Windows 安装 MySQL 8](https://youlai.blog.csdn.net/article/details/133272887) | [Linux 安装 MySQL8](https://youlai.blog.csdn.net/article/details/130398179) | 否(建议安装) |
| Redis | [Windows 安装 Redis](https://youlai.blog.csdn.net/article/details/133410293) | [Linux 安装 Redis](https://youlai.blog.csdn.net/article/details/130439335) | 否(建议安装) |
| Seata | [Windows 安装 Seata 1.6](https://youlai.blog.csdn.net/article/details/133295970) | [Linux 安装 Seata 1.7](https://youlai.blog.csdn.net/article/details/133376131) | 否 |
| RabbitMQ | / | [Linux 安装 RabbitMQ](https://blog.csdn.net/u013737132/article/details/130439122) | 否 |
💡默认中间件使用有来线上的环境,其中线上 MySQL 数据是只读的,如果需要进行修改或删除操作,建议自己安装 MySQL。
### 初始化数据库
进入 `docs/sql` 目录 , 根据 MySQL 版本选择对应的脚本;
先执行 [database.sql](docs%2Fsql%2Fmysql8%2Fdatabase.sql) 完成数据库的创建;
再执行 [youlai_system.sql](docs%2Fsql%2Fmysql8%2Fyoulai_system.sql) 、[oauth2_server.sql](docs%2Fsql%2Fmysql8%2Foauth2_server.sql)、mall_*.sql 完成数据表的创建和数据初始化。
### 导入 Nacos 配置
打开浏览器,地址栏输入 Nacos 控制台的地址 [ http://localhost:8848/nacos]( http://localhost:8848/nacos) ;
输入用户名/密码:nacos/nacos ;
进入控制台,点击左侧菜单 `配置管理` → `配置列表` 进入列表页面,点击 `导入配置`
选择项目中的 `docs/nacos/nacos_config.zip` 文件。
### 修改 Nacos 配置
在共享配置文件 youlai-common.yaml 中,包括 MySQL、Redis、RabbitMQ 和 Seata 的连接信息,默认是有来线上的环境。
如果您有自己的环境,可以按需修改相应的配置信息。
如果没有自己的 MySQL、Redis、RabbitMQ 和 Seata 环境,可以直接使用默认的配置。
### 启动服务
- 进入 `youlai-gateway` 模块的启动类 GatewayApplication 启动网关;
- 进入 `youlai-auth` 模块的启动类 AuthApplication 启动认证授权中心;
- 进入 `youlai-system` → `system-boot` 模块的启动类 SystemApplication 启动系统服务;
- 至此完成基础服务的启动,商城服务按需启动,启动方式和 `youlai-system` 一致;
- 访问接口文档地址测试: [http://localhost:9999/doc.html](http://localhost:9999/doc.html)
## 📝开发文档
- [Spring Authorization Server 扩展 OAuth2 密码模式](https://youlai.blog.csdn.net/article/details/134024381)
- [Spring Cloud Gateway + Knife4j 网关聚合和 OAuth2 密码模式测试](https://youlai.blog.csdn.net/article/details/134081509)
## 💖加交流群
> 关注公众号【有来技术】,获取交流群二维码,二维码过期请加我微信(`haoxianrui`)备注“有来”,我拉你进群。
| ![](https://s2.loli.net/2022/11/19/OGjum9wr8f6idLX.png) |
|---------------------------------------------------------|
| 0 |
FabricMC/fabric | Essential hooks for modding with Fabric. | 2018-11-04T09:02:05Z | null | # Fabric API
Essential hooks for modding with Fabric.
Fabric API is the library for essential hooks and interoperability mechanisms for Fabric mods. Examples include:
- Exposing functionality that is useful but difficult to access for many mods such as particles, biomes and dimensions
- Adding events, hooks and APIs to improve interopability between mods.
- Essential features such as registry synchronization and adding information to crash reports.
- An advanced rendering API designed for compatibility with optimization mods and graphics overhaul mods.
Also check out [Fabric Loader](https://github.com/FabricMC/fabric-loader), the (mostly) version-independent mod loader that powers Fabric. Fabric API is a mod like any other Fabric mod which requires Fabric Loader to be installed.
For support and discussion for both developers and users, visit [the Fabric Discord server](https://discord.gg/v6v4pMv).
## Using Fabric API to play with mods
Make sure you have installed fabric loader first. More information about installing Fabric Loader can be found [here](https://fabricmc.net/use/).
To use Fabric API, download it from [CurseForge](https://www.curseforge.com/minecraft/mc-mods/fabric-api), [GitHub Releases](https://github.com/FabricMC/fabric/releases) or [Modrinth](https://modrinth.com/mod/fabric-api).
The downloaded jar file should be placed in your `mods` folder.
## Using Fabric API to develop mods
To set up a Fabric development environment, check out the [Fabric example mod](https://github.com/FabricMC/fabric-example-mod) and follow the instructions there. The example mod already depends on Fabric API.
To include the full Fabric API with all modules in the development environment, add the following to your `dependencies` block in the gradle buildscript:
### Groovy DSL
```groovy
modImplementation "net.fabricmc.fabric-api:fabric-api:FABRIC_API_VERSION"
```
### Kotlin DSL
```kotlin
modImplementation("net.fabricmc.fabric-api:fabric-api:FABRIC_API_VERSION")
```
Alternatively, modules from Fabric API can be specified individually as shown below (including module jar to your mod jar):
### Groovy DSL
```groovy
// Make a collection of all api modules we wish to use
Set<String> apiModules = [
"fabric-api-base",
"fabric-command-api-v1",
"fabric-lifecycle-events-v1",
"fabric-networking-api-v1"
]
// Add each module as a dependency
apiModules.forEach {
include(modImplementation(fabricApi.module(it, FABRIC_API_VERSION)))
}
```
### Kotlin DSL
```kotlin
// Make a set of all api modules we wish to use
setOf(
"fabric-api-base",
"fabric-command-api-v1",
"fabric-lifecycle-events-v1",
"fabric-networking-api-v1"
).forEach {
// Add each module as a dependency
modImplementation(fabricApi.module(it, FABRIC_API_VERSION))
}
```
<!--Linked to gradle documentation on properties-->
Instead of hardcoding version constants all over the build script, Gradle properties may be used to replace these constants. Properties are defined in the `gradle.properties` file at the root of a project. More information is available [here](https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#declare_properties_in_gradle_properties_file).
## Contributing
See something Fabric API doesn't support, a bug or something that may be useful? We welcome contributions to improve Fabric API.
Make sure to read [the development guidelines](./CONTRIBUTING.md).
## Modules
Fabric API is designed to be modular for ease of updating. This also has the advantage of splitting up the codebase into smaller chunks.
Each module contains its own `README.md`* explaining the module's purpose and additional info on using the module.
\* The README for each module is being worked on; not every module has a README at the moment
| 0 |
spring-cloud/spring-cloud-gateway | An API Gateway built on Spring Framework and Spring Boot providing routing and more. | 2016-11-16T21:42:51Z | null | null | 0 |
sleuthkit/autopsy | Autopsy® is a digital forensics platform and graphical interface to The Sleuth Kit® and other digital forensics tools. It can be used by law enforcement, military, and corporate examiners to investigate what happened on a computer. You can even use it to recover photos from your camera's memory card. | 2011-10-05T02:11:11Z | null | null | 0 |
bisq-network/bisq | A decentralized bitcoin exchange network | 2014-03-12T09:42:29Z | null | <p align="center">
<a href="https://bisq.network">
<img src="https://bisq.network/images/bisq-logo.svg"/>
</a>
</p>
<h3 align="center">
![Actions Status](https://github.com/bisq-network/bisq/workflows/Build%20Bisq/badge.svg)
## What is Bisq?
Bisq is a safe, private and decentralized way to exchange bitcoin for national currencies and other digital assets. Bisq uses peer-to-peer networking and multi-signature escrow to facilitate trading without a third party. Bisq is non-custodial and incorporates a human arbitration system to resolve disputes.
To learn more, see the doc and video at https://bisq.network/intro.
## Get started using Bisq
Follow the step-by-step instructions at https://bisq.network/get-started.
## Contribute to Bisq
See [CONTRIBUTING.md](CONTRIBUTING.md) and the [developer docs](docs/README.md).
| 0 |
zhisheng17/blog | SpringBoot + Mybatis + thymeleaf 搭建的个人博客 http://www.54tianzhisheng.cn/ | 2017-06-17T09:26:59Z | null | ## Blog
fork from [My Blog](https://github.com/ZHENFENG13/My-Blog) , 该作者是在 [Tale](https://github.com/otale/tale) 博客系统基础上进行修改的。
`Tale` 使用了轻量级 mvc 框架 `Blade` 开发,默认主题使用了漂亮的 `pinghsu` 。
`My-Blog` 使用的是 Docker + SpringBoot + Mybatis + thymeleaf 打造的一个个人博客模板。
自己花了十天的时间把整个项目的代码都敲了一遍,熟悉了整个项目,做了优化,去除了 Docker,
其中修改了原来的一些 bug,并在原作者的项目中提出了 issue , 原作者已修复。
喜欢该项目的话,可以给项目点个 star,如果你想在这基础上修改,那么建议你 fork 该项目,然后再修改哦。
## 功能如下:
博客首页:
![](img/index.png)
归档:
![](img/metas.png)
友链:
![](img/links.png)
关于:
![](img/about.png)
搜索:
![](img/search.png)
**后台管理**
管理登录:
![](img/admin-login.png)
管理首页:
![](img/admin-index.png)
发布文章:
![](img/admin-publish.png)
文章管理:
![](img/admin-article.png)
页面管理:
![](img/admin-pages.png)
分类标签:
![](img/admin-category.png)
文件管理:
![](img/admin-upload.png)
友链管理:
![](img/admin-links.png)
系统设置:
![](img/admin-setting.png)
## 开源协议
[MIT](./LICENSE)
## 感谢
[ZHENFENG13](https://github.com/ZHENFENG13)
[otale](https://github.com/otale)
| 0 |
ityouknow/spring-boot-examples | about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。 | 2016-11-05T05:32:33Z | null | Spring Boot 学习示例
=========================
![Spring Boot 2.0](https://img.shields.io/badge/Spring%20Boot-2.0-brightgreen.svg)
![Mysql 5.6](https://img.shields.io/badge/Mysql-5.6-blue.svg)
![JDK 1.8](https://img.shields.io/badge/JDK-1.8-brightgreen.svg)
![Maven](https://img.shields.io/badge/Maven-3.5.0-yellowgreen.svg)
![license](https://img.shields.io/badge/license-MPL--2.0-blue.svg)
Spring Boot 使用的各种示例,以最简单、最实用为标准,此开源项目中的每个示例都以最小依赖,最简单为标准,帮助初学者快速掌握 Spring Boot 各组件的使用。
[Spring Boot 中文索引](https://github.com/ityouknow/awesome-spring-boot) | [Spring Cloud学习示例代码](https://github.com/ityouknow/spring-cloud-examples) | [Spring Boot 精品课程](https://github.com/ityouknow/spring-boot-leaning)
[Github地址](https://github.com/ityouknow/spring-boot-examples) | [码云地址](https://gitee.com/ityouknow/spring-boot-examples) | [Spring Boot 1.X](https://github.com/ityouknow/spring-boot-examples/tree/master/1.x) | [Spring Boot 2.X](https://github.com/ityouknow/spring-boot-examples/tree/master/2.x)
---
**本项目中所有示例均已经更新到 Spring Boot 3.0**
- Spring Boot 1.X 系列示例代码请看这里:[Spring Boot 1.X](https://github.com/ityouknow/spring-boot-examples/tree/master/1.x)
- Spring Boot 2.X 系列示例代码请看这里:[Spring Boot 2.X](https://github.com/ityouknow/spring-boot-examples/tree/master/2.x)
## 示例代码
- [spring-boot-hello](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-hello):Spring Boot 3.0 Hello World 示例
- [spring-boot-banner](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-hello):Spring Boot 3.0 定制 banner 示例
- [spring-boot-helloworld](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-helloWorld):Spring Boot 3.0 Hello World Test 单元测试示例
- [spring-boot-scheduler](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-scheduler):Spring Boot 3.0 定时任务 scheduler 使用示例
- [spring-boot-package](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-package):Spring Boot 3.0 单元测试、集成测试、打 Jar/War 包、定制启动参数使用案例
- [spring-boot-commandLineRunner](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-commandLineRunner):Spring Boot 3.0 目启动时初始化资源案例
- [spring-boot-web](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-web):Spring Boot 3.0 web 示例
- [spring-boot-webflux](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-webflux):Spring Boot 3.0 响应式编程 WebFlux 使用案例
- [spring-boot-file-upload](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-file-upload):Spring Boot 3.0 上传文件使用案例
- [spring-boot-thymeleaf](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-thymeleaf):Spring Boot 3.0 Thymeleaf 语法、布局使用示例
- [spring-boot-jpa](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-jpa):Spring Boot 3.0 Jpa 操作、增删、改查多数据源使用示例
- [spring-boot-mybatis](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-mybatis):Spring Boot 3.0 Mybatis 注解、xml 使用、增删改查、多数据源使用示例
- [spring-boot-web-thymeleaf](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-web-thymeleaf):Spring Boot 3.0 thymeleaf 增删该查示例
- [spring-boot-jpa-thymeleaf-curd](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-jpa-thymeleaf-curd):Spring Boot 3.0 Jpa thymeleaf 列表、增删改查使用案例
- [spring-boot-mail](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-mail):Spring Boot 3.0 邮件发送使用示例
- [spring-boot-rabbitmq](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-rabbitmq):Spring Boot 3.0 RabbitMQ 各种常见场景使用示例
- [spring-boot-mongodb](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-mongodb):Spring Boot 3.0 MongoDB 增删改查示例 多数据源使用案例
- [spring-boot-redis](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-redis):Spring Boot 3.0 Redis 示例
- [spring-boot-memcache-spymemcached](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-memcache-spymemcached):Spring Boot 3.0 集成 Memcached 使用案例
- [spring-boot-docker](https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-docker):Spring Boot 3.0 Docker 使用案例
- [dockercompose-springboot-mysql-nginx](https://github.com/ityouknow/spring-boot-examples/tree/master/dockercompose-springboot-mysql-nginx):Spring Boot 3.0 Docker Compose + Spring Boot + Nginx + Mysql 使用案例
> 如果大家想了解关于 Spring Boot 的其它方面应用,也可以以[issues](https://github.com/ityouknow/spring-boot-examples/issues)的形式反馈给我,我后续来完善。
关注公众号:纯洁的微笑,回复"666"进群交流
![](http://www.ityouknow.com/assets/images/keeppuresmile_430.jpg) | 1 |
C2SP/wycheproof | Project Wycheproof tests crypto libraries against known attacks. | 2016-11-08T20:56:25Z | null | # Project Wycheproof
https://github.com/c2sp/wycheproof
*Project Wycheproof is named after
[Mount Wycheproof](https://en.wikipedia.org/wiki/Mount_Wycheproof), the smallest
mountain in the world. The main motivation for the project is to have a goal
that is achievable. The smaller the mountain the more likely it is to be able to
climb it.*
> [!NOTE]
> Hello RWC 2024 attendees and others! Wycheproof recently moved to community
> maintenance thanks to the shared efforts of Google and C2SP.
> We are still working to update the README and documentation,
> but we welcome your feedback and look forward to your contributions!
## Introduction
Project Wycheproof tests crypto libraries against known attacks.
Unfortunately, in cryptography, subtle mistakes can have catastrophic
consequences, and we found that libraries fall into such implementation
pitfalls much too often and for much too long. Good implementation guidelines,
however, are hard to come by: understanding how to implement cryptography
securely requires digesting decades' worth of academic literature. We recognize
that software engineers fix and prevent bugs with unit testing, and we found
that cryptographic loopholes can be resolved by the same means.
These observations have prompted us to develop Project Wycheproof, a collection
of unit tests that detect known weaknesses or check for expected behaviors of
some cryptographic algorithm. Project Wycheproof provides tests for most
cryptographic algorithms, including RSA, elliptic curve crypto and
authenticated encryption. Our cryptographers have systematically surveyed the
literature and implemented most known attacks. We have over 80 test cases which
have uncovered more than [40 bugs](doc/bugs.md). For
example, we found that we could recover the private key of widely-used DSA and
ECDHC implementations.
While we are committed to develop as many attacks as possible, Project
Wycheproof is by no means complete. Passing the tests does not imply that the
library is secure, it just means that it is not vulnerable to the attacks that
Project Wycheproof tests for. Cryptographers are also constantly discovering
new attacks. Nevertheless, with Project Wycheproof developers and users now can
check their libraries against a large number of known attacks, without having
to spend years reading academic papers or become cryptographers themselves.
For more information on the goals and strategies of Project Wycheproof, please
check out our [documentation](doc/).
### Coverage
Project Wycheproof has tests for the most popular crypto algorithms, including
- AES-EAX
- AES-GCM
- ChaCha20-Poly1305
- [DH](doc/dh.md)
- DHIES
- [DSA](doc/dsa.md)
- [ECDH](doc/ecdh.md)
- ECDSA
- EdDSA
- ECIES
- HKDF
- HMAC
- [RSA](doc/rsa.md)
- X25519, X448
The tests detect whether a library is vulnerable to many attacks, including
* Invalid curve attacks
* Biased nonces in digital signature schemes
* Of course, all Bleichenbacher’s attacks
* And many more -- we have over 80 test cases
Our first set of tests are written in Java, because Java has a common
cryptographic interface. This allowed us to test multiple providers with a
single test suite. While this interface is somewhat low level, and should not
be used directly, we still apply a "defense in depth" argument and expect that
the implementations are as robust as possible. For example, we consider weak
default values to be a significant security flaw. We are converting as many
tests into sets of test vectors to simplify porting the tests to other
languages. We provide ready-to-use test runners for Java Cryptography
Architecture providers such as [Bouncy Castle](http://bouncycastle.org),
[Spongy Castle](https://rtyley.github.io/spongycastle/), the
[Amazon Corretto Crypto Provider](https://github.com/corretto/amazon-corretto-crypto-provider)
and the default
providers in [OpenJDK](http://openjdk.java.net/).
### Usage
#### Setup
* Install [Bazel](https://bazel.build/).
* Install [Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction
Policy Files][jce-policy-instructions]. This enables tests with large key
sizes. Otherwise you'll see a lot of "illegal key size" exceptions.
* Clone the repository:
```
git clone https://github.com/google/wycheproof.git
```
[jce-policy-instructions]: http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters
#### Execute tests
* To test latest stable version of Bouncy Castle:
```
bazel test BouncyCastleAllTests
```
* To test other versions, e.g., v1.52:
```
bazel test BouncyCastleAllTests_1_52
```
* To test all known versions (warning, will take a long time):
```
bazel test BouncyCastleAllTests_*
```
* To test a local jar, set the `WYCHEPROOF_BOUNCYCASTLE_JAR` environment
variable:
```shell
$ WYCHEPROOF_BOUNCYCASTLE_JAR=/path/to/bouncycastle
$ bazel test BouncyCastleTestLocal
$ bazel test BouncyCastleAllTestsLocal
```
Note: Bazel does not currently invalidate the build on environment changes. If
you change the `WYCHEPROOF_BOUNCYCASTLE_JAR` environment variable, run `bazel
clean` to force a rebuild:
```shell
$ WYCHEPROOF_BOUNCYCASTLE_JAR=/path/to/bouncycastle
$ bazel test BouncyCastleTestLocal
$ WYCHEPROOF_BOUNCYCASTLE_JAR=/path/to/other/jar
$ bazel clean
$ bazel test BouncyCastleTestLocal
```
* To test [Spongy Castle](https://rtyley.github.io/spongycastle/), replace
`BouncyCastle` with `SpongyCastle` in your commands, for example:
```
bazel test SpongyCastleAllTests
```
* To test the [Amazon Corretto Crypto
Provider](https://github.com/corretto/amazon-corretto-crypto-provider),
replace `BouncyCastle` with `Accp` in your commands, for example:
```
bazel test AccpAllTests
```
* To test a local jar for the Amazon Corretto Crypto Provider, set the
`WYCHEPROOF_ACCP_JAR` environment variable:
```shell
$ WYCHEPROOF_ACCP_JAR=/path/to/accp
$ bazel test AccpTestLocal
$ bazel test AccpAllTestsLocal
```
Note: bazel does not currently invalidate the build on environment changes. If
you change the `WYCHEPROOF_ACCP_JAR` environment variable, run `bazel
clean` to force a rebuild:
```shell
$ WYCHEPROOF_ACCP_JAR=/path/to/accp
$ bazel test AccpTestLocal
$ WYCHEPROOF_ACCP_JAR=/path/to/other/jar
$ bazel clean
$ bazel test AccpTestLocal
```
* To test your current installation of [OpenJDK](http://openjdk.java.net/):
```
bazel test OpenJDKAllTests
```
Note that OpenJDKAllTests expects that OpenJDK is your default JDK, so it might
refuse to run or its results might be incorrect if you are using some other JDK.
If you downloaded your JDK from Oracle or https://java.com, you're probably
using Oracle JDK, which should be compatible with OpenJDK, thus the tests should
run correctly.
Some tests take a very long time to finish. If you want to exclude them, use
`BouncyCastleTest`, `SpongyCastleTest` or `OpenJDKTest` -- these targets exclude
all slow tests (which are annotated with `@SlowTest`).
Most test targets are failing, and each failure might be a security issue. To
learn more about what a failed test means, you might want to check out [our
documentation](doc/bugs.md) or the comments on top of the corresponding test
function and test class.
### Hall of Bugs
Here are some of the notable vulnerabilities that are uncovered by
Project Wycheproof:
* OpenJDK's SHA1withDSA leaks private keys > 1024 bits
* Test: testBiasSha1WithDSA in [DsaTest][dsa-test].
* This bug is the same as [CVE-2003-0971][cve-2003-0971] ("GnuPG generated
ElGamal signatures that leaked the private key").
* Bouncy Castle's ECDHC leaks private keys
* Test: testModifiedPublic and testWrongOrderEcdhc in
[EcdhTest][ecdh-test].
[dsa-test]: https://github.com/google/wycheproof/blob/master/java/com/google/security/wycheproof/testcases/DsaTest.java
[cve-2003-0971]: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2003-0971
[ecdh-test]: https://github.com/google/wycheproof/blob/master/java/com/google/security/wycheproof/testcases/EcdhTest.java
### Maintainers
Project Wycheproof has been maintained by:
* Daniel Bleichenbacher
* Thai Duong
* Emilia Kasper
* Quan Nguyen
* Charles Lee
### Contact and mailing list
If you want to contribute, please read [CONTRIBUTING](CONTRIBUTING.md) and send
us pull requests. You can also report bugs or request new tests.
If you'd like to talk to our developers or get notified about major new
tests, you may want to subscribe to our
[mailing list](https://groups.google.com/forum/#!forum/wycheproof-users). To
join, simply send an empty mail to wycheproof-users+subscribe@googlegroups.com.
| 0 |
react-native-google-signin/google-signin | Google Sign-in for your React Native applications | 2015-08-13T06:13:57Z | null | ![React Native Google Sign In](img/header.png)
<p align="center">
<a href="https://www.npmjs.com/package/@react-native-google-signin/google-signin"><img src="https://badge.fury.io/js/@react-native-google-signin%2Fgoogle-signin.svg" alt="NPM Version"></a>
</p>
❤️❤️ [New documentation site available!](https://react-native-google-signin.github.io/docs/install) ❤️❤️
## Features
- Support all 3 types of authentication methods (standard, with server-side validation or with offline access (aka server-side access))
- Promise-based API consistent between Android and iOS
- Typings for TypeScript and Flow
- Mock of the native module for testing with Jest
- Native sign in buttons
## Project setup and initialization
Please follow the "Installation" and "Setting up" guides at [react-native-google-signin.github.io](https://react-native-google-signin.github.io/).
Then, if you're a sponsor (as explained [here](https://react-native-google-signin.github.io/docs/install)), you can continue using the guides on the dedicated documentation site. If not, please use this readme file.
## Public API
### 1. GoogleSignin
This exposes the [legacy Google Sign-In for Android](https://developers.google.com/identity/sign-in/android/start) and [Google Sign-In for iOS](https://developers.google.com/identity/sign-in/ios/start) SDKs.
```js
import {
GoogleSignin,
GoogleSigninButton,
statusCodes,
} from '@react-native-google-signin/google-signin';
```
#### `configure(options): void`
It is mandatory to call this method before attempting to call `signIn()` and `signInSilently()`. This method is sync meaning you can call `signIn` / `signInSilently` right after it. In typical scenarios, `configure` needs to be called only once, after your app starts. In the native layer, this is a synchronous call. All parameters are optional.
Example usage with default options: you get user email and basic profile info.
```js
import { GoogleSignin } from '@react-native-google-signin/google-signin';
GoogleSignin.configure();
```
An example with all options enumerated:
```js
GoogleSignin.configure({
scopes: ['https://www.googleapis.com/auth/drive.readonly'], // what API you want to access on behalf of the user, default is email and profile
webClientId: '<FROM DEVELOPER CONSOLE>', // client ID of type WEB for your server. Required to get the idToken on the user object, and for offline access.
offlineAccess: true, // if you want to access Google API on behalf of the user FROM YOUR SERVER
hostedDomain: '', // specifies a hosted domain restriction
forceCodeForRefreshToken: true, // [Android] related to `serverAuthCode`, read the docs link below *.
accountName: '', // [Android] specifies an account name on the device that should be used
iosClientId: '<FROM DEVELOPER CONSOLE>', // [iOS] if you want to specify the client ID of type iOS (otherwise, it is taken from GoogleService-Info.plist)
googleServicePlistPath: '', // [iOS] if you renamed your GoogleService-Info file, new name here, e.g. GoogleService-Info-Staging
openIdRealm: '', // [iOS] The OpenID2 realm of the home web server. This allows Google to include the user's OpenID Identifier in the OpenID Connect ID token.
profileImageSize: 120, // [iOS] The desired height (and width) of the profile image. Defaults to 120px
});
```
\* [forceCodeForRefreshToken docs](https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#public-googlesigninoptions.builder-requestserverauthcode-string-serverclientid,-boolean-forcecodeforrefreshtoken)
#### `signIn(options: { loginHint?: string })`
Prompts a modal to let the user sign in into your application. Resolved promise returns an [`userInfo` object](#3-userinfo). Rejects with error otherwise.
Options: an object which contains a single key:
`loginHint`: [iOS-only] The user's ID, or email address, to be prefilled in the authentication UI if possible. [See docs here](<https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDSignIn#/c:objc(cs)GIDSignIn(im)signInWithConfiguration:presentingViewController:hint:callback:>)
```js
// import statusCodes along with GoogleSignin
import { GoogleSignin, statusCodes } from '@react-native-google-signin/google-signin';
// Somewhere in your code
signIn = async () => {
try {
await GoogleSignin.hasPlayServices();
const userInfo = await GoogleSignin.signIn();
setState({ userInfo });
} catch (error) {
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
// user cancelled the login flow
} else if (error.code === statusCodes.IN_PROGRESS) {
// operation (e.g. sign in) is in progress already
} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
// play services not available or outdated
} else {
// some other error happened
}
}
};
```
#### `addScopes(options: { scopes: Array<string> })`
This method resolves with `userInfo` object or with `null` if no user is currently logged in.
You may not need this call: you can supply required scopes to the `configure` call. However, if you want to gain access to more scopes later, use this call.
Example:
```js
const user = await GoogleSignin.addScopes({
scopes: ['https://www.googleapis.com/auth/user.gender.read'],
});
```
#### `signInSilently()`
May be called e.g. after of your main component mounts. This method returns a Promise that resolves with the [current user](#3-userinfo) and rejects with an error otherwise.
To see how to handle errors read [`signIn()` method](#signinoptions--loginhint-string-)
```js
getCurrentUserInfo = async () => {
try {
const userInfo = await GoogleSignin.signInSilently();
setState({ userInfo });
} catch (error) {
if (error.code === statusCodes.SIGN_IN_REQUIRED) {
// user has not signed in yet
} else {
// some other error
}
}
};
```
#### `isSignedIn()`
This method may be used to find out whether some user previously signed in. It returns a promise which resolves with a boolean value (it never rejects). In the native layer, this is a synchronous call and will resolve even when the device is offline.
Note that `isSignedIn()` can return true but `getCurrentUser()` can return `null` in which case you can call `signInSilently()` to recover the user.
However, it may happen that calling `signInSilently()` rejects with an error (e.g. due to a network issue).
```js
isSignedIn = async () => {
const isSignedIn = await GoogleSignin.isSignedIn();
setState({ isLoginScreenPresented: !isSignedIn });
};
```
#### `getCurrentUser()`
This method resolves with `null` or `userInfo` object of the currently signed-in user. The call never rejects and in the native layer, this is a synchronous call.
```js
getCurrentUser = async () => {
const currentUser = await GoogleSignin.getCurrentUser();
setState({ currentUser });
};
```
#### `clearCachedAccessToken(accessTokenString)`
This method only has an effect on Android. You may run into a `401 Unauthorized` error when a token is invalid. Call this method to remove the token from local cache and then call `getTokens()` to get fresh tokens. Calling this method on iOS does nothing and always resolves. This is because on iOS, `getTokens()` always returns valid tokens, refreshing them first if they have expired or are about to expire (see [docs](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDGoogleUser#-refreshtokensifneededwithcompletion:)).
#### `getTokens()`
Resolves with an object containing `{ idToken: string, accessToken: string, }` or rejects with an error. Note that using `accessToken` for identity assertion on your backend server is [discouraged](https://developers.google.com/identity/sign-in/android/migration-guide).
#### `signOut()`
Signs out the current user.
```js
signOut = async () => {
try {
await GoogleSignin.signOut();
setState({ user: null }); // Remember to remove the user from your app's state as well
} catch (error) {
console.error(error);
}
};
```
#### `revokeAccess()`
Removes your application from the user authorized applications. Read more about it [here](https://developers.google.com/identity/sign-in/ios/disconnect#objective-c) and [here](<https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInClient#revokeAccess()>).
```js
revokeAccess = async () => {
try {
await GoogleSignin.revokeAccess();
// Google Account disconnected from your app.
// Perform clean-up actions, such as deleting data associated with the disconnected account.
} catch (error) {
console.error(error);
}
};
```
#### `hasPlayServices(options)`
Checks if device has Google Play Services installed. Always resolves to true on iOS.
Presence of up-to-date Google Play Services is required to show the sign in modal, but it is _not_ required to perform calls to `configure` and `signInSilently`. Therefore, we recommend to call `hasPlayServices` directly before `signIn`.
```js
try {
await GoogleSignin.hasPlayServices({ showPlayServicesUpdateDialog: true });
// google services are available
} catch (err) {
console.error('play services are not available');
}
```
`hasPlayServices` accepts one parameter, an object which contains a single key: `showPlayServicesUpdateDialog` (defaults to `true`). When `showPlayServicesUpdateDialog` is set to true the library will prompt the user to take action to solve the issue, as seen in the figure below.
You may also use this call at any time to find out if Google Play Services are available and react to the result as necessary.
[![prompt install](img/prompt-install.png)](#prompt-install)
#### `statusCodes`
These are useful when determining which kind of error has occured during sign in process. Import `statusCodes` along with `GoogleSignIn`. Under the hood these constants are derived from native GoogleSignIn error codes and are platform specific. Always prefer to compare `error.code` to `statusCodes.SIGN_IN_CANCELLED` or `statusCodes.IN_PROGRESS` and not relying on raw value of the `error.code`.
| Name | Description |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SIGN_IN_CANCELLED` | When user cancels the sign in flow |
| `IN_PROGRESS` | Trying to invoke another operation (e.g. `signInSilently`) when previous one has not yet finished. If you call e.g. `signInSilently` twice, 2 calls to `signInSilently` in the native module will be done. The promise from the first call to `signInSilently` will be rejected with this error, and the second will resolve / reject with the result of the native module. |
| `SIGN_IN_REQUIRED` | Useful for use with `signInSilently()` - no user has signed in yet |
| `PLAY_SERVICES_NOT_AVAILABLE` | Play services are not available or outdated, this can only happen on Android |
[Example how to use `statusCodes`](#signinoptions--loginhint-string-).
### 2. GoogleSigninButton
![signin button](img/signin-button.png)
```js
import { GoogleSignin, GoogleSigninButton } from '@react-native-google-signin/google-signin';
<GoogleSigninButton
size={GoogleSigninButton.Size.Wide}
color={GoogleSigninButton.Color.Dark}
onPress={this._signIn}
disabled={this.state.isSigninInProgress}
/>;
```
#### Props
##### `size`
Possible values:
- Size.Icon: display only Google icon. Recommended size of 48 x 48.
- Size.Standard: icon with 'Sign in'. Recommended size of 230 x 48.
- Size.Wide: icon with 'Sign in with Google'. Recommended size of 312 x 48.
Default: `Size.Standard`. Given the `size` prop you pass, we'll automatically apply the recommended size, but you can override it by passing the style prop as in `style={{ width, height }}`.
##### `color`
Possible values:
- Color.Dark: apply a blue background
- Color.Light: apply a light gray background
##### `disabled`
Boolean. If true, all interactions for the button are disabled.
##### `onPress`
Handler to be called when the user taps the button
##### [Inherited `View` props...](https://facebook.github.io/react-native/docs/view#props)
### 3. `userInfo`
Example `userInfo` which is returned after successful sign in.
```
{
idToken: string,
serverAuthCode: string,
scopes: Array<string>
user: {
email: string,
id: string,
givenName: string,
familyName: string,
photo: string, // url
name: string // full name
}
}
```
## Jest module mock
If you use Jest for testing, you may need to mock the functionality of the native module. This library ships with a Jest mock that you can add to the `setupFiles` array in the Jest config.
By default, the mock behaves as if the calls were successful and returns mock user data.
```
"setupFiles": [
"./node_modules/@react-native-google-signin/google-signin/jest/build/setup.js"
],
```
## Want to contribute?
Check out the [contributor guide](CONTRIBUTING.md)!
## Notes
Calling the methods exposed by this package may involve remote network calls and you should thus take into account that such calls may take a long time to complete (e.g. in case of poor network connection).
**idToken Note**: idToken is not null only if you specify a valid `webClientId`. `webClientId` corresponds to your server clientID on the developers console. It **HAS TO BE** of type **WEB**
Read [iOS documentation](https://developers.google.com/identity/sign-in/ios/backend-auth) and [Android documentation](https://developers.google.com/identity/sign-in/android/backend-auth) for more information
**serverAuthCode Note**: serverAuthCode is not null only if you specify a valid `webClientId` and set `offlineAccess` to true. Once you get the auth code, you can send it to your backend server and exchange the code for an access token. Only with this freshly acquired token can you access user data.
Read [iOS documentation](https://developers.google.com/identity/sign-in/ios/offline-access) and [Android documentation](https://developers.google.com/identity/sign-in/android/offline-access) for more information.
## Additional scopes
The default requested scopes are `email` and `profile`.
If you want to manage other data from your application (for example access user agenda or upload a file to drive) you need to request additional permissions. This can be accomplished by adding the necessary scopes when configuring the GoogleSignin instance.
Please visit https://developers.google.com/identity/protocols/googlescopes or https://developers.google.com/oauthplayground/ for a list of available scopes.
## Troubleshooting
Please see the troubleshooting section in the [Android guide](https://react-native-google-signin.github.io/docs/setting-up/android) and [iOS guide](https://react-native-google-signin.github.io/docs/setting-up/ios).
## Licence
(MIT)
| 0 |
cjbi/admin3 | 一个轻巧的后台管理框架,项目后端基于Java21、SpringBoot3.2,前端基于TypeScript、Vite3、Vue3、Element Plus,只提供登录会话、用户管理、角色管理、权限资源管理、事件日志、对象存储等基础功能的最佳实践方案,不做过多的封装,适合二次定制开发、接私活、源码学习等场景 | 2017-10-30T05:25:50Z | null | # Admin3
## 项目说明
项目使用最新的技术栈(后端Java21、SpringBoot3.2,前端TypeScript、Vite3、Vue3、Element Plus),只提供了用户和权限管理的核心功能最佳实践方案,适合作为基础工程二次定制开发、接私活、源码学习等场景
## 主要特性
* 未使用任何安全框架,优雅地实现了会话管理+权限控制功能,支持请求URL权限拦截,菜单、按钮级别权限控制
* 会话通过数据库作为二级缓存,即使重启也不会丢失登录状态
* 支持AOT编译Native镜像,相较于传统JVM形式节省了至少50%的内存
* 前端资源支持独立部署+webjars嵌入到后端应用两种形式
* 持久层使用SpringData JPA进行开发,能够支持多种数据库适配
* 所有的接口都有端到端的测试用例覆盖,有代码变动都会全量跑一遍测试用例,保证功能绝对可用
* 统一对象存储封装,实现应用和上传文件位置隔离,支持本地上传&所有符合S3标准(阿里云、华为云、MinIO等)的对象存储方案
## 在线体验
- admin / 123456 (拥有所有权限)
- employee / employee (拥有部分权限)
- guest / guest (拥有查看权限)
演示地址: https://admin3.wetech.tech
在线部署: https://gitpod.io/#https://github.com/cjbi/admin3
## 项目预览
<table>
<tr>
<td><img src="docs/image/login.jpg"/></td>
<td><img src="docs/image/user.png"/></td>
</tr>
<tr>
<td><img src="docs/image/role-auth.png"/></td>
<td><img src="docs/image/role-member.png"/></td>
</tr>
<tr>
<td><img src="docs/image/permission.png"/></td>
<td><img src="docs/image/log-list.png"/></td>
</tr>
<tr>
<td><img src="docs/image/storage.png"/></td>
</tr>
</table>
## 技术文档
- [权限管理](docs/authority-management.md)
- [目录结构](docs/struct.md)
- [API 参考](docs/api-reference.md)
- [对象存储](docs/storage.md)
- [常用命令](docs/command.md)
## 软件需求
- JDK 17
- MySQL 8.0
- Maven 3.6.0+
## 本地部署
- 通过git下载源码
- 创建数据库admin3,数据库编码为UTF-8
- 修改application.yml文件,更改MySQL账号和密码
- 启动服务,访问管理后台地址:http://localhost:8080/admin3
- Swagger地址:http://localhost:8080/admin3/swagger-ui/index.html
## 待办列表
- [x] 操作日志
- [x] 文件上传(常用第三方对象存储服务统一封装),支持修改用户头像
- [ ] 国际化
- [ ] 更多功能请 [Issues](https://github.com/cjbi/admin3/issues) 留言
欢迎参与项目贡献!
## 许可证
[MIT](LICENSE)
| 0 |
yizhiwazi/springboot-socks | SpringBoot 基础教程 | 从入门到上瘾 | 基于2.0.0.M5制作 | 2017-09-24T16:03:57Z | null | 推荐阅读本教程的三大理由:
1. 文章内容均为原创,结合官方文档和实战经验编写。
2. 文章结构经过细致整理,对新人学习更加友好。
3. 精选常用技术,不求全面,但求精华!!
# SpringBoot 源码精读 图文教程
##### 源码下载:[《SpringBoot 基础教程-Git 》](https://github.com/yizhiwazi/springboot-socks)
— Hey Man,Don't forget to Star or Fork . —
##### 专题阅读:[《SpringBoot 从入门到上瘾 》](http://www.jianshu.com/p/964370d9374e)
# 快速入门
##### [SpringBoot 快速入门 + 3分钟打造RestAPI](http://www.jianshu.com/p/17e0e55c88db)
##### [SpringBoot 使用Spring Initializr快速构建工程 ](http://www.jianshu.com/p/d2b08a671e27)
##### [SpringBoot 工程结构推荐(新手必看)](http://www.jianshu.com/p/6dcfe16d91d0)
# 开发工具
##### [IntelliJ IDEA 使用教程(2017图文版) -- 从入门到上瘾](http://www.jianshu.com/p/9c65b7613c30)
# 外部配置
##### [SpringBoot 配置文件详解(告别XML)](http://www.jianshu.com/p/60b34464ca58)
##### [SpringBoot 如何下载最新的版本依赖](http://www.jianshu.com/p/6654e9fec93b)
# 数据库案例
##### [SpringBoot 快速整合MyBatis(去XML化+初体验)](http://www.jianshu.com/p/fa89b59ade40)
##### [SpringBoot 快速整合Mybatis(去XML化+注解进阶)](http://www.jianshu.com/p/828d2bd12b2f)
##### [SpringBoot 快速整合Mybatis(去XML化+通用Service)](http://www.jianshu.com/p/4b4e75952e74)
##### [SpringBoot 快速整合SpringDataJPA (优雅篇)](http://www.jianshu.com/p/71087bafdcdd)
##### [SpringBoot 快速开启事务(附常见坑点)](http://www.jianshu.com/p/380a9d980ca5)
# 模板引擎
##### [SpringBoot 添加对JSP的支持(附常见坑点)](http://www.jianshu.com/p/de939365c472)
##### [SpringBoot Thymeleaf--基于HTML5的现代模板引擎](http://www.jianshu.com/p/8dc48fa74e7e)
# 异常处理
##### [SpringBoot 统一异常处理(附核心工具类-ErrorInfoBuilder)](http://www.jianshu.com/p/3998ea8b53a8)
# 接口文档
##### [SpringBoot 使用Swagger2打造在线接口文档(附汉化教程)](http://www.jianshu.com/p/7e543f0f0bd8)
# 多模块划分(Maven)
##### [SpringBoot 多模块项目实践(附打包方法)](http://www.jianshu.com/p/59ceea4f029d)
# 跨域访问
##### [SpringBoot 实现前后端分离的跨域访问(CORS)](http://www.jianshu.com/p/477e7eaa6c2f)
##### [SpringBoot 实现前后端分离的跨域访问(Nginx)](http://www.jianshu.com/p/520021853827)
# 定时任务
##### [SpringBoot 创建定时任务(配合数据库动态执行)](http://www.jianshu.com/p/d160f2536de7)
# 趣味阅读
##### [【团队必备】阿里巴巴Java开发规约插件(附使用手册)](http://www.jianshu.com/p/cd19d42b00c8)
| 0 |
lenve/javaboy-code-samples | 公众号【江南一点雨】文章案例汇总,技术文章请戳这里-----> | 2019-05-10T11:36:20Z | null | 各位小伙伴大家好!
扫码加微信(微信ID:**a_java_boy2**),备注 SpringBoot,进群讨论。
![微信ID:a_java_boy2](https://user-images.githubusercontent.com/6023444/75459026-ba70d500-59b9-11ea-8cbd-3d5889f356c4.png)
## 仓库简介
松哥长期坚持在微信公众号**江南一点雨**上分享原创技术教程,但是代码一直没有统一管理过,最近有小伙伴提出,希望松哥能把文章的代码整理下,方便大伙参考。于是,松哥创建了这个仓库,用来分享微信公众号**江南一点雨**上文章的案例。小伙伴要是觉得这个仓库有用的话,记得点个 star。
## 代码索引
|code-samples|对应的文章|
|:---|:---|
|spring-boot-starter-custom|[徒手撸一个 Spring Boot 中的 Starter ,解密自动化配置黑魔法!](https://mp.weixin.qq.com/s/tKr_shLQnvcQADr4mvcU3A)|
|api.js|[Spring Boot + Vue 前后端分离开发,前端网络请求封装与配置](https://mp.weixin.qq.com/s/K8ANNmm6ZrP2xMyK6LGZ_g)|
|javassm|[这一次,我连 web.xml 都不要了,纯 Java 搭建 SSM 环境](https://mp.weixin.qq.com/s/NC_0oaeBzRjCB34U_ZWxIQ)|
|properties|[是时候彻底搞清楚 Spring Boot 的配置文件 application.properties 了!](https://mp.weixin.qq.com/s/cUhzpo8zkQq09d8S4WkAsw)|
|redis|[Spring Boot 操作 Redis,三种方案全解析!](https://mp.weixin.qq.com/s/cgDtmjPWTdh44bSlLC0Qsw)|
|sessionshare|[Spring Boot 一个依赖搞定 session 共享,没有比这更简单的方案了!](https://mp.weixin.qq.com/s/xs67SzSkMLz6-HgZVxTDFw)|
|restful|[Spring Boot 中 10 行代码构建 RESTful 风格应用](https://mp.weixin.qq.com/s/7uO87SOu93XH2Y3iWxWicg)|
|shiro|[Spring Boot 整合 Shiro ,两种方式全总结!](https://mp.weixin.qq.com/s/JU_-gn-yZ4VJJXTZvo7nZQ)|
|quartz|[Spring Boot 中实现定时任务的两种方式!](https://mp.weixin.qq.com/s/_20RYBkjKrB4tdpXI3hBOA)|
|ehcache|[另一种缓存,Spring Boot 整合 Ehcache](https://mp.weixin.qq.com/s/i9a3VOf_GMN_UBQ-8tKi3A)|
|thymeleaf|[极简 Spring Boot 整合 Thymeleaf 页面模板](https://mp.weixin.qq.com/s/7tgiuFceyZPHBZcLnPmkfw)|
|exception|[Spring Boot 中关于自定义异常处理的套路!](https://mp.weixin.qq.com/s/w26MvCWQ1RO4CUJrfXi5AA)|
|jdbctemplate|[Spring Boot数据持久化之JdbcTemplate](https://mp.weixin.qq.com/s/X4-e1cf3uZafg8XtMJeo_Q)|
|jdbcmulti|[Spring Boot多数据源配置之JdbcTemplate](https://mp.weixin.qq.com/s/7po83-CAoryo1eglumW42Q)|
|mybatis|[最简单的SpringBoot整合MyBatis教程](https://mp.weixin.qq.com/s/HOnX2XRDWrQ9oOKLo1ueKw)|
|mybatismulti|[极简Spring Boot整合MyBatis多数据源](https://mp.weixin.qq.com/s/9YXwk2-4zIq60WFuy6nXdw)|
|jpa|[是时候了解下Spring Boot整合 Jpa啦](http://www.javaboy.org/2019/0407/springboot-jpa.html)|
|jpamulti|[Spring Boot 整合 Jpa 多数据源](http://www.javaboy.org/2019/0407/springboot-jpa-multi.html)|
|jwt|[干货\|一个案例学会Spring Security 中使用 JWT!](https://mp.weixin.qq.com/s/riyFQSrkQBQBCyomE__fLA)|
|security_json|[SpringSecurity登录使用JSON格式数据](https://mp.weixin.qq.com/s/X1t-VCxzxIcQKOAu-pJrdw)|
|swagger2|[SpringBoot整合Swagger2,再也不用维护接口文档了!](https://mp.weixin.qq.com/s/iTsTqEeqT9K84S091ycdog)|
|cors|[Spring Boot中通过CORS解决跨域问题](https://mp.weixin.qq.com/s/ASEJwiswLu1UCRE-e2twYQ)|
|freemarker|[Spring Boot 整合 Freemarker,50 多行配置是怎么省略掉的?](https://mp.weixin.qq.com/s/zXwAy1dMlITqHOdBNeZEKg)|
|mail|[Spring Boot 邮件发送的 5 种姿势!](https://mp.weixin.qq.com/s/8UiEMpono-hUrRVwvDjUgA)|
|docker|[一键部署 Spring Boot 到远程 Docker 容器,就是这么秀!](https://mp.weixin.qq.com/s/vSCQLvQBYMYoPhdlO2v3XA)|
|https|[Spring Boot 支持 Https 有那么难吗?](https://mp.weixin.qq.com/s/WOmOXN_IK0IMjL0_hlAOFA)|
|jwt-demo|[Spring Security 结合 Jwt 实现无状态登录](https://mp.weixin.qq.com/s/Sn59dxwtsEWoj2wdynQuRQ)|
|docker-jib|[别用 Dockerfile 部署 Spring Boot 啦!松哥教你两步搞定!](https://mp.weixin.qq.com/s/ZqWktjLUOzHNKOGE6BfHRA)|
## 松哥简介
大家好,我是江南一点雨,管理学学士,大学自学 Java 编程,从移动端到前端到后端均有涉猎,现在专注于 Java 微服务,我是 CSDN 博客专家、华为云云享专家、《Spring Boot + Vue全栈开发实战》 作者、运营了一个公众号 **江南一点雨**,专注于 Spring Boot + 微服务以及前后端分离技术分享,欢迎大家关注!关注公众号回复 2TB,领取松哥为大家精心准备的 Java 干货!
### 我的公众号
![](http://www.javaboy.org/images/sb/javaboy.jpg)
### 我的站点
- 独立站点: http://www.javaboy.org
- GitHub: https://github.com/lenve
- CSDN: http://wangsong.blog.csdn.net
- 思否: https://segmentfault.com/u/lenve
- 博客园: https://www.cnblogs.com/lenve
- 掘金: https://juejin.im/user/57d679af0bd1d000585012a7 | 1 |
FudanNLP/fnlp | 中文自然语言处理工具包 Toolkit for Chinese natural language processing | 2014-03-12T01:47:00Z | null | FudanNLP (FNLP)
2018.12.16 我们很高兴发布了FudanNLP的后续版本,一个全新的自然语言处理工具[FastNLP](https://github.com/fastnlp/fastNLP)。FudanNLP不再更新。
2018.12.16 We are delighted to announce a new brand toolkit [FastNLP](https://github.com/fastnlp/fastNLP), a major update of the FudanNLP. The FudanNLP is no longer updated.
====
介绍(Introduction)
-----------------------------------
FNLP主要是为中文自然语言处理而开发的工具包,也包含为实现这些任务的机器学习算法和数据集。
本工具包及其包含数据集使用LGPL3.0许可证。
FNLP is developed for Chinese natural language processing (NLP), which also includes some machine learning algorithms and [DataSet data sets] to achieve the NLP tasks. FudanNLP is distributed under LGPL3.0.
If you're new to FNLP, check out the [Quick Start (使用说明)](https://github.com/FudanNLP/fnlp/wiki) page.
原FudanNLP项目地址:http://code.google.com/p/fudannlp
功能(Functions)
----
信息检索: 文本分类 新闻聚类
中文处理: 中文分词 词性标注 实体名识别 关键词抽取 依存句法分析 时间短语识别
结构化学习: 在线学习 层次分类 聚类
[ChangeLog 更新日志(ChangeLog)]
[性能测试(Benchmark)] (Benchmark)
[开发计划(Development Plan)] (DevPlan)
[开发人员列表(Developers)](People)
Demos
----
你可以通过试用下面的网站来测试部分功能。
You can also use the following site to check the partial functionality.
[Demo Website(演示网站)](http://nlp.fudan.edu.cn/demo)
有遇到FNLP不能处理的例子,请到这里提交: [协同数据收集](http://code.google.com/p/fudannlp/wiki/CollaborativeCollection)。
有问题请查看[FAQ](faq)或到 QQ群(253541693)讨论。
使用(Usages)
----
[FNLP入门教程](https://github.com/xpqiu/fnlp/wiki)
除了源码文件,还需要下载FNLP模型文件。由于模型文件较大,不便于存放在源码库之中,请至[Release](https://github.com/xpqiu/fnlp/releases)页面下载,并将模型文件放在“models”目录。
* seg.m 分词模型
* pos.m 词性标注模型
* dep.m 依存句法分析模型
欢迎大家提供非Java语言的接口。
引用(Citation)
----
If you would like to acknowledge our efforts, please cite the following paper.
如果我们的工作对您有帮助,请引用下面论文。
Xipeng Qiu, Qi Zhang and Xuanjing Huang, FudanNLP: A Toolkit for Chinese Natural Language Processing, In Proceedings of Annual Meeting of the Association for Computational Linguistics (ACL), 2013.*
@INPROCEEDINGS{Qiu:2013,
author = {Xipeng Qiu and Qi Zhang and Xuanjing Huang},
title = {FudanNLP: A Toolkit for Chinese Natural Language Processing},
booktitle = {Proceedings of Annual Meeting of the Association for Computational Linguistics},
year = {2013},
}
在[这里](http://jkx.fudan.edu.cn/~xpqiu/) 或 [DBLP](http://scholar.google.com/citations?sortby=pubdate&hl=en&user=Pq4Yp_kAAAAJ&view_op=list_works Google Scholar] 或 [http://www.informatik.uni-trier.de/~ley/pers/hd/q/Qiu:Xipeng.html) 可以找到更多的相关论文。
We used [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html ) to help optimize the code.
本网站(或页面)的文字允许在CC-BY-SA 3.0协议和GNU自由文档许可证下修改和再使用。
| 0 |
apache/logging-log4j2 | Apache Log4j 2 is a versatile, feature-rich, efficient logging API and backend for Java. | 2013-06-12T07:00:19Z | null | null | 0 |
IrisShaders/Iris | A modern shaders mod for Minecraft compatible with existing OptiFine shader packs | 2020-10-22T20:21:12Z | null | ![Iris: An open-source shaders mod compatible with OptiFine shaderpacks](docs/banner.png)
# Iris
## Links
* **Visit [our website](https://irisshaders.dev) for downloads and pretty screenshots!**
* * **Visit [Modrinth](https://modrinth.com/shaders) to find shader packs!**
* Visit [our Discord server](https://discord.gg/jQJnav2jPu) to chat about the mod and get support! It's also a great place to get development updates right as they're happening.
* Visit [the developer documentation](https://github.com/IrisShaders/Iris/tree/trunk/docs/development) for information on developing, building, and contributing to Iris!
## FAQ
- Find answers to frequently asked questions on our [FAQ page](docs/faq.md).
- Iris supports almost all shaderpacks, but a list of unsupported shaderpacks is available [here](docs/unsupportedshaders.md).
- A list of unfixable limitations in Iris is available [here](docs/usage/limitations.md).
## Why did you make Iris?
Iris was created to fill a void that I saw in the Minecraft customization and graphical enhancement community: the lack of an open-source shaders mod that would let me load my favorite shader packs on modern versions of the game, while retaining performance and compatibility with modpacks. OptiFine, the current dominant mod for loading shader packs, has restrictive licensing that firmly stands in the way of any sort of tinkering, and is fairly notorious for having compatibility issues with the mods that I like. It's also mutually incompatible with Sodium, the best rendering optimization mod in existence by a large margin. ShadersMod was never updated past 1.12, and it lacks support for many of the many modern popular shaderpacks. So I created Iris, to try and solve these issues, and also address many other longstanding issues with shader packs.
I first and foremost develop Iris to meet my own needs of a performance-oriented shaders mod with good compatibility and potential for tinkering. Iris when paired with Sodium delivers great performance on my machine, finally making it fully possible for me to actually play with shaders instead of just periodically switching them on to take pretty screenshots, then switching them off once I get tired of frame drops. Of course, as it turns out, I'm far from the only person who benefits from the development of Iris, which is why I've decided to release it to the public as an open-source mod.
Canvas is another shaders mod that has already gained some traction. Its big downside for me, however, is the fact that it doesn't support the existing popular OptiFine shaderpacks that I want to use. This is because it uses a new format for shader packs that isn't compatible with the existing format, in order to achieve many of its goals for better mod integration with shaders. And while Canvas now has a few nice shaders like Lumi Lights, I still want to have the option of using existing shader packs that were designed for OptiFine. Shader packs just aren't interchangeable, just like how you cannot hand a copy of *The Last Supper* to someone who wants a copy of the *Mona Lisa*. They're both great pieces of art, but you absolutely cannot just swap one out for the other. That being said, if you're a fan of the shader packs available for Canvas, then great! Canvas and Iris are both perfectly fine ways to enjoy shaders with Minecraft.
## Goals
These are the goals of Iris. Iris hasn't fully achieved all these goals, however we are getting close.
* **Performance.** Iris should fully utilize your graphics card when paired with optimization mods like Sodium.
* **Correctness.** Iris should try to be as issueless as possible in its implementation.
* **Mod compatibility.** Iris should make a best effort to be compatible with modded environments.
* **Backwards compatibility.** All existing ShadersMod / OptiFine shader packs should just work on Iris, without any modifications required.
* **Features for shader pack developers.** Once Iris has full support for existing features of the shader pipeline and is reasonably bug free, I wish to expand the horizons of what's possible to do with Minecraft shader packs through the addition of new features to the shader pipeline. Unlimited color buffers, direct voxel data access, and fancy debug HUDs are some examples of features that I'd like to add in the future.
* **A well-organized codebase.** I'd like for working with Iris code to be a pleasant experience overall.
## What's the current state of development?
Iris has public releases for 1.18.2, 1.19.2, 1.19.3, and 1.19.4 that work with the official releases of Sodium. Iris is generally usable on most shader packs, and most shader packs are being designed with Iris support in mind.
However, Iris is still not complete software. Performance can be improved, and more features are being added for shader developers. There are also some minor missing features from OptiFine that make the implementation incomplete.
## How can I help?
* The Iris Discord server is looking for people willing to provide support and moderate the server! Go to #applications on our server if you'd like to apply.
* Code review on open PRs is appreciated! This helps get important issues with PRs resolved before I give them a look.
* Code contributions through PRs are also welcome! If you're working on a large / significant feature it's usually a good idea to talk about your plans beforehand, to make sure that work isn't wasted.
## But where's the Forge version?
Iris doesn't support Forge. This is for a few reasons:
* My time is limited, and properly supporting all the mods available for Forge (as well as Forge itself) is a huge amount of work. When people ask for Forge support, they aren't asking just for Iris to run on Forge, they are also asking for it to be compatible out of the box with their kitchen sink modpack that contains over 300 mods. As a result, properly supporting Forge would require me to divert large amounts of precious time into fixing tedious compatibility issues and bugs, time that could instead be spent making the Fabric version of Iris better.
* The Forge toolchain isn't really designed to play nice with mods like Iris that need to make many patches to the game code. It's possible, but Fabric & Quilt are just *better* for mods like Iris. It's no coincidence that the emergence of Fabric and the initial emergence of OptiFine replacements happened at around the same time.
* Sodium, which Iris depends on to achieve its great performance, has no official Forge version. It's a long story, but in short: the lead developers of Forge were incredibly hostile to JellySquid when she developed for Forge, and since then have made no credible attempts to repair relations or even admit wrongdoing.
Some users have already ported Iris to Forge, however these ports generally come with mod compatibility issues and outdated updates.
The license of Iris does permit others to legally port Iris to Forge, and we are not strictly opposed to the existence of an Iris Forge port created by others. However, what we are opposed to is someone doing a bare-minimum port of Iris to Forge, releasing it to the public, and then abandoning it or poorly maintaining it while compatibility issues and bug reports accumulate. When that happens, not only does that hurt the reputation of Iris, but we also ultimately get flooded by users wanting support with a low-effort Forge port that we didn't even make.
So, if you want to distribute a Forge port of Iris, we'd prefer if you let us know. Please don't just name your port "Iris Forge," "Iris for Forge," or "Iris Forge Port" either. Be original, and don't just hijack our name, unless we've given you permission to use one of those kinds of names. If a well-qualified group of people willing to maintain a Forge port of Iris does appear, then a name like "Iris Forge" might be appropriate - otherwise, it probably isn't appropriate.
## Credits
* **TheOnlyThing and Vaerian**, for creating the excellent logo
* **Mumfrey**, for creating the Mixin bytecode patching system used by Iris and Sodium internally
* **The Fabric and Quilt projects**, for enabling the existence of mods like Iris that make many patches to the game
* **JellySquid**, for creating Sodium, the best rendering optimization mod for Minecraft that currently exists, and for making it open-source
* **All past, present, and future contributors to Iris**, for helping the project move along
* **Dr. Rubisco**, for maintaining the website
* **The Iris support and moderation team**, for handling user support requests and allowing me to focus on developing Iris
* **daxnitro, karyonix, and sp614x**, for creating and maintaining the current shaders mods
## License
All code in this (Iris) repository is completely free and open source, and you are free to read, distribute, and modify the code as long as you abide by the (fairly reasonable) terms of the [GNU LGPLv3 license](https://github.com/IrisShaders/Iris/blob/master/LICENSE).
glsl-transformer is licensed under the GNU Affero General Public License version 3. This may affect your ability to distribute Iris.
Though it's not legally required, I'd appreciate it if you could ask before hosting your own public downloads for compiled versions of Iris. Though if you want to add the mod to a site like MCBBS, that's fine, no need to ask me.
| 0 |
brettwooldridge/HikariCP | 光 HikariCP・A solid, high-performance, JDBC connection pool at last. | 2013-10-08T05:43:03Z | null | <h1><img src="https://github.com/brettwooldridge/HikariCP/wiki/Hikari.png"> HikariCP<sup><sup> It's Faster.</sup></sup><sub><sub><sup>Hi·ka·ri [hi·ka·'lē] (<i>Origin: Japanese</i>): light; ray.</sup></sub></sub></h1><br>
[![][Build Status img]][Build Status]
[![][Coverage Status img]][Coverage Status]
[![][license img]][license]
[![][Maven Central img]][Maven Central]
[![][Javadocs img]][Javadocs]
[![][Librapay img]][Librapay]
Fast, simple, reliable. HikariCP is a "zero-overhead" production ready JDBC connection pool. At roughly 130Kb, the library is very light. Read about [how we do it here](https://github.com/brettwooldridge/HikariCP/wiki/Down-the-Rabbit-Hole).
<sup>**"Simplicity is prerequisite for reliability."**<br>
- *Edsger Dijkstra*</sup>
----------------------------------------------------
### Index
* [Artifacts](#artifacts)
* [JMH Benchmarks](#checkered_flag-jmh-benchmarks)
* [Analyses](#microscope-analyses)
* [Spike Demand Pool Comparison](#spike-demand-pool-comparison)
* [You're probably doing it wrong](#youre-probably-doing-it-wrong)
* [WIX Engineering Analysis](#wix-engineering-analysis)
* [Failure: Pools behaving badly](#failure-pools-behaving-badly)
* [User Testimonials](#family-user-testimonials) <br>
* [Configuration](#gear-configuration-knobs-baby) <br>
* [Essentials](#essentials)
* [Frequently used](#frequently-used)
* [Infrequently used](#infrequently-used)
* [Initialization](#rocket-initialization)
----------------------------------------------------
### Artifacts
_**Java 11+** maven artifact:_
```xml
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>5.1.0</version>
</dependency>
```
_Java 8 maven artifact (*maintenance mode*):_
```xml
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>4.0.3</version>
</dependency>
```
_Java 7 maven artifact (*maintenance mode*):_
```xml
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
<version>2.4.13</version>
</dependency>
```
_Java 6 maven artifact (*maintenance mode*):_
```xml
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java6</artifactId>
<version>2.3.13</version>
</dependency>
```
Or [download from here](http://search.maven.org/#search%7Cga%7C1%7Ccom.zaxxer.hikaricp).
----------------------------------------------------
### :checkered_flag: JMH Benchmarks
Microbenchmarks were created to isolate and measure the overhead of pools using the [JMH microbenchmark framework](http://openjdk.java.net/projects/code-tools/jmh/). You can checkout the [HikariCP benchmark project for details](https://github.com/brettwooldridge/HikariCP-benchmark) and review/run the benchmarks yourself.
![](https://github.com/brettwooldridge/HikariCP/wiki/HikariCP-bench-2.6.0.png)
* One *Connection Cycle* is defined as single ``DataSource.getConnection()``/``Connection.close()``.
* One *Statement Cycle* is defined as single ``Connection.prepareStatement()``, ``Statement.execute()``, ``Statement.close()``.
<sup>
<sup>1</sup> Versions: HikariCP 2.6.0, commons-dbcp2 2.1.1, Tomcat 8.0.24, Vibur 16.1, c3p0 0.9.5.2, Java 8u111 <br/>
<sup>2</sup> Intel Core i7-3770 CPU @ 3.40GHz <br/>
<sup>3</sup> Uncontended benchmark: 32 threads/32 connections, Contended benchmark: 32 threads, 16 connections <br/>
<sup>4</sup> Apache Tomcat fails to complete the Statement benchmark when the Tomcat <i>StatementFinalizer</i> is used <a href="https://raw.githubusercontent.com/wiki/brettwooldridge/HikariCP/markdown/Tomcat-Statement-Failure.md">due to excessive garbage collection times</a><br/>
<sup>5</sup> Apache DBCP fails to complete the Statement benchmark <a href="https://raw.githubusercontent.com/wiki/brettwooldridge/HikariCP/markdown/Dbcp2-Statement-Failure.md">due to excessive garbage collection times</a>
</sup>
----------------------------------------------------
### :microscope: Analyses
#### Spike Demand Pool Comparison
<a href="https://github.com/brettwooldridge/HikariCP/blob/dev/documents/Welcome-To-The-Jungle.md"><img width="400" align="right" src="https://github.com/brettwooldridge/HikariCP/wiki/Spike-Hikari.png"></a>
Analysis of HikariCP v2.6, in comparison to other pools, in relation to a unique "spike demand" load.
The customer's environment imposed a high cost of new connection acquisition, and a requirement for a dynamically-sized pool, but yet a need for responsiveness to request spikes. Read about the spike demand handling [here](https://github.com/brettwooldridge/HikariCP/blob/dev/documents/Welcome-To-The-Jungle.md).
<br/>
<br/>
#### You're [probably] doing it wrong
<a href="https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing"><img width="200" align="right" src="https://github.com/brettwooldridge/HikariCP/wiki/Postgres_Chart.png"></a>
AKA *"What you probably didn't know about connection pool sizing"*. Watch a video from the Oracle Real-world Performance group, and learn about why connection pools do not need to be sized as large as they often are. In fact, oversized connection pools have a clear and demonstrable *negative* impact on performance; a 50x difference in the case of the Oracle demonstration. [Read on to find out](https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing).
<br/>
#### WIX Engineering Analysis
<a href="https://www.wix.engineering/blog/how-does-hikaricp-compare-to-other-connection-pools"><img width="180" align="left" src="https://github.com/brettwooldridge/HikariCP/wiki/Wix-Engineering.png"></a>
We'd like to thank the guys over at WIX for the unsolicited and deep write-up about HikariCP on their [engineering blog](https://www.wix.engineering/post/how-does-hikaricp-compare-to-other-connection-pools). Take a look if you have time.
<br/>
<br/>
<br/>
#### Failure: Pools behaving badly
Read our interesting ["Database down" pool challenge](https://github.com/brettwooldridge/HikariCP/wiki/Bad-Behavior:-Handling-Database-Down).
----------------------------------------------------
#### "Imitation Is The Sincerest Form Of Plagiarism" - <sub><sup>anonymous</sup></sub>
Open source software like HikariCP, like any product, competes in the free market. We get it. We understand that product advancements, once public, are often co-opted. And we understand that ideas can arise from the zeitgeist; simultaneously and independently. But the timeline of innovation, particularly in open source projects, is also clear and we want our users to understand the direction of flow of innovation in our space. It could be demoralizing to see the result of hundreds of hours of thought and research co-opted so easily, and perhaps that is inherent in a free marketplace, but we are not demoralized. *We are motivated; to widen the gap.*
----------------------------------------------------
### :family: User Testimonials
[![](https://github.com/brettwooldridge/HikariCP/wiki/tweet3.png)](https://twitter.com/jkuipers)<br/>
[![](https://github.com/brettwooldridge/HikariCP/wiki/tweet1.png)](https://twitter.com/steve_objectify)<br/>
[![](https://github.com/brettwooldridge/HikariCP/wiki/tweet2.png)](https://twitter.com/brettemeyer)<br/>
[![](https://github.com/brettwooldridge/HikariCP/wiki/tweet4.png)](https://twitter.com/dgomesbr/status/527521925401419776)
------------------------------
### :gear: Configuration (knobs, baby!)
HikariCP comes with *sane* defaults that perform well in most deployments without additional tweaking. **Every property is optional, except for the "essentials" marked below.**
<sup>📎</sup> *HikariCP uses milliseconds for all time values.*
🚨 HikariCP relies on accurate timers for both performance and reliability. It is *imperative* that your server is synchronized with a time-source such as an NTP server. *Especially* if your server is running within a virtual machine. Why? [Read more here](https://dba.stackexchange.com/a/171020). **Do not rely on hypervisor settings to "synchronize" the clock of the virtual machine. Configure time-source synchronization inside the virtual machine.** If you come asking for support on an issue that turns out to be caused by lack time synchronization, you will be taunted publicly on Twitter.
#### Essentials
🔤``dataSourceClassName``<br/>
This is the name of the ``DataSource`` class provided by the JDBC driver. Consult the
documentation for your specific JDBC driver to get this class name, or see the [table](https://github.com/brettwooldridge/HikariCP#popular-datasource-class-names) below.
Note XA data sources are not supported. XA requires a real transaction manager like
[bitronix](https://github.com/bitronix/btm). Note that you do not need this property if you are using
``jdbcUrl`` for "old-school" DriverManager-based JDBC driver configuration.
*Default: none*
*- or -*
🔤``jdbcUrl``<br/>
This property directs HikariCP to use "DriverManager-based" configuration. We feel that DataSource-based
configuration (above) is superior for a variety of reasons (see below), but for many deployments there is
little significant difference. **When using this property with "old" drivers, you may also need to set
the ``driverClassName`` property, but try it first without.** Note that if this property is used, you may
still use *DataSource* properties to configure your driver and is in fact recommended over driver parameters
specified in the URL itself.
*Default: none*
***
🔤``username``<br/>
This property sets the default authentication username used when obtaining *Connections* from
the underlying driver. Note that for DataSources this works in a very deterministic fashion by
calling ``DataSource.getConnection(*username*, password)`` on the underlying DataSource. However,
for Driver-based configurations, every driver is different. In the case of Driver-based, HikariCP
will use this ``username`` property to set a ``user`` property in the ``Properties`` passed to the
driver's ``DriverManager.getConnection(jdbcUrl, props)`` call. If this is not what you need,
skip this method entirely and call ``addDataSourceProperty("username", ...)``, for example.
*Default: none*
🔤``password``<br/>
This property sets the default authentication password used when obtaining *Connections* from
the underlying driver. Note that for DataSources this works in a very deterministic fashion by
calling ``DataSource.getConnection(username, *password*)`` on the underlying DataSource. However,
for Driver-based configurations, every driver is different. In the case of Driver-based, HikariCP
will use this ``password`` property to set a ``password`` property in the ``Properties`` passed to the
driver's ``DriverManager.getConnection(jdbcUrl, props)`` call. If this is not what you need,
skip this method entirely and call ``addDataSourceProperty("pass", ...)``, for example.
*Default: none*
#### Frequently used
✅``autoCommit``<br/>
This property controls the default auto-commit behavior of connections returned from the pool.
It is a boolean value.
*Default: true*
⏳``connectionTimeout``<br/>
This property controls the maximum number of milliseconds that a client (that's you) will wait
for a connection from the pool. If this time is exceeded without a connection becoming
available, a SQLException will be thrown. Lowest acceptable connection timeout is 250 ms.
*Default: 30000 (30 seconds)*
⏳``idleTimeout``<br/>
This property controls the maximum amount of time that a connection is allowed to sit idle in the
pool. **This setting only applies when ``minimumIdle`` is defined to be less than ``maximumPoolSize``.**
Idle connections will *not* be retired once the pool reaches ``minimumIdle`` connections. Whether a
connection is retired as idle or not is subject to a maximum variation of +30 seconds, and average
variation of +15 seconds. A connection will never be retired as idle *before* this timeout. A value
of 0 means that idle connections are never removed from the pool. The minimum allowed value is 10000ms
(10 seconds).
*Default: 600000 (10 minutes)*
⏳``keepaliveTime``<br/>
This property controls how frequently HikariCP will attempt to keep a connection alive, in order to prevent
it from being timed out by the database or network infrastructure. This value must be less than the
`maxLifetime` value. A "keepalive" will only occur on an idle connection. When the time arrives for a "keepalive"
against a given connection, that connection will be removed from the pool, "pinged", and then returned to the
pool. The 'ping' is one of either: invocation of the JDBC4 `isValid()` method, or execution of the
`connectionTestQuery`. Typically, the duration out-of-the-pool should be measured in single digit milliseconds
or even sub-millisecond, and therefore should have little or no noticeable performance impact. The minimum
allowed value is 30000ms (30 seconds), but a value in the range of minutes is most desirable.
*Default: 0 (disabled)*
⏳``maxLifetime``<br/>
This property controls the maximum lifetime of a connection in the pool. An in-use connection will
never be retired, only when it is closed will it then be removed. On a connection-by-connection
basis, minor negative attenuation is applied to avoid mass-extinction in the pool. **We strongly recommend
setting this value, and it should be several seconds shorter than any database or infrastructure imposed
connection time limit.** A value of 0 indicates no maximum lifetime (infinite lifetime), subject of
course to the ``idleTimeout`` setting. The minimum allowed value is 30000ms (30 seconds).
*Default: 1800000 (30 minutes)*
🔤``connectionTestQuery``<br/>
**If your driver supports JDBC4 we strongly recommend not setting this property.** This is for
"legacy" drivers that do not support the JDBC4 ``Connection.isValid() API``. This is the query that
will be executed just before a connection is given to you from the pool to validate that the
connection to the database is still alive. *Again, try running the pool without this property,
HikariCP will log an error if your driver is not JDBC4 compliant to let you know.*
*Default: none*
🔢``minimumIdle``<br/>
This property controls the minimum number of *idle connections* that HikariCP tries to maintain
in the pool. If the idle connections dip below this value and total connections in the pool are less than ``maximumPoolSize``,
HikariCP will make a best effort to add additional connections quickly and efficiently.
However, for maximum performance and responsiveness to spike demands,
we recommend *not* setting this value and instead allowing HikariCP to act as a *fixed size* connection pool.
*Default: same as maximumPoolSize*
🔢``maximumPoolSize``<br/>
This property controls the maximum size that the pool is allowed to reach, including both
idle and in-use connections. Basically this value will determine the maximum number of
actual connections to the database backend. A reasonable value for this is best determined
by your execution environment. When the pool reaches this size, and no idle connections are
available, calls to getConnection() will block for up to ``connectionTimeout`` milliseconds
before timing out. Please read [about pool sizing](https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing).
*Default: 10*
📈``metricRegistry``<br/>
This property is only available via programmatic configuration or IoC container. This property
allows you to specify an instance of a *Codahale/Dropwizard* ``MetricRegistry`` to be used by the
pool to record various metrics. See the [Metrics](https://github.com/brettwooldridge/HikariCP/wiki/Dropwizard-Metrics)
wiki page for details.
*Default: none*
📈``healthCheckRegistry``<br/>
This property is only available via programmatic configuration or IoC container. This property
allows you to specify an instance of a *Codahale/Dropwizard* ``HealthCheckRegistry`` to be used by the
pool to report current health information. See the [Health Checks](https://github.com/brettwooldridge/HikariCP/wiki/Dropwizard-HealthChecks)
wiki page for details.
*Default: none*
🔤``poolName``<br/>
This property represents a user-defined name for the connection pool and appears mainly
in logging and JMX management consoles to identify pools and pool configurations.
*Default: auto-generated*
#### Infrequently used
⏳``initializationFailTimeout``<br/>
This property controls whether the pool will "fail fast" if the pool cannot be seeded with
an initial connection successfully. Any positive number is taken to be the number of
milliseconds to attempt to acquire an initial connection; the application thread will be
blocked during this period. If a connection cannot be acquired before this timeout occurs,
an exception will be thrown. This timeout is applied *after* the ``connectionTimeout``
period. If the value is zero (0), HikariCP will attempt to obtain and validate a connection.
If a connection is obtained, but fails validation, an exception will be thrown and the pool
not started. However, if a connection cannot be obtained, the pool will start, but later
efforts to obtain a connection may fail. A value less than zero will bypass any initial
connection attempt, and the pool will start immediately while trying to obtain connections
in the background. Consequently, later efforts to obtain a connection may fail.
*Default: 1*
❎``isolateInternalQueries``<br/>
This property determines whether HikariCP isolates internal pool queries, such as the
connection alive test, in their own transaction. Since these are typically read-only
queries, it is rarely necessary to encapsulate them in their own transaction. This
property only applies if ``autoCommit`` is disabled.
*Default: false*
❎``allowPoolSuspension``<br/>
This property controls whether the pool can be suspended and resumed through JMX. This is
useful for certain failover automation scenarios. When the pool is suspended, calls to
``getConnection()`` will *not* timeout and will be held until the pool is resumed.
*Default: false*
❎``readOnly``<br/>
This property controls whether *Connections* obtained from the pool are in read-only mode by
default. Note some databases do not support the concept of read-only mode, while others provide
query optimizations when the *Connection* is set to read-only. Whether you need this property
or not will depend largely on your application and database.
*Default: false*
❎``registerMbeans``<br/>
This property controls whether or not JMX Management Beans ("MBeans") are registered or not.
*Default: false*
🔤``catalog``<br/>
This property sets the default *catalog* for databases that support the concept of catalogs.
If this property is not specified, the default catalog defined by the JDBC driver is used.
*Default: driver default*
🔤``connectionInitSql``<br/>
This property sets a SQL statement that will be executed after every new connection creation
before adding it to the pool. If this SQL is not valid or throws an exception, it will be
treated as a connection failure and the standard retry logic will be followed.
*Default: none*
🔤``driverClassName``<br/>
HikariCP will attempt to resolve a driver through the DriverManager based solely on the ``jdbcUrl``,
but for some older drivers the ``driverClassName`` must also be specified. Omit this property unless
you get an obvious error message indicating that the driver was not found.
*Default: none*
🔤``transactionIsolation``<br/>
This property controls the default transaction isolation level of connections returned from
the pool. If this property is not specified, the default transaction isolation level defined
by the JDBC driver is used. Only use this property if you have specific isolation requirements that are
common for all queries. The value of this property is the constant name from the ``Connection``
class such as ``TRANSACTION_READ_COMMITTED``, ``TRANSACTION_REPEATABLE_READ``, etc.
*Default: driver default*
⏳``validationTimeout``<br/>
This property controls the maximum amount of time that a connection will be tested for aliveness.
This value must be less than the ``connectionTimeout``. Lowest acceptable validation timeout is 250 ms.
*Default: 5000*
⏳``leakDetectionThreshold``<br/>
This property controls the amount of time that a connection can be out of the pool before a
message is logged indicating a possible connection leak. A value of 0 means leak detection
is disabled. Lowest acceptable value for enabling leak detection is 2000 (2 seconds).
*Default: 0*
➡``dataSource``<br/>
This property is only available via programmatic configuration or IoC container. This property
allows you to directly set the instance of the ``DataSource`` to be wrapped by the pool, rather than
having HikariCP construct it via reflection. This can be useful in some dependency injection
frameworks. When this property is specified, the ``dataSourceClassName`` property and all
DataSource-specific properties will be ignored.
*Default: none*
🔤``schema``<br/>
This property sets the default *schema* for databases that support the concept of schemas.
If this property is not specified, the default schema defined by the JDBC driver is used.
*Default: driver default*
➡``threadFactory``<br/>
This property is only available via programmatic configuration or IoC container. This property
allows you to set the instance of the ``java.util.concurrent.ThreadFactory`` that will be used
for creating all threads used by the pool. It is needed in some restricted execution environments
where threads can only be created through a ``ThreadFactory`` provided by the application container.
*Default: none*
➡``scheduledExecutor``<br/>
This property is only available via programmatic configuration or IoC container. This property
allows you to set the instance of the ``java.util.concurrent.ScheduledExecutorService`` that will
be used for various internally scheduled tasks. If supplying HikariCP with a ``ScheduledThreadPoolExecutor``
instance, it is recommended that ``setRemoveOnCancelPolicy(true)`` is used.
*Default: none*
----------------------------------------------------
#### Missing Knobs
HikariCP has plenty of "knobs" to turn as you can see above, but comparatively less than some other pools.
This is a design philosophy. The HikariCP design aesthetic is Minimalism. In keeping with the
*simple is better* or *less is more* design philosophy, some configuration axis are intentionally left out.
#### Statement Cache
Many connection pools, including Apache DBCP, Vibur, c3p0 and others offer ``PreparedStatement`` caching.
HikariCP does not. Why?
At the connection pool layer ``PreparedStatements`` can only be cached *per connection*. If your application
has 250 commonly executed queries and a pool of 20 connections you are asking your database to hold on to
5000 query execution plans -- and similarly the pool must cache this many ``PreparedStatements`` and their
related graph of objects.
Most major database JDBC drivers already have a Statement cache that can be configured, including PostgreSQL,
Oracle, Derby, MySQL, DB2, and many others. JDBC drivers are in a unique position to exploit database specific
features, and nearly all of the caching implementations are capable of sharing execution plans *across connections*.
This means that instead of 5000 statements in memory and associated execution plans, your 250 commonly executed
queries result in exactly 250 execution plans in the database. Clever implementations do not even retain
``PreparedStatement`` objects in memory at the driver-level but instead merely attach new instances to existing plan IDs.
Using a statement cache at the pooling layer is an [anti-pattern](https://en.wikipedia.org/wiki/Anti-pattern),
and will negatively impact your application performance compared to driver-provided caches.
#### Log Statement Text / Slow Query Logging
Like Statement caching, most major database vendors support statement logging through
properties of their own driver. This includes Oracle, MySQL, Derby, MSSQL, and others. Some
even support slow query logging. For those few databases that do not support it, several options are available.
We have received [a report that p6spy works well](https://github.com/brettwooldridge/HikariCP/issues/57#issuecomment-354647631),
and also note the availability of [log4jdbc](https://github.com/arthurblake/log4jdbc) and [jdbcdslog-exp](https://code.google.com/p/jdbcdslog-exp/).
#### Rapid Recovery
Please read the [Rapid Recovery Guide](https://github.com/brettwooldridge/HikariCP/wiki/Rapid-Recovery) for details on how to configure your driver and system for proper recovery from database restart and network partition events.
----------------------------------------------------
### :rocket: Initialization
You can use the ``HikariConfig`` class like so<sup>1</sup>:
```java
HikariConfig config = new HikariConfig();
config.setJdbcUrl("jdbc:mysql://localhost:3306/simpsons");
config.setUsername("bart");
config.setPassword("51mp50n");
config.addDataSourceProperty("cachePrepStmts", "true");
config.addDataSourceProperty("prepStmtCacheSize", "250");
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
HikariDataSource ds = new HikariDataSource(config);
```
<sup><sup>1</sup> MySQL-specific example, DO NOT COPY VERBATIM.</sup>
or directly instantiate a ``HikariDataSource`` like so:
```java
HikariDataSource ds = new HikariDataSource();
ds.setJdbcUrl("jdbc:mysql://localhost:3306/simpsons");
ds.setUsername("bart");
ds.setPassword("51mp50n");
...
```
or property file based:
```java
// Examines both filesystem and classpath for .properties file
HikariConfig config = new HikariConfig("/some/path/hikari.properties");
HikariDataSource ds = new HikariDataSource(config);
```
Example property file:
```ini
dataSourceClassName=org.postgresql.ds.PGSimpleDataSource
dataSource.user=test
dataSource.password=test
dataSource.databaseName=mydb
dataSource.portNumber=5432
dataSource.serverName=localhost
```
or ``java.util.Properties`` based:
```java
Properties props = new Properties();
props.setProperty("dataSourceClassName", "org.postgresql.ds.PGSimpleDataSource");
props.setProperty("dataSource.user", "test");
props.setProperty("dataSource.password", "test");
props.setProperty("dataSource.databaseName", "mydb");
props.put("dataSource.logWriter", new PrintWriter(System.out));
HikariConfig config = new HikariConfig(props);
HikariDataSource ds = new HikariDataSource(config);
```
There is also a System property available, ``hikaricp.configurationFile``, that can be used to specify the
location of a properties file. If you intend to use this option, construct a ``HikariConfig`` or ``HikariDataSource``
instance using the default constructor and the properties file will be loaded.
### Performance Tips
[MySQL Performance Tips](https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration)
### Popular DataSource Class Names
We recommended using ``dataSourceClassName`` instead of ``jdbcUrl``, but either is acceptable. We'll say that again, *either is acceptable*.
⚠ *Note: Spring Boot auto-configuration users, you need to use ``jdbcUrl``-based configuration.*
⚠ The MySQL DataSource is known to be broken with respect to network timeout support. Use ``jdbcUrl`` configuration instead.
Here is a list of JDBC *DataSource* classes for popular databases:
| Database | Driver | *DataSource* class |
|:---------------- |:------------ |:-------------------|
| Apache Derby | Derby | org.apache.derby.jdbc.ClientDataSource |
| Firebird | Jaybird | org.firebirdsql.ds.FBSimpleDataSource |
| Google Spanner | Spanner | com.google.cloud.spanner.jdbc.JdbcDriver |
| H2 | H2 | org.h2.jdbcx.JdbcDataSource |
| HSQLDB | HSQLDB | org.hsqldb.jdbc.JDBCDataSource |
| IBM DB2 | IBM JCC | com.ibm.db2.jcc.DB2SimpleDataSource |
| IBM Informix | IBM Informix | com.informix.jdbcx.IfxDataSource |
| MS SQL Server | Microsoft | com.microsoft.sqlserver.jdbc.SQLServerDataSource |
| ~~MySQL~~ | Connector/J | ~~com.mysql.jdbc.jdbc2.optional.MysqlDataSource~~ |
| MariaDB | MariaDB | org.mariadb.jdbc.MariaDbDataSource |
| Oracle | Oracle | oracle.jdbc.pool.OracleDataSource |
| OrientDB | OrientDB | com.orientechnologies.orient.jdbc.OrientDataSource |
| PostgreSQL | pgjdbc-ng | com.impossibl.postgres.jdbc.PGDataSource |
| PostgreSQL | PostgreSQL | org.postgresql.ds.PGSimpleDataSource |
| SAP MaxDB | SAP | com.sap.dbtech.jdbc.DriverSapDB |
| SQLite | xerial | org.sqlite.SQLiteDataSource |
| SyBase | jConnect | com.sybase.jdbc4.jdbc.SybDataSource |
### Play Framework Plugin
Note Play 2.4 now uses HikariCP by default. A new plugin has come up for the the Play framework; [play-hikaricp](http://edulify.github.io/play-hikaricp.edulify.com/). If you're using the excellent Play framework, your application deserves HikariCP. Thanks Edulify Team!
### Clojure Wrapper
A new Clojure wrapper has been created by [tomekw](https://github.com/tomekw) and can be [found here](https://github.com/tomekw/hikari-cp).
### JRuby Wrapper
A new JRuby wrapper has been created by [tomekw](https://github.com/tomekw) and can be [found here](https://github.com/tomekw/hucpa).
----------------------------------------------------
### Support <sup><sup>💬</sup></sup>
Google discussion group [HikariCP here](https://groups.google.com/d/forum/hikari-cp), growing [FAQ](https://github.com/brettwooldridge/HikariCP/wiki/FAQ).
[![](https://raw.github.com/wiki/brettwooldridge/HikariCP/twitter.png)](https://twitter.com/share?text=Interesting%20JDBC%20Connection%20Pool&hashtags=HikariCP&url=https%3A%2F%2Fgithub.com%2Fbrettwooldridge%2FHikariCP) [![](https://raw.github.com/wiki/brettwooldridge/HikariCP/facebook.png)](http://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fgithub.com%2Fbrettwooldridge%2FHikariCP&width&layout=standard&action=recommend&show_faces=true&share=false&height=80)
### Wiki
Don't forget the [Wiki](https://github.com/brettwooldridge/HikariCP/wiki) for additional information such as:
* [FAQ](https://github.com/brettwooldridge/HikariCP/wiki/FAQ)
* [Hibernate 4.x Configuration](https://github.com/brettwooldridge/HikariCP/wiki/Hibernate4)
* [MySQL Configuration Tips](https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration)
* etc.
----------------------------------------------------
### Requirements
⇒ Java 8+ (Java 6/7 artifacts are in maintenance mode)<br/>
⇒ slf4j library<br/>
### Sponsors
High-performance projects can never have too many tools! We would like to thank the following companies:
Thanks to [ej-technologies](https://www.ej-technologies.com) for their excellent all-in-one profiler, [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html).
YourKit supports open source projects with its full-featured Java Profiler. Click the YourKit logo below to learn more.<br/>
[![](https://github.com/brettwooldridge/HikariCP/wiki/yklogo.png)](http://www.yourkit.com/java/profiler/index.jsp)<br/>
### Contributions
Please perform changes and submit pull requests from the ``dev`` branch instead of ``master``. Please set your editor to use spaces instead of tabs, and adhere to the apparent style of the code you are editing. The ``dev`` branch is always more "current" than the ``master`` if you are looking to live life on the edge.
[Build Status]:https://circleci.com/gh/brettwooldridge/HikariCP
[Build Status img]:https://circleci.com/gh/brettwooldridge/HikariCP/tree/dev.svg?style=shield
[Coverage Status]:https://codecov.io/gh/brettwooldridge/HikariCP
[Coverage Status img]:https://codecov.io/gh/brettwooldridge/HikariCP/branch/dev/graph/badge.svg
[license]:LICENSE
[license img]:https://img.shields.io/badge/license-Apache%202-blue.svg
[Maven Central]:https://maven-badges.herokuapp.com/maven-central/com.zaxxer/HikariCP
[Maven Central img]:https://maven-badges.herokuapp.com/maven-central/com.zaxxer/HikariCP/badge.svg
[Javadocs]:http://javadoc.io/doc/com.zaxxer/HikariCP
[Javadocs img]:http://javadoc.io/badge/com.zaxxer/HikariCP.svg
[Librapay]:https://liberapay.com/brettwooldridge
[Librapay img]:https://img.shields.io/liberapay/patrons/brettwooldridge.svg?logo=liberapay
| 0 |
irsdl/IIS-ShortName-Scanner | latest version of scanners for IIS short filename (8.3) disclosure vulnerability | 2014-04-28T22:25:40Z | null | IIS Short Name Scanner - 2012-2023 & Still Giving...
=====================
Latest presentation:
* [Beyond Microsoft IIS Short File Name Disclosure](/presentation/Steelcon-2023-Beyond_Microsoft_IIS_Short_File_Name_Disclosure.pdf)
Latest blog post:
* https://soroush.me/blog/2023/07/thirteen-years-on-advancing-the-understanding-of-iis-short-file-name-sfn-disclosure/
I recommended everyone to try @bitquark's new tool in Go before trying this old tool: https://github.com/bitquark/shortscan
The latest version of scanner for IIS short file name (8.3) disclosure vulnerability by using the tilde (~) character. This issue has been discovered in 2010 but has been evolved a few times since.
This is an old tool and the code is a spaghetti, but it is capable to tackle even the latest IIS (IIS 10 on Windows Server 2022 at the time of writing this)! It has recently been updated, so it can support sending custom HTTP methods without reflection hacks in Java. However, some awesome researchers have tried to reimplement this tool using other technologies such as in Go, and when they become mature, they probably work better than this.
Description
-------------
Microsoft IIS contains a flaw that may lead to an unauthorized information disclosure. The issue is triggered during the parsing of a request that contains a tilde character (~). This may allow a remote attacker to gain access to file and folder name information.
This scanner was moved from https://code.google.com/p/iis-shortname-scanner-poc/ to GitHub for better support.
Original research file: http://soroush.secproject.com/downloadable/microsoft_iis_tilde_character_vulnerability_feature.pdf
It is possible to detect short names of files and directories which have an 8.3 equivalent in Windows by using some vectors in several versions of Microsoft IIS. For instance, it is possible to detect all short-names of ".aspx" files as they have 4 letters in their extensions.
Note: new techniques have been introduced to the latest versions of this scanner, and it can now scan IIS10 when it is vulnerable.
It is not easy to find the original file or folder names based on the short names. However, the following methods are recommended as examples:
- If you can guess the full extension (for instance .ASPX when the 8.3 extension is .ASP), always try the short name with the full extension.
- Sometimes short names are listed in Google which can be used to find the actual names
- Using text dictionary files is also recommended. If a name starts with another word, the second part should be guessed based on a dictionary file separately. For instance, ADDACC~1.ASP can be AddAccount.aspx, AddAccounts.aspx, AddAccurateMargine.aspx, etc
- Searching in the website contents and resources can also be useful to find the full name. This can be achieved for example by searching Site Map in the Burp Suite tool.
Installation
--------------
The recent version has been compiled by using Open JDK 18 (the old jar files for other JDKs have been removed but can be found in the Git history).
You will need to download files in the [/release](https://github.com/irsdl/IIS-ShortName-Scanner/tree/master/release) directory to use this old application!
You can also compile this application yourself. Please submit any issues in GitHub for further investigation.
Usage
-------
### Command line options
USAGE 1 (To verify if the target is vulnerable with the default config file):
```
java -jar iis_shortname_scanner.jar [URL]
```
USAGE 2 (To find 8.3 file names with the default config file):
```
java -jar iis_shortname_scanner.jar [ShowProgress] [ThreadNumbers] [URL]
```
USAGE 3 (To verify if the target is vulnerable with a new config file):
```
java -jar iis_shortname_scanner.jar [URL] [configFile]
```
USAGE 4 (To find 8.3 file names with a new config file):
```
java -jar iis_shortname_scanner.jar [ShowProgress] [ThreadNumbers] [URL] [configFile]
```
USAGE 5 (To scan multiple targets using a linux box):
```
./multi_targets.sh <scope file> <is_default_https (1=https)>
```
DETAILS:
```
[ShowProgress]: 0= Show final results only - 1= Show final results step by step - 2= Show Progress
[ThreadNumbers]: 0= No thread - Integer Number = Number of concurrent threads [be careful about IIS Denial of Service]
[URL]: A complete URL - starts with http/https protocol
[configFile]: path to a new config file which is based on config.xml
```
Examples:
```
- Example 0 (to see if the target is vulnerable):
java -jar iis_shortname_scanner.jar http://example.com/folder/
- Example 1 (uses no thread - very slow):
java -jar iis_shortname_scanner.jar 2 0 http://example.com/folder/new%20folder/
- Example 2 (uses 20 threads - recommended):
java -jar iis_shortname_scanner.jar 2 20 http://example.com/folder/new%20folder/
- Example 3 (saves output in a text file):
java -jar iis_shortname_scanner.jar 0 20 http://example.com/folder/new%20folder/ > c:\results.txt
- Example 4 (bypasses IIS basic authentication):
java -jar iis_shortname_scanner.jar 2 20 http://example.com/folder/AuthNeeded:$I30:$Index_Allocation/
- Example 5 (using a new config file):
java -jar iis_shortname_scanner.jar 2 20 http://example.com/folder/ newconfig.xml
- Example 6 (scanning multiple targets using a linux box):
./multi_targets.sh scope.txt 1
```
Note 1: Edit config.xml file to change the scanner settings and add additional headers.
Note 2: Sometimes it does not work for the first time, and you need to try again.
How Does It Work?
------------------
In the following examples, IIS responds with a different message when a file exists:
```
http://target/folder/valid*~1.*/.aspx
http://target/folder/invalid*~1.*/.aspx
```
However, different IIS servers may respond differently, and for instance some of them may work with the following or other similar patterns:
```
http://target/folder/valid*~1.*\.asp
http://target/folder/invalid*~1.*\.asp
```
Method of sending the request such as GET, POST, OPTIONS, DEBUG, ... is also important.
I believe monitoring the requests by using a proxy is the best way of understating this issue and this scanner.
How To Fix This Issue
----------------------
Microsoft will not patch this security issue. Their last response is as follows:
```
Thank you for contacting the Microsoft Security Response Center.
We appreciate your bringing this to our attention. Our previous guidance stands: deploy IIS with 8.3 names disabled.
```
Therefore, it is recommended to deploy IIS with 8.3 names disabled by creating the following registry key on a Windows operating system:
```
Key: HKLM\SYSTEM\CurrentControlSet\Control\FileSystem
Name: NtfsDisable8dot3NameCreation
Value: 1
```
Note: The web folder needs to be recreated, as the change to the NtfsDisable8dot3NameCreation registry entry affects only files and directories that are created after the change, so the files that already exist are not affected.
Docker Usage
------------
build the image:
```bash
docker build . -t shortname
```
file mode:
```bash
docker run \
-v $(realpath urls.txt):/app/urls.txt \
-v $(realpath output_dir):/app/iis_shortname_results \
shortname -f urls.txt
```
single mode:
```bash
docker run shortname 2 20 http://example.com
```
overwrite config file:
```bash
docker run \
-v $(realpath config.xml):/app/config.xml \
shortname http://example.com
```
References
------------
Research links:
* https://soroush.me/blog/2023/07/thirteen-years-on-advancing-the-understanding-of-iis-short-file-name-sfn-disclosure/
* https://soroush.secproject.com/blog/2014/08/iis-short-file-name-disclosure-is-back-is-your-server-vulnerable/
* http://soroush.secproject.com/downloadable/microsoft_iis_tilde_character_vulnerability_feature.pdf (old original research)
Website Reference:
* http://soroush.secproject.com/blog/2012/06/microsoft-iis-tilde-character-vulnerabilityfeature-short-filefolder-name-disclosure/
Video Links:
* https://www.youtube.com/watch?v=KbZ-y7b7yDs at SteelCon 2023
* https://www.youtube.com/watch?v=HrJW6Y9kHC4 by shubs (@infosec_au)
* http://www.youtube.com/watch?v=XOd90yCXOP4
Other links:
* http://www.osvdb.org/83771
* http://www.exploit-db.com/exploits/19525/
* http://securitytracker.com/id?1027223
| 0 |
pytorch/serve | Serve, optimize and scale PyTorch models in production | 2019-10-03T03:17:43Z | null | # TorchServe
![Nightly build](https://github.com/pytorch/serve/actions/workflows/torchserve-nightly-build.yml/badge.svg)
![Docker Nightly build](https://github.com/pytorch/serve/actions/workflows/docker-nightly-build.yml/badge.svg)
![Benchmark Nightly](https://github.com/pytorch/serve/actions/workflows/benchmark_nightly.yml/badge.svg)
![Docker Regression Nightly](https://github.com/pytorch/serve/actions/workflows/regression_tests_docker.yml/badge.svg)
![KServe Regression Nightly](https://github.com/pytorch/serve/actions/workflows/kserve_cpu_tests.yml/badge.svg)
![Kubernetes Regression Nightly](https://github.com/pytorch/serve/actions/workflows/kubernetes_tests.yml/badge.svg)
TorchServe is a flexible and easy-to-use tool for serving and scaling PyTorch models in production.
Requires python >= 3.8
```bash
curl http://127.0.0.1:8080/predictions/bert -T input.txt
```
### 🚀 Quick start with TorchServe
```bash
# Install dependencies
# cuda is optional
python ./ts_scripts/install_dependencies.py --cuda=cu121
# Latest release
pip install torchserve torch-model-archiver torch-workflow-archiver
# Nightly build
pip install torchserve-nightly torch-model-archiver-nightly torch-workflow-archiver-nightly
```
### 🚀 Quick start with TorchServe (conda)
```bash
# Install dependencies
# cuda is optional
python ./ts_scripts/install_dependencies.py --cuda=cu121
# Latest release
conda install -c pytorch torchserve torch-model-archiver torch-workflow-archiver
# Nightly build
conda install -c pytorch-nightly torchserve torch-model-archiver torch-workflow-archiver
```
[Getting started guide](docs/getting_started.md)
### 🐳 Quick Start with Docker
```bash
# Latest release
docker pull pytorch/torchserve
# Nightly build
docker pull pytorch/torchserve-nightly
```
Refer to [torchserve docker](docker/README.md) for details.
## ⚡ Why TorchServe
* Write once, run anywhere, on-prem, on-cloud, supports inference on CPUs, GPUs, AWS Inf1/Inf2/Trn1, Google Cloud TPUs, [Nvidia MPS](docs/nvidia_mps.md)
* [Model Management API](docs/management_api.md): multi model management with optimized worker to model allocation
* [Inference API](docs/inference_api.md): REST and gRPC support for batched inference
* [TorchServe Workflows](examples/Workflows/README.md): deploy complex DAGs with multiple interdependent models
* Default way to serve PyTorch models in
* [Sagemaker](https://aws.amazon.com/blogs/machine-learning/serving-pytorch-models-in-production-with-the-amazon-sagemaker-native-torchserve-integration/)
* [Vertex AI](https://cloud.google.com/blog/topics/developers-practitioners/pytorch-google-cloud-how-deploy-pytorch-models-vertex-ai)
* [Kubernetes](kubernetes) with support for [autoscaling](kubernetes#session-affinity-with-multiple-torchserve-pods), session-affinity, monitoring using Grafana works on-prem, AWS EKS, Google GKE, Azure AKS
* [Kserve](https://kserve.github.io/website/0.8/modelserving/v1beta1/torchserve/): Supports both v1 and v2 API, [autoscaling and canary deployments](kubernetes/kserve/README.md#autoscaling) for A/B testing
* [Kubeflow](https://v0-5.kubeflow.org/docs/components/pytorchserving/)
* [MLflow](https://github.com/mlflow/mlflow-torchserve)
* Export your model for optimized inference. Torchscript out of the box, [PyTorch Compiler](examples/pt2/README.md) preview, [ORT and ONNX](https://github.com/pytorch/serve/blob/master/docs/performance_guide.md), [IPEX](https://github.com/pytorch/serve/tree/master/examples/intel_extension_for_pytorch), [TensorRT](https://github.com/pytorch/serve/blob/master/docs/performance_guide.md), [FasterTransformer](https://github.com/pytorch/serve/tree/master/examples/FasterTransformer_HuggingFace_Bert), FlashAttention (Better Transformers)
* [Performance Guide](docs/performance_guide.md): builtin support to optimize, benchmark, and profile PyTorch and TorchServe performance
* [Expressive handlers](CONTRIBUTING.md): An expressive handler architecture that makes it trivial to support inferencing for your use case with [many supported out of the box](https://github.com/pytorch/serve/tree/master/ts/torch_handler)
* [Metrics API](docs/metrics.md): out-of-the-box support for system-level metrics with [Prometheus exports](https://github.com/pytorch/serve/tree/master/examples/custom_metrics), custom metrics,
* [Large Model Inference Guide](docs/large_model_inference.md): With support for GenAI, LLMs including
* [SOTA GenAI performance](https://github.com/pytorch/serve/tree/master/examples/pt2#torchcompile-genai-examples) using `torch.compile`
* Fast Kernels with FlashAttention v2, continuous batching and streaming response
* PyTorch [Tensor Parallel](examples/large_models/tp_llama) preview, [Pipeline Parallel](examples/large_models/Huggingface_pippy)
* Microsoft [DeepSpeed](examples/large_models/deepspeed), [DeepSpeed-Mii](examples/large_models/deepspeed_mii)
* Hugging Face [Accelerate](examples/large_models/Huggingface_accelerate), [Diffusers](examples/diffusers)
* Running large models on AWS [Sagemaker](https://docs.aws.amazon.com/sagemaker/latest/dg/large-model-inference-tutorials-torchserve.html) and [Inferentia2](https://pytorch.org/blog/high-performance-llama/)
* Running [Meta Llama Chatbot locally on Mac](examples/LLM/llama)
* Monitoring using Grafana and [Datadog](https://www.datadoghq.com/blog/ai-integrations/#model-serving-and-deployment-vertex-ai-amazon-sagemaker-torchserve)
## 🤔 How does TorchServe work
* [Model Server for PyTorch Documentation](docs/README.md): Full documentation
* [TorchServe internals](docs/internals.md): How TorchServe was built
* [Contributing guide](CONTRIBUTING.md): How to contribute to TorchServe
## 🏆 Highlighted Examples
* [Serving Meta Llama with TorchServe](examples/LLM/llama/README.md)
* [Chatbot with Meta Llama on Mac 🦙💬](examples/LLM/llama/chat_app)
* [🤗 HuggingFace Transformers](examples/Huggingface_Transformers) with a [Better Transformer Integration/ Flash Attention & Xformer Memory Efficient ](examples/Huggingface_Transformers#Speed-up-inference-with-Better-Transformer)
* [Stable Diffusion](examples/diffusers)
* [Model parallel inference](examples/Huggingface_Transformers#model-parallelism)
* [MultiModal models with MMF](https://github.com/pytorch/serve/tree/master/examples/MMF-activity-recognition) combining text, audio and video
* [Dual Neural Machine Translation](examples/Workflows/nmt_transformers_pipeline) for a complex workflow DAG
* [TorchServe Integrations](examples/README.md#torchserve-integrations)
* [TorchServe Internals](examples/README.md#torchserve-internals)
* [TorchServe UseCases](examples/README.md#usecases)
For [more examples](examples/README.md)
## 🛡️ TorchServe Security Policy
[SECURITY.md](SECURITY.md)
## 🤓 Learn More
https://pytorch.org/serve
## 🫂 Contributing
We welcome all contributions!
To learn more about how to contribute, see the contributor guide [here](https://github.com/pytorch/serve/blob/master/CONTRIBUTING.md).
## 📰 News
* [High performance Llama 2 deployments with AWS Inferentia2 using TorchServe](https://pytorch.org/blog/high-performance-llama/)
* [Naver Case Study: Transition From High-Cost GPUs to Intel CPUs and oneAPI powered Software with performance](https://pytorch.org/blog/ml-model-server-resource-saving/)
* [Run multiple generative AI models on GPU using Amazon SageMaker multi-model endpoints with TorchServe and save up to 75% in inference costs](https://pytorch.org/blog/amazon-sagemaker-w-torchserve/)
* [Deploying your Generative AI model in only four steps with Vertex AI and PyTorch](https://cloud.google.com/blog/products/ai-machine-learning/get-your-genai-model-going-in-four-easy-steps)
* [PyTorch Model Serving on Google Cloud TPU v5](https://cloud.google.com/tpu/docs/v5e-inference#pytorch-model-inference-and-serving)
* [Monitoring using Datadog](https://www.datadoghq.com/blog/ai-integrations/#model-serving-and-deployment-vertex-ai-amazon-sagemaker-torchserve)
* [Torchserve Performance Tuning, Animated Drawings Case-Study](https://pytorch.org/blog/torchserve-performance-tuning/)
* [Walmart Search: Serving Models at a Scale on TorchServe](https://medium.com/walmartglobaltech/search-model-serving-using-pytorch-and-torchserve-6caf9d1c5f4d)
* [🎥 Scaling inference on CPU with TorchServe](https://www.youtube.com/watch?v=066_Jd6cwZg)
* [🎥 TorchServe C++ backend](https://www.youtube.com/watch?v=OSmGGDpaesc)
* [Grokking Intel CPU PyTorch performance from first principles: a TorchServe case study](https://pytorch.org/tutorials/intermediate/torchserve_with_ipex.html)
* [Grokking Intel CPU PyTorch performance from first principles( Part 2): a TorchServe case study](https://pytorch.org/tutorials/intermediate/torchserve_with_ipex_2.html)
* [Case Study: Amazon Ads Uses PyTorch and AWS Inferentia to Scale Models for Ads Processing](https://pytorch.org/blog/amazon-ads-case-study/)
* [Optimize your inference jobs using dynamic batch inference with TorchServe on Amazon SageMaker](https://aws.amazon.com/blogs/machine-learning/optimize-your-inference-jobs-using-dynamic-batch-inference-with-torchserve-on-amazon-sagemaker/)
* [Using AI to bring children's drawings to life](https://ai.meta.com/blog/using-ai-to-bring-childrens-drawings-to-life/)
* [🎥 Model Serving in PyTorch](https://www.youtube.com/watch?v=2A17ZtycsPw)
* [Evolution of Cresta's machine learning architecture: Migration to AWS and PyTorch](https://aws.amazon.com/blogs/machine-learning/evolution-of-crestas-machine-learning-architecture-migration-to-aws-and-pytorch/)
* [🎥 Explain Like I’m 5: TorchServe](https://www.youtube.com/watch?v=NEdZbkfHQCk)
* [🎥 How to Serve PyTorch Models with TorchServe](https://www.youtube.com/watch?v=XlO7iQMV3Ik)
* [How to deploy PyTorch models on Vertex AI](https://cloud.google.com/blog/topics/developers-practitioners/pytorch-google-cloud-how-deploy-pytorch-models-vertex-ai)
* [Quantitative Comparison of Serving Platforms](https://biano-ai.github.io/research/2021/08/16/quantitative-comparison-of-serving-platforms-for-neural-networks.html)
* [Efficient Serverless deployment of PyTorch models on Azure](https://medium.com/pytorch/efficient-serverless-deployment-of-pytorch-models-on-azure-dc9c2b6bfee7)
* [Deploy PyTorch models with TorchServe in Azure Machine Learning online endpoints](https://techcommunity.microsoft.com/t5/ai-machine-learning-blog/deploy-pytorch-models-with-torchserve-in-azure-machine-learning/ba-p/2466459)
* [Dynaboard moving beyond accuracy to holistic model evaluation in NLP](https://ai.facebook.com/blog/dynaboard-moving-beyond-accuracy-to-holistic-model-evaluation-in-nlp/)
* [A MLOps Tale about operationalising MLFlow and PyTorch](https://medium.com/mlops-community/engineering-lab-1-team-1-a-mlops-tale-about-operationalising-mlflow-and-pytorch-62193b55dc19)
* [Operationalize, Scale and Infuse Trust in AI Models using KFServing](https://blog.kubeflow.org/release/official/2021/03/08/kfserving-0.5.html)
* [How Wadhwani AI Uses PyTorch To Empower Cotton Farmers](https://medium.com/pytorch/how-wadhwani-ai-uses-pytorch-to-empower-cotton-farmers-14397f4c9f2b)
* [TorchServe Streamlit Integration](https://cceyda.github.io/blog/huggingface/torchserve/streamlit/ner/2020/10/09/huggingface_streamlit_serve.html)
* [Dynabench aims to make AI models more robust through distributed human workers](https://venturebeat.com/2020/09/24/facebooks-dynabench-aims-to-make-ai-models-more-robust-through-distributed-human-workers/)
* [Announcing TorchServe](https://aws.amazon.com/blogs/aws/announcing-torchserve-an-open-source-model-server-for-pytorch/)
## 💖 All Contributors
<a href="https://github.com/pytorch/serve/graphs/contributors">
<img src="https://contrib.rocks/image?repo=pytorch/serve" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
## ⚖️ Disclaimer
This repository is jointly operated and maintained by Amazon, Meta and a number of individual contributors listed in the [CONTRIBUTORS](https://github.com/pytorch/serve/graphs/contributors) file. For questions directed at Meta, please send an email to opensource@fb.com. For questions directed at Amazon, please send an email to torchserve@amazon.com. For all other questions, please open up an issue in this repository [here](https://github.com/pytorch/serve/issues).
*TorchServe acknowledges the [Multi Model Server (MMS)](https://github.com/awslabs/multi-model-server) project from which it was derived*
| 0 |
Exrick/xpay | XPay个人免签收款支付系统 完全免费 资金直接到达本人账号 支持 支付宝 微信 QQ 云闪付 无需备案 无需签约 无需挂机监控APP 无需插件 无需第三方支付SDK 无需营业执照身份证 只需收款码 搞定支付流程 现已支持移动端支付 | 2017-12-12T16:11:19Z | null | # XPay个人收款支付系统
[![AUR](https://img.shields.io/badge/GPL-v3-red)](https://github.com/Exrick/xpay/blob/master/License)
[![](https://img.shields.io/badge/Author-Exrick-orange.svg)](http://blog.exrick.cn)
[![](https://img.shields.io/badge/version-2.0-brightgreen.svg)](https://github.com/Exrick/xpay)
[![GitHub stars](https://img.shields.io/github/stars/Exrick/xpay.svg?style=social&label=Stars)](https://github.com/Exrick/xpay)
[![GitHub forks](https://img.shields.io/github/forks/Exrick/xpay.svg?style=social&label=Fork)](https://github.com/Exrick/xpay)
> 当前开源版本v2.0 [点我获取最新源码及文档v3.1](http://xpay.exrick.cn/pay)
### [宣传视频](https://www.bilibili.com/video/av23121122/)
- 作者亲自制作 [点我观看](https://www.bilibili.com/video/av23121122/)
### 项目已部署,在线Demo
- 本项目运行后效果:http://xpay.exrick.cn
- 本项目Swagger接口文档:http://xpay.exrick.cn/swagger-ui.html
- 实际综合应用商城项目:http://xmall.exrick.cn/
### v3.1版本已发布!支付宝微信官方接口 自动回调![立即获取源码和文档](http://xpay.exrick.cn/pay)
- v3.1 新增微信支付官方接口 自动回调 提供个人申请教程(需一定开通成本)
- v3.0 新增支付宝当面付 官方接口 自动回调 提供个人申请教程
- v2.0 支付宝新增扫码点单收款,暂无风控,支持一键打开支付宝APP
- v1.9 新增云闪付收款【**国外可用 收款直达银行卡**】,支付宝新增一键红包支付模式
- v1.8 支付宝新增多种支付方式(含银行转账) v1.7 支付宝无法修改金额备注 新增支付宝扫码检测
- v1.6 支付宝使用转账码方案 v1.5 解决近期支付宝史上最严风控问题 v1.3 实现轮询回调
- 实现订单支付标识 解决无法识别支付人问题
- ~~实现一键打开支付宝APP支付(支持安卓浏览器、IOS应用,不支持微信中打开)~~(支付宝已封禁)
- 实现移动端支付方案 支持H5、APP、小程序
- 轻松支持多账户收款 赶快使用手机扫码体验吧
![](http://xpay.exrick.cn/assets/images/mobiletest.png)
#### 注:v3.1源码(含详细文档)获取方式
- 进入 [XPay官网](http://xpay.exrick.cn/pay) 成功支付测试后 将自动发至你所填写的邮箱中
### 声明
> 此系统只针对个人开发收款支付,实际可应用到实现~~自动维护捐赠表等业务,无法商用~~!最新版本可已实现充值、发卡、发货等业务,可勉强供真正个人商用!日入百万千万的请绕道!当然你还可将此项目当作入门级的SpringBoot练习项目
### 个人申请支付接口现状
- 原生支付宝,微信支付
- `支付宝微信只服务于有营业执照、个体工商户的商户。截止目前(2020-01-01)无法以个人身份(或以个人为主体)直接申请API。`
- 结论:不可行
- 关联企业支付宝账号
- `即新建企业账户,然后采用已经实名认证了的企业账户关联该账户,用其实名主体完成新账户的实名认证。一系列操作完成后,新的账户具有和企业账户一样的资质可以申请API。`
- 结论:如果条件允许,推荐此方案
- 聚合支付工具,Ping++等
- `就是个第四方聚合支付工具,简化了接入开发流程而已,个人开发者仍然需要去申请所需接口的使用权限。`
- 结论:不可行
- 第四方聚合支付
- `支付资金进入官方账号,自己再进行提现操作。需要开通域名,提现手续费较高,支付页面不支持自定义。另外,对于此种类型的聚合支付平台,隐藏着极高的跑路风险。`
- 结论:不推荐
- 有赞
- `通过有赞微商城支付接口收款。`
- 结论:不推荐,需手动提现,不免费,费用6800/年起,一旦风控资金很难取出。
- 借助拼多多店铺、淘宝代付功能、微博红包、钉钉红包等第三方APP的支付功能
- 结论:不推荐,可能随时被风控。
- 挂机监听软件,PaysApi、绿点支付等
- `本质上依然是采用挂机监听的策略,但针对的是移动端支付宝或微信的收款通知消息`
- 结论:成本高,配置麻烦,需24小时挂台安卓手机,不免费
- 其他基于Xposed挂机监听软件
- `基于virtual xposed hook相关技术,可自动生成任意备注金额收款码 参考抢红包外挂`
- 结论:成本高,配置麻烦,需24小时挂台安卓手机,量大易触发风控、不免费,黑产适用
- Payjs (疑使用[微信小微商户](https://pay.weixin.qq.com/index.php/core/affiliate/micro_intro))
- 结论:仅支持微信、不免费、使用官方接口收取代开费用以及额外手续费
- 国外支付,PayPal、Strip:不可用
### XPay
- `支持支付宝、微信、QQ钱包、翼支付、云闪付等任意收款码,资金直接到达本人账号,官方通道自动回调,免签通道个人移动端一键审核即时回调,不需提现,不需备案,完全免费,不干涉监听任何支付数据,个人收款0风险方案(前提正规业务小量金额)`
- 结论:个人收款较少的支付业务推荐使用
### 开发流程原理(以下为免签通道原理,官方通道7*24小时自动回调)
> 最新文档详见源码中的 `文档` 文件夹
- 用户确认订单,需填写邮箱地址(用于邮件通知)、手机号(用于短信通知)等信息
![QQ截图20171230234533.png](https://ooo.0o0.ooo/2018/07/21/5b52e0e68eb55.png)
- 配置你的个人收款码,二维码图片配置在 `src\main\resources\static\assets\qr` 文件夹中,已有 alipay(对应支付宝收款码)、wechat(微信)、qqpay(QQ钱包)文件夹存放相应收款码。可设置固定金额二维码(文件名为“收款金额.png”,例如“1.00.png”)或自定义金额二维码(文件名为“custom.png”),建议分辨率>=180px比例1:1,推荐[二维码美化工具](http://www.wwei.cn/),对应页面在 `src\main\resources\templates` 中 `alipay.html、wechat.html、qqpay.html`。当然聪明的你还可以在 `pay.html` 和这些中自定义业务逻辑,修改JS代码即可。
![QQ截图20171230234548.png](https://ooo.0o0.ooo/2018/07/21/5b52e1108ab66.png)
- `application.properties` 配置文件中修改你的管理员邮箱等
- 下载对应邮箱App,打开支付宝、微信收款语言通知等提醒,收到到款通知后,查看审核邮件,在邮件中根据备注号进行该交易任意人工审核确认操作完成回调,未到账的不用管,系统定时自动处理(默认01:00-08:00定时任务自动关闭系统)
![drag1min.png](https://ooo.0o0.ooo/2018/07/21/5b52e14f9fc08.png) ![drag2min.png](https://ooo.0o0.ooo/2018/07/21/5b52e14fa3e61.png)
### 疑问
- 如何确定收款来自哪笔交易订单?
- 根据收款码中备注标号与审核邮件中的标识号匹配,详见文档
- 半夜怎么办?
- 最新版系统已加定时任务默认01:00-08:00自动关闭系统(除官方接口7*24自动回调),审核邮件中也提供手动开关链接
- 为什么不做自动监听挂机App?
- 迟早被封的为什么要做?...XPay主要面向真正个人如学生群体,也目前成本最低最稳定的方案,免费!
- 不想受限制、不想用APP监听、还想免费?请用我这套,哈哈![QQ截图20180721215515.png](https://ooo.0o0.ooo/2018/07/21/5b533b90bd23b.png)
### 市面上一些自动监听回调方案
- ~~爬支付宝官网~~
- ~~监听微信网页版、PC版~~
- 安卓APP监听通知栏
- 高级安卓APP监听 使用xposed框架 可实现自动生成自定义备注任意金额收款码
### 前端所用技术
- [MUI](http://dev.dcloud.net.cn/mui/):原生前端框架
- [jQuery](http://jquery.com/)
- [BootStrap](http://www.bootcss.com/)
- [DataTables](http://www.datatables.club/):jQuery表格插件
### 后端所用技术
- SpringBoot
- [SpringMVC](https://github.com/Exrick/xmall/blob/master/study/SpringMVC.md)
- Spring Data Jpa
- MySQL
- Spring Data Redis
- [Druid](http://druid.io/)
- Thymeleaf:模版引擎
- [Swagger2](https://github.com/Exrick/xmall/blob/master/study/Swagger2.md)
- [Maven](https://github.com/Exrick/xmall/blob/master/study/Maven.md)
- 其它小实现:
- @Async 异步调用
- @Scheduled 定时任务
- JavaMailSender发送模版邮件
- 第三方插件
- [hotjar](https://github.com/Exrick/xmall/blob/master/study/hotjar.md):一体化分析和反馈
- 其它开发工具
- [JRebel](https://github.com/Exrick/xmall/blob/master/study/JRebel.md):开发热部署
- [阿里JAVA开发规约插件](https://github.com/alibaba/p3c)
### 本地开发运行部署
- 依赖:[Redis](https://github.com/Exrick/xmall/blob/master/study/Redis.md)(必须)
- 新建`xpay`数据库,已开启ddl,运行项目后自动建表(仅一张表)
- 在 `application.properties` 中修改你的配置,例如端口、数据库、Redis、邮箱配置等,其中有详细注释
- 运行 `XpayApplication.java`
- 访问默认端口8888:http://localhost:8888
### Linux后台运行示例
`nohup java -jar xpay-1.0-SNAPSHOT.jar -Xmx128m &`
### 作者其他项目推荐
- [XMall:基于SOA架构的分布式电商购物商城](https://github.com/Exrick/xmall)
![QQ截图20171022183906.jpg](https://ooo.0o0.ooo/2018/07/21/5b52e192366a0.jpg)
- [X-Boot前后端分离开发平台](https://github.com/Exrick/x-boot)
![](https://ooo.0o0.ooo/2020/03/13/rQGAWv1h8VMeIdi.png)
- [XMall微信小程序APP前端 现已开源!](https://github.com/Exrick/xmall-weapp)
[![WX20190924-234416@2x.png](https://s2.ax1x.com/2019/10/06/ucEsBD.md.png)](https://www.bilibili.com/video/av70226175)
### 技术疑问交流
- QQ交流群 `475743731(付费)`,可获取各项目详细图文文档、疑问解答 [![](http://pub.idqqimg.com/wpa/images/group.png)](http://shang.qq.com/wpa/qunwpa?idkey=7b60cec12ba93ebed7568b0a63f22e6e034c0d1df33125ac43ed753342ec6ce7)
- 免费交流群 `562962309` [![](http://pub.idqqimg.com/wpa/images/group.png)](http://shang.qq.com/wpa/qunwpa?idkey=52f6003e230b26addeed0ba6cf343fcf3ba5d97829d17f5b8fa5b151dba7e842)
- 作者博客:[http://blog.exrick.cn](http://blog.exrick.cn)
### [捐赠](http://xpay.exrick.cn)
| 0 |
alldatacenter/alldata | 🔥🔥 AllData大数据产品是可定义数据中台,以数据平台为底座,以数据中台为桥梁,以机器学习平台为中层框架,以大模型应用为上游产品,提供全链路数字化解决方案。全新会员商业版 X 微信群:https://docs.qq.com/doc/DVHlkSEtvVXVCdEFo | 2019-10-07T07:36:18Z | null | # 可定义数据中台
## [官方文档](https://alldata.readthedocs.io/) | [安装文档](https://github.com/alldatacenter/alldata/blob/master/install.md)
## 一、会员商业版
> 会员商业版线上环境地址:线上环境只对会员通道开放
>
> 成为会员:享受会员权益,详情查看Github主页文档
>
> 地址:http://122.51.43.143:5173/ui_moat
>
> 账号:test/123456
## 二、 官方网站
> 官方文档:https://alldata.readthedocs.io
>
> 部署教程:https://github.com/alldatacenter/alldata/blob/master/install.md
>
> 教程文档:https://github.com/alldatacenter/alldata/blob/master/quickstart_dts.md
>
> 教程文档2: https://github.com/alldatacenter/alldata/blob/master/quickstart_bi.md
## 三、全新版本会员商业版通道
> 全新会员商业版AllData价格
>
> https://docs.qq.com/doc/DVHlkSEtvVXVCdEFo
## 四、AllData GitHub网站
<br/>
<a href="https://github.com/alldatacenter/github-readme-stats">
<img width="1215" align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=alldatacenter&repo=alldata" />
</a>
[![Stargazers over time](https://starchart.cc/alldatacenter/alldata.svg)](https://starchart.cc/alldatacenter/alldata)
## 五、可定义数据中台
<br/>
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/235920344-fbf3c9d2-6239-4c73-aa9c-77a72773780e.png">
<br/>
## 六、会员商业版
![image](https://github.com/alldatacenter/alldata/assets/20246692/164c27bb-f543-4e2f-a74e-5f3d914e543c)
### 6.1 AllData会员商业版通道
> 1.1 微信社区交流群
>
![image](https://github.com/alldatacenter/alldata/assets/20246692/610da0a1-ee19-4173-b6ab-7f96aaf808f1)
> 1.2 加入AllData开发组
>
> 加入条件:领取issue后作者邀请加入
>
> 此群为2024年度规划研发群,加内部群请先领取相关issue,加群请备注:开发组
> 1.3 加入AllData社区交流群
>
> 加入条件:无条件加入【交流群加入备注:开源共建】
>
> 此群为alldata社区群,讨论alldata产品与技术,加群请备注:开源共建
> 1.4 微信搜索-视频号
>
![image](https://github.com/alldatacenter/alldata/assets/20246692/c809b131-4b5f-4e60-ab26-81930665fc3b)
> 1.5 微信搜索-公众号
>
![image](https://github.com/alldatacenter/alldata/assets/20246692/7d4312a3-1904-404d-a0ed-f36b14e7c02d)
### 6.2 AllData会员商业版通道
> 全新会员商业版价格权益
>
> 访问新版会员价格可以私聊商业版小助手获取商业版海报信息
![image](https://github.com/alldatacenter/alldata/assets/20246692/c4917c3f-1578-4cb2-9a41-1800e48266e5)
## 七、全新商业版功能权益对比
![image](https://github.com/alldatacenter/alldata/assets/20246692/11b5cbd7-c7ea-4eb0-9e69-7a2035922bf0)
## 八、商业授权
![image](https://github.com/alldatacenter/alldata/assets/20246692/318a0115-b853-407d-ba49-412b14fe6f17)
## 九、AllData会员商业版体验环境
### 9.1 首页
![image](https://github.com/alldatacenter/alldata/assets/20246692/a8eb22f9-18a4-4b27-af37-cfea2c379a25)
![image](https://github.com/alldatacenter/alldata/assets/20246692/ce6d5810-4747-40c6-a7bb-6e28b4e6a766)
### 9.2 数据集成
![image](https://github.com/alldatacenter/alldata/assets/20246692/dbdd0492-d69b-44a5-a591-eb70391c277e)
![image](https://github.com/alldatacenter/alldata/assets/20246692/764cd648-f972-4ee4-a8b8-b8aa9d4ae229)
![image](https://github.com/alldatacenter/alldata/assets/20246692/b055a0d4-8898-409f-93e2-f3c3464a841c)
![image](https://github.com/alldatacenter/alldata/assets/20246692/13572282-fd54-4c34-a514-046929474df1)
![image](https://github.com/alldatacenter/alldata/assets/20246692/c2aceb14-9c7d-423a-84af-f436572fddea)
### 9.3 数据质量
![image](https://github.com/alldatacenter/alldata/assets/20246692/7357655b-b9e2-4ed2-9182-08375bc580f1)
![image](https://github.com/alldatacenter/alldata/assets/20246692/79a50d83-cacb-49df-9b54-5deb5cd6b2bb)
![image](https://github.com/alldatacenter/alldata/assets/20246692/47f736b1-2281-448f-b703-7fed005f1326)
![image](https://github.com/alldatacenter/alldata/assets/20246692/5e55ba7c-df80-4c0c-ab54-e83d46047cd3)
![image](https://github.com/alldatacenter/alldata/assets/20246692/5280690b-f6a1-4aba-98b9-788270d65fba)
### 9.4 数据标准
![image](https://github.com/alldatacenter/alldata/assets/20246692/a873db93-65a8-460e-90c5-2477947dbe24)
![image](https://github.com/alldatacenter/alldata/assets/20246692/650d7396-add7-4109-b5c2-313c734fd288)
![image](https://github.com/alldatacenter/alldata/assets/20246692/00a3f1a5-ff82-44c0-93dd-0b577dbc6e17)
![image](https://github.com/alldatacenter/alldata/assets/20246692/c4be837b-58f6-4023-8c52-cb6d53af3f01)
### 9.5 元数据管理
![image](https://github.com/alldatacenter/alldata/assets/20246692/675b9176-bf52-4a6e-b702-00edf00bcfe8)
![image](https://github.com/alldatacenter/alldata/assets/20246692/3b52d70b-0f71-44c1-8c22-5f1fc3b0c840)
![image](https://github.com/alldatacenter/alldata/assets/20246692/035850d8-da60-476a-9b98-358a349ade0d)
![image](https://github.com/alldatacenter/alldata/assets/20246692/3085d7dd-e460-44bb-874d-973329181471)
![image](https://github.com/alldatacenter/alldata/assets/20246692/2dce596e-608e-45ad-b127-f114d6fec851)
![image](https://github.com/alldatacenter/alldata/assets/20246692/44e92bdf-5bf3-46f9-8f09-5c3c3a6cc9ad)
![image](https://github.com/alldatacenter/alldata/assets/20246692/f1ba0021-be40-4d9f-a944-aab31480960e)
![image](https://github.com/alldatacenter/alldata/assets/20246692/66d7c35b-23be-4d7d-a035-34f07ae1d22b)
### 9.6 数据资产
![image](https://github.com/alldatacenter/alldata/assets/20246692/4dc0ecfa-ee96-4f16-995d-e8abc1eb10eb)
![image](https://github.com/alldatacenter/alldata/assets/20246692/ecb1e53e-15aa-4e98-874f-c874bf5e440d)
### 9.7 数据市场
![image](https://github.com/alldatacenter/alldata/assets/20246692/40f2ac0f-7032-4a9d-9cba-25d3d43dfe5f)
![image](https://github.com/alldatacenter/alldata/assets/20246692/9a991f83-1091-48ad-96fc-d499b175e2f5)
![image](https://github.com/alldatacenter/alldata/assets/20246692/1053c1b1-5aba-46e8-9f3f-610b17ba23e3)
![image](https://github.com/alldatacenter/alldata/assets/20246692/579418e4-b0f9-42b7-bc0e-5055ca096792)
![image](https://github.com/alldatacenter/alldata/assets/20246692/ea11e1ce-7628-43eb-bce9-0105ac46f079)
### 9.8 数据平台
![image](https://github.com/alldatacenter/alldata/assets/20246692/5dd2d0b9-a9a8-4b81-b190-f98e59ed5b9c)
![image](https://github.com/alldatacenter/alldata/assets/20246692/7d536d71-1b0a-4173-85c2-5dd85ac38189)
![image](https://github.com/alldatacenter/alldata/assets/20246692/1b906038-737c-4a47-a886-ba63c78eeefb)
![image](https://github.com/alldatacenter/alldata/assets/20246692/9339a8c4-5632-4368-ac8d-404cc9165ef6)
![image](https://github.com/alldatacenter/alldata/assets/20246692/f2ebd1a8-4930-4c01-9716-46196629b2c6)
![image](https://github.com/alldatacenter/alldata/assets/20246692/01431538-2205-4eec-944f-9f194c20a291)
![image](https://github.com/alldatacenter/alldata/assets/20246692/5c3e9f6f-e75a-4af8-bc5b-54938c4d493d)
![image](https://github.com/alldatacenter/alldata/assets/20246692/9445b330-9270-44f2-af8e-bc08fe3ccae6)
![image](https://github.com/alldatacenter/alldata/assets/20246692/f1ceca6b-98f8-4064-9f6f-65f0b4e7f1c8)
![image](https://github.com/alldatacenter/alldata/assets/20246692/07051569-4183-4cf6-9128-623e712c15f0)
![image](https://github.com/alldatacenter/alldata/assets/20246692/c07399b9-f0a8-4b2d-ac9a-1b39db5784e5)
### 9.9 数据比对
![image](https://github.com/alldatacenter/alldata/assets/20246692/20fc7da2-a362-4514-9267-13d6b0c1ff8e)
![image](https://github.com/alldatacenter/alldata/assets/20246692/b5e6c263-c470-422c-bb35-2ca61c105078)
![image](https://github.com/alldatacenter/alldata/assets/20246692/d8c37e43-0015-473d-aa20-be23440ed7dc)
![image](https://github.com/alldatacenter/alldata/assets/20246692/1c163d4e-929f-43fc-9fd3-8dd03a89280b)
![image](https://github.com/alldatacenter/alldata/assets/20246692/370873e2-8db9-457d-b33c-32b0c287f303)
![image](https://github.com/alldatacenter/alldata/assets/20246692/d1d5307c-3963-49d9-b125-d999bb32a05a)
![image](https://github.com/alldatacenter/alldata/assets/20246692/c5c71ad3-e205-4920-8b03-6ac3d58a0540)
![image](https://github.com/alldatacenter/alldata/assets/20246692/1ed9226e-ecab-4e4e-b00f-4ca73228c1ec)
![image](https://github.com/alldatacenter/alldata/assets/20246692/b278918e-35a6-4d0d-8ee9-153620af0ef3)
### 9.10 BI报表
![image](https://github.com/alldatacenter/alldata/assets/20246692/6aa5e2d0-6343-4943-9963-5c8e08557e4f)
![image](https://github.com/alldatacenter/alldata/assets/20246692/e5299ec0-3428-4097-969d-caa712e672d3)
![image](https://github.com/alldatacenter/alldata/assets/20246692/0c9f3e05-ca04-47b1-a84e-e4e6643c3e6d)
![image](https://github.com/alldatacenter/alldata/assets/20246692/db822c06-3553-4e6f-aeaf-61a50e81f17a)
![image](https://github.com/alldatacenter/alldata/assets/20246692/c72f2d0a-c3d9-4a48-a9fa-dc745a8d1a53)
### 9.11 流程编排
![image](https://github.com/alldatacenter/alldata/assets/20246692/ed7a0afb-d156-4a7e-9a47-824fa503f451)
![image](https://github.com/alldatacenter/alldata/assets/20246692/993bcc3a-3d71-4b57-bc4e-690a9b21ea98)
### 9.12 系统监控
![image](https://github.com/alldatacenter/alldata/assets/20246692/725711c1-d603-4fe5-93b0-debf50b6ce74)
![image](https://github.com/alldatacenter/alldata/assets/20246692/12b47e3e-2227-42e9-96fb-a88d13b54594)
![image](https://github.com/alldatacenter/alldata/assets/20246692/6b58bffc-0133-4973-99ae-37642347ba50)
![image](https://github.com/alldatacenter/alldata/assets/20246692/0a1b1c3f-cf12-4213-8b72-deeb5c8205f8)
### 9.13 运维管理
![image](https://github.com/alldatacenter/alldata/assets/20246692/4e990fda-dbc5-41b4-a038-0b5f6c0e4539)
![image](https://github.com/alldatacenter/alldata/assets/20246692/7a94f0ec-5608-4841-9ebc-3ba5c8214544)
![image](https://github.com/alldatacenter/alldata/assets/20246692/575a7f99-dc82-48a8-bf4f-dbc2a115a0b2)
![image](https://github.com/alldatacenter/alldata/assets/20246692/0f01f27d-bd9e-4449-81e3-3f5d306a643e)
![image](https://github.com/alldatacenter/alldata/assets/20246692/cc84bd6b-c609-4d3b-82f1-33b524ab33b1)
### 9.14 离线平台
![image](https://github.com/alldatacenter/alldata/assets/20246692/d3311959-4dd2-4f40-877d-ef5faba3683f)
![image](https://github.com/alldatacenter/alldata/assets/20246692/189a597a-f0ae-4226-a25c-cac022f8c3ef)
![image](https://github.com/alldatacenter/alldata/assets/20246692/fb9f400a-27da-4990-823f-d3659053a1cf)
![image](https://github.com/alldatacenter/alldata/assets/20246692/f8dc260c-3148-4f28-b5df-b9bf2cd92ac2)
![image](https://github.com/alldatacenter/alldata/assets/20246692/1be1c455-06c1-431f-8181-beb0d36c9ee8)
![image](https://github.com/alldatacenter/alldata/assets/20246692/faca9fb2-a3ed-4289-8dd3-ead2d0672b67)
![image](https://github.com/alldatacenter/alldata/assets/20246692/9443bf16-6e93-4d9e-89c0-8a494043160b)
![image](https://github.com/alldatacenter/alldata/assets/20246692/2429d5c3-8ba3-4039-bc3f-73b0195078e3)
![image](https://github.com/alldatacenter/alldata/assets/20246692/fdfb60ca-1999-42ef-b27f-b97cd28e1f9f)
![image](https://github.com/alldatacenter/alldata/assets/20246692/e7717be6-97c1-404c-9081-e3ef64ff77b6)
### 9.15 实时开发
![image](https://github.com/alldatacenter/alldata/assets/20246692/f5399d43-1153-4879-8eef-e6b2f25991b5)
![image](https://github.com/alldatacenter/alldata/assets/20246692/85f6a225-87c3-42a7-a856-695e527d96f5)
![image](https://github.com/alldatacenter/alldata/assets/20246692/b83fab8c-3758-45af-ab77-e251aa5febf6)
![image](https://github.com/alldatacenter/alldata/assets/20246692/baeff953-72e0-4839-b6c9-e61b2d81427c)
![image](https://github.com/alldatacenter/alldata/assets/20246692/bba38e10-e546-491a-b5bd-b2f0c5d22494)
![image](https://github.com/alldatacenter/alldata/assets/20246692/59a3193e-9ac4-42a4-97d8-a3c1e9b8e704)
### 9.16 实时开发IDE
![image](https://github.com/alldatacenter/alldata/assets/20246692/9c3f5b06-413d-47cb-9d8f-831b893b1a18)
![image](https://github.com/alldatacenter/alldata/assets/20246692/64320cf6-049f-4d56-b1e5-4c4f85c5c845)
![image](https://github.com/alldatacenter/alldata/assets/20246692/415d56d1-b651-47d1-98cc-bc3c403c3c4b)
![image](https://github.com/alldatacenter/alldata/assets/20246692/094a4047-50bc-49de-b051-0f71d6408171)
![image](https://github.com/alldatacenter/alldata/assets/20246692/d8d4d8db-3112-4e35-a507-e7139b77ee9c)
### 9.17 数据平台(K8S)
![image](https://github.com/alldatacenter/alldata/assets/20246692/b5c75229-f074-4d4b-ab1c-a5e16091efc6)
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/eddd3086-b4e8-480d-8fff-ccdeedf8f12d">
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/41b1fb5f-de34-4488-812f-8b217baaf54b">
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/706345d8-a7d7-459f-b125-912bdc4cec03">
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/ab048563-22a0-43d8-91d1-f6cf8f45781c">
<img width="1215" alt="image" src="https://github.com/alldatacenter/alldata/assets/20246692/91065efb-c6c2-4267-8886-59761d2dc555">
### 9.18 新版BI平台(Datart)
![image](https://github.com/alldatacenter/alldata/assets/20246692/2677806b-aa2a-4114-927a-b7e7a1309817)
![image](https://github.com/alldatacenter/alldata/assets/20246692/fa8efcaf-dded-4711-8d33-af6123a378b0)
![image](https://github.com/alldatacenter/alldata/assets/20246692/60c1b3ee-59eb-4493-9a26-259f9e5516d7)
### 9.19 新版数据质量平台(DataVines)
> 新版数据质量平台功能请查看文档
![image](https://github.com/alldatacenter/alldata/assets/20246692/2f8c1d3f-063e-4494-809b-0b4d31bb1e5e)
![image](https://github.com/alldatacenter/alldata/assets/20246692/43d725ae-c28a-4cdb-ae2d-cf7eb4ace7ee)
![image](https://github.com/alldatacenter/alldata/assets/20246692/a2d6bfb0-4f65-4500-b91a-34e7c69bea0e)
![image](https://github.com/alldatacenter/alldata/assets/20246692/da5f4728-9197-4c6c-a327-7cf19bb4ca65)
![image](https://github.com/alldatacenter/alldata/assets/20246692/14ea6665-2d64-4ebc-a27e-2150f7387fd3)
![image](https://github.com/alldatacenter/alldata/assets/20246692/3f798f27-12e1-48ac-bedc-68fbddcca4ed)
![image](https://github.com/alldatacenter/alldata/assets/20246692/f2dbc5ae-305f-4467-a603-33142cae35db)
## 十、AllData社区商业计划图
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188898972-d78bcbb6-eb30-420d-b5e1-7168aa340555.png">
<br/>
## 十一、AllData社区项目业务流程图
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188899006-aba25703-f8fa-42b6-b59f-2573ee2b27fc.png">
<br/>
## 十二、AllData社区项目树状图
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188898939-bfba6cbc-c7b0-40c4-becd-27152d5daa90.png">
<br/>
## 十三、全站式AllData产品路线图
<br/>
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/179927878-ff9c487e-0d30-49d5-bc88-6482646d90a8.png">
<br/>
## 十四、 AllData社区开发规划
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/188899033-948583a4-841b-4233-ad61-bbc45c936ca1.png">
<br/>
## 十五、Architecture
<br/>
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/171598215-0914f665-9950-476c-97ff-e7e07aa10eaf.png">
<br/>
<img width="1215" alt="image" src="https://user-images.githubusercontent.com/20246692/171598333-d14ff53f-3af3-481c-9f60-4f891a535b5c.png">
<br/>
| 0 |
javastacks/spring-boot-best-practice | Spring Boot 最佳实践,包括自动配置、核心原理、源码分析、国际化支持、调试、日志集成、热部署等。 | 2018-11-09T06:23:18Z | null | # spring-boot-best-practice
> :rocket: 本仓库提供了 Spring Boot 主流知识点实战示例,大家可以随意下载学习。
>
> :star: 本项目会长期更新,为避免迷路,请点击右上角 **Star** 关注本项目。
## :fire: 为什么要学 Spring Boot?
Spring 作为 Java 开发界的万能框架,曾经和 Struts2、Hibernate 框架组成 SSH,成为 Java Web 开发的三驾马车。大概在 2013 年左右,又和 Spring MVC、MyBatis 框架组成 SSM,成为新一代的 Web 开发框架全家桶,一直流行延续至今。
**而为了简化 Spring 框架的上手难度**,Spring Boot 框架于 2014 年诞生,可以帮助开发者更加轻松、快捷地使用 Spring 的组件,它是 Spring、Spring MVC 等框架更上一层的框架,它需要依赖于 Spring、Spring MVC 等原生框架,而不能独立存在。
学会 Spring Boot,可以简化使用 Spring 基础组件的难度,还是学习 Spring Cloud 微服务框架的基础,**因为 Spring Cloud 的基础就是 Spring Boot。**
Spring Boot 代表了企业的真实需求,它表现在 Java 工程师、架构师的**求职面试技能清单上,Spring Boot 几乎是必备技能。** 所以,要成为合格的 Java 程序员,要学习 Spring 全家桶,Spring Boot 则是必经之路。
## :heart: Spring Boot 学习资料
这里分享一份 **Spring Boot 学习资料**,包括 Spring Boot 底层实现原理及代码实战,非常齐全,助你快速打通 Spring Boot 的各个环节。
**详细目录如下:**
- Spring Boot Hello World
- Spring Boot 返回 JSON 数据
- Spring Boot 使用其他 JSON 转换框架
- Spring Boot 全局异常捕捉
- Spring Boot JPA 连接数据库
- Spring Boot 配置 JPA
- Spring Boot 整合 JPA 保存数据
- Spring Boot 使用 JdbcTemplate 保存数据
- Spring Boot 常用配置
- Spring Boot 静态资源处理
- Spring boot 实现任务调度
- Spring Boot 普通类调用 Bean
- Spring Boot 使用模板引擎
- Spring Boot 集成 JSP
- Spring Boot 集成 Servlet
- Spring Boot 集成 Fliter 和 Listener
- Spring Boot 拦截器 HandlerInterceptor
- Spring Boot 系统启动任务 CommandLineRunner
- Spring Boot 集成 JUnit 单元测试
- Spring Boot 读取系统环境变量
- Spring Boot 使用自定义 properties
- Spring Boot 改变默认包扫描
- Spring Boot 自定义启动 Banner
- Spring Boot 导入 Spring XML 配置文件
- Spring Boot 热部署
- Spring Boot 监控和管理生产环境
- Spring Boot Starter 详解
- Spring Boot 依赖的版本
- Spring Boot 文件上传
- Spring Boot 集成 Redis 缓存
- Spring Boot 之 Spring Cache
- Spring Boot 集成 Ehcache
- Spring Boot 分布式 Session 共享
- ......
**共 108 页!非常齐全!**
**获取方式如下:**
这份教程免费分享给大家,微信扫码关注 **Java技术栈** 公众号:
<p align="center">
<img src="http://img.javastack.cn/18-11-16/79719805.jpg">
</p>
关注后,在公众号后台发送关键字:**666**,公众号会自助推送给你。
| 0 |
apache/doris | Apache Doris is an easy-to-use, high performance and unified analytics database. | 2017-08-10T12:13:30Z | null | <!--
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.
-->
<div align="center">
<img src="https://doris.apache.org/assets/images/home-banner-7f193353c932af31634eca0a028f03ed.png" align="right" height="240"/>
</div>
# Apache Doris
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![GitHub release](https://img.shields.io/github/release/apache/doris.svg)](https://github.com/apache/doris/releases)
[![Jenkins Vec](https://img.shields.io/jenkins/tests?compact_message&jobUrl=https://ci-builds.apache.org/job/Doris/job/doris_daily_enable_vectorized&label=VectorizedEngine)](https://ci-builds.apache.org/job/Doris/job/doris_daily_enable_vectorized)
[![Total Lines](https://tokei.rs/b1/github/apache/doris?category=lines)](https://github.com/apache/doris)
[![Join the Doris Community at Slack](https://img.shields.io/badge/chat-slack-brightgreen)](https://join.slack.com/t/apachedoriscommunity/shared_invite/zt-28il1o2wk-DD6LsLOz3v4aD92Mu0S0aQ)
[![Join the chat at https://gitter.im/apache-doris/Lobby](https://badges.gitter.im/apache-doris/Lobby.svg)](https://gitter.im/apache-doris/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![EN doc](https://img.shields.io/badge/Docs-English-blue.svg)](https://doris.apache.org/docs/get-starting/quick-start)
[![CN doc](https://img.shields.io/badge/文档-中文版-blue.svg)]([https://doris.apache.org/zh-CN/docs/dev/get-starting/what-is-apache-doris](https://doris.apache.org/zh-CN/docs/get-starting/what-is-apache-doris))
Apache Doris is an easy-to-use, high-performance and real-time analytical database based on MPP architecture, known for its extreme speed and ease of use. It only requires a sub-second response time to return query results under massive data and can support not only high-concurrent point query scenarios but also high-throughput complex analysis scenarios.
All this makes Apache Doris an ideal tool for scenarios including report analysis, ad-hoc query, unified data warehouse, and data lake query acceleration. On Apache Doris, users can build various applications, such as user behavior analysis, AB test platform, log retrieval analysis, user portrait analysis, and order analysis.
🎉 Version 2.1.1 released now. Check out the 🔗[Release Notes](https://doris.apache.org/docs/releasenotes/release-2.1.1) here. The 2.1 verison delivers exceptional performance with 100% higher out-of-the-box queries proven by TPC-DS 1TB tests, enhanced data lake analytics that are 4-6 times speedier than Trino and Spark, solid support for semi-structured data analysis with new Variant types and suite of analytical functions, asynchronous materialized views for query acceleration, optimized real-time writing at scale, and better workload management with stability and runtime SQL resource tracking.
🎉 Version 2.0.8 is now released ! This fully evolved and stable release is ready for all users to upgrade. Check out the 🔗[Release Notes](https://doris.apache.org/docs/releasenotes/release-2.0.8) here.
👀 Have a look at the 🔗[Official Website](https://doris.apache.org/) for a comprehensive list of Apache Doris's core features, blogs and user cases.
## 📈 Usage Scenarios
As shown in the figure below, after various data integration and processing, the data sources are usually stored in the real-time data warehouse Apache Doris and the offline data lake or data warehouse (in Apache Hive, Apache Iceberg or Apache Hudi).
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sekvbs5ih5rb16wz6n9k.png">
Apache Doris is widely used in the following scenarios:
- Reporting Analysis
- Real-time dashboards
- Reports for in-house analysts and managers
- Highly concurrent user-oriented or customer-oriented report analysis: such as website analysis and ad reporting that usually require thousands of QPS and quick response times measured in milliseconds. A successful user case is that Doris has been used by the Chinese e-commerce giant JD.com in ad reporting, where it receives 10 billion rows of data per day, handles over 10,000 QPS, and delivers a 99 percentile query latency of 150 ms.
- Ad-Hoc Query. Analyst-oriented self-service analytics with irregular query patterns and high throughput requirements. XiaoMi has built a growth analytics platform (Growth Analytics, GA) based on Doris, using user behavior data for business growth analysis, with an average query latency of 10 seconds and a 95th percentile query latency of 30 seconds or less, and tens of thousands of SQL queries per day.
- Unified Data Warehouse Construction. Apache Doris allows users to build a unified data warehouse via one single platform and save the trouble of handling complicated software stacks. Chinese hot pot chain Haidilao has built a unified data warehouse with Doris to replace its old complex architecture consisting of Apache Spark, Apache Hive, Apache Kudu, Apache HBase, and Apache Phoenix.
- Data Lake Query. Apache Doris avoids data copying by federating the data in Apache Hive, Apache Iceberg, and Apache Hudi using external tables, and thus achieves outstanding query performance.
## 🖥️ Core Concepts
### 📂 Architecture of Apache Doris
The overall architecture of Apache Doris is shown in the following figure. The Doris architecture is very simple, with only two types of processes.
- Frontend (FE): user request access, query parsing and planning, metadata management, node management, etc.
- Backend (BE): data storage and query plan execution
Both types of processes are horizontally scalable, and a single cluster can support up to hundreds of machines and tens of petabytes of storage capacity. And these two types of processes guarantee high availability of services and high reliability of data through consistency protocols. This highly integrated architecture design greatly reduces the operation and maintenance cost of a distributed system.
![The overall architecture of Apache Doris](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mnz20ae3s23vv3e9ltmi.png)
In terms of interfaces, Apache Doris adopts MySQL protocol, supports standard SQL, and is highly compatible with MySQL dialect. Users can access Doris through various client tools and it supports seamless connection with BI tools.
### 💾 Storage Engine
Doris uses a columnar storage engine, which encodes, compresses, and reads data by column. This enables a very high compression ratio and largely reduces irrelavant data scans, thus making more efficient use of IO and CPU resources. Doris supports various index structures to minimize data scans:
- Sorted Compound Key Index: Users can specify three columns at most to form a compound sort key. This can effectively prune data to better support highly concurrent reporting scenarios.
- MIN/MAX Indexing: This enables effective filtering of equivalence and range queries for numeric types.
- Bloom Filter: very effective in equivalence filtering and pruning of high cardinality columns
- Invert Index: This enables fast search for any field.
### 💿 Storage Models
Doris supports a variety of storage models and has optimized them for different scenarios:
- Aggregate Key Model: able to merge the value columns with the same keys and significantly improve performance
- Unique Key Model: Keys are unique in this model and data with the same key will be overwritten to achieve row-level data updates.
- Duplicate Key Model: This is a detailed data model capable of detailed storage of fact tables.
Doris also supports strongly consistent materialized views. Materialized views are automatically selected and updated, which greatly reduces maintenance costs for users.
### 🔍 Query Engine
Doris adopts the MPP model in its query engine to realize parallel execution between and within nodes. It also supports distributed shuffle join for multiple large tables so as to handle complex queries.
![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjlmumwyx728uymsgcw0.png)
The Doris query engine is vectorized, with all memory structures laid out in a columnar format. This can largely reduce virtual function calls, improve cache hit rates, and make efficient use of SIMD instructions. Doris delivers a 5–10 times higher performance in wide table aggregation scenarios than non-vectorized engines.
![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ck2m3kbnodn28t28vphp.png)
Apache Doris uses Adaptive Query Execution technology to dynamically adjust the execution plan based on runtime statistics. For example, it can generate runtime filter, push it to the probe side, and automatically penetrate it to the Scan node at the bottom, which drastically reduces the amount of data in the probe and increases join performance. The runtime filter in Doris supports In/Min/Max/Bloom filter.
### 🚅 Query Optimizer
In terms of optimizers, Doris uses a combination of CBO and RBO. RBO supports constant folding, subquery rewriting, predicate pushdown and CBO supports Join Reorder. The Doris CBO is under continuous optimization for more accurate statistical information collection and derivation, and more accurate cost model prediction.
**Technical Overview**: 🔗[Introduction to Apache Doris](https://doris.apache.org/docs/dev/summary/basic-summary)
## 🎆 Why choose Apache Doris?
- 🎯 **Easy to Use:** Two processes, no other dependencies; online cluster scaling, automatic replica recovery; compatible with MySQL protocol, and using standard SQL.
- 🚀 **High Performance:** Extremely fast performance for low-latency and high-throughput queries with columnar storage engine, modern MPP architecture, vectorized query engine, pre-aggregated materialized view and data index.
- 🖥️ **Single Unified:** A single system can support real-time data serving, interactive data analysis and offline data processing scenarios.
- ⚛️ **Federated Querying:** Supports federated querying of data lakes such as Hive, Iceberg, Hudi, and databases such as MySQL and Elasticsearch.
- ⏩ **Various Data Import Methods:** Supports batch import from HDFS/S3 and stream import from MySQL Binlog/Kafka; supports micro-batch writing through HTTP interface and real-time writing using Insert in JDBC.
- 🚙 **Rich Ecology:** Spark uses Spark-Doris-Connector to read and write Doris; Flink-Doris-Connector enables Flink CDC to implement exactly-once data writing to Doris; DBT Doris Adapter is provided to transform data in Doris with DBT.
## 🙌 Contributors
**Apache Doris has graduated from Apache incubator successfully and become a Top-Level Project in June 2022**.
Currently, the Apache Doris community has gathered more than 400 contributors from nearly 200 companies in different industries, and the number of active contributors is close to 100 per month.
[![Monthly Active Contributors](https://contributor-overtime-api.apiseven.com/contributors-svg?chart=contributorMonthlyActivity&repo=apache/doris)](https://www.apiseven.com/en/contributor-graph?chart=contributorMonthlyActivity&repo=apache/doris)
[![Contributor over time](https://contributor-overtime-api.apiseven.com/contributors-svg?chart=contributorOverTime&repo=apache/doris)](https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=apache/doris)
We deeply appreciate 🔗[community contributors](https://github.com/apache/doris/graphs/contributors) for their contribution to Apache Doris.
## 👨👩👧👦 Users
Apache Doris now has a wide user base in China and around the world, and as of today, **Apache Doris is used in production environments in thousands of companies worldwide.** More than 80% of the top 50 Internet companies in China in terms of market capitalization or valuation have been using Apache Doris for a long time, including Baidu, Meituan, Xiaomi, Jingdong, Bytedance, Tencent, NetEase, Kwai, Sina, 360, Mihoyo, and Ke Holdings. It is also widely used in some traditional industries such as finance, energy, manufacturing, and telecommunications.
The users of Apache Doris: 🔗[Users](https://doris.apache.org/users)
Add your company logo at Apache Doris Website: 🔗[Add Your Company](https://github.com/apache/doris/discussions/27683)
## 👣 Get Started
### 📚 Docs
All Documentation 🔗[Docs](https://doris.apache.org/docs/get-starting/quick-start)
### ⬇️ Download
All release and binary version 🔗[Download](https://doris.apache.org/download)
### 🗄️ Compile
See how to compile 🔗[Compilation](https://doris.apache.org/docs/dev/install/source-install/compilation-general)
### 📮 Install
See how to install and deploy 🔗[Installation and deployment](https://doris.apache.org/docs/dev/install/standard-deployment)
## 🧩 Components
### 📝 Doris Connector
Doris provides support for Spark/Flink to read data stored in Doris through Connector, and also supports to write data to Doris through Connector.
🔗[apache/doris-flink-connector](https://github.com/apache/doris-flink-connector)
🔗[apache/doris-spark-connector](https://github.com/apache/doris-spark-connector)
## 🌈 Community and Support
### 📤 Subscribe Mailing Lists
Mail List is the most recognized form of communication in Apache community. See how to 🔗[Subscribe Mailing Lists](https://doris.apache.org/community/subscribe-mail-list)
### 🙋 Report Issues or Submit Pull Request
If you meet any questions, feel free to file a 🔗[GitHub Issue](https://github.com/apache/doris/issues) or post it in 🔗[GitHub Discussion](https://github.com/apache/doris/discussions) and fix it by submitting a 🔗[Pull Request](https://github.com/apache/doris/pulls)
### 🍻 How to Contribute
We welcome your suggestions, comments (including criticisms), comments and contributions. See 🔗[How to Contribute](https://doris.apache.org/community/how-to-contribute/) and 🔗[Code Submission Guide](https://doris.apache.org/community/how-to-contribute/pull-request/)
### ⌨️ Doris Improvement Proposals (DSIP)
🔗[Doris Improvement Proposal (DSIP)](https://cwiki.apache.org/confluence/display/DORIS/Doris+Improvement+Proposals) can be thought of as **A Collection of Design Documents for all Major Feature Updates or Improvements**.
### 🔑 Backend C++ Coding Specification
🔗 [Backend C++ Coding Specification](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=240883637) should be strictly followed, which will help us achieve better code quality.
## 💬 Contact Us
Contact us through the following mailing list.
| Name | Scope | | | |
|:------------------------------------------------------------------------------|:--------------------------------|:----------------------------------------------------------------|:--------------------------------------------------------------------|:-----------------------------------------------------------------------------|
| [dev@doris.apache.org](mailto:dev@doris.apache.org) | Development-related discussions | [Subscribe](mailto:dev-subscribe@doris.apache.org) | [Unsubscribe](mailto:dev-unsubscribe@doris.apache.org) | [Archives](http://mail-archives.apache.org/mod_mbox/doris-dev/) |
## 🧰 Links
* Apache Doris Official Website - [Site](https://doris.apache.org)
* Developer Mailing list - <dev@doris.apache.org>. Mail to <dev-subscribe@doris.apache.org>, follow the reply to subscribe the mail list.
* Slack channel - [Join the Slack](https://join.slack.com/t/apachedoriscommunity/shared_invite/zt-28il1o2wk-DD6LsLOz3v4aD92Mu0S0aQ)
* Twitter - [Follow @doris_apache](https://twitter.com/doris_apache)
## 📜 License
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
> **Note**
> Some licenses of the third-party dependencies are not compatible with Apache 2.0 License. So you need to disable
some Doris features to be complied with Apache 2.0 License. For details, refer to the `thirdparty/LICENSE.txt`
| 0 |
vladmihalcea/high-performance-java-persistence | The High-Performance Java Persistence book and video course code examples | 2015-10-15T04:57:57Z | null | # High-Performance Java Persistence
The [High-Performance Java Persistence](https://vladmihalcea.com/books/high-performance-java-persistence?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp) book and video course code examples. I wrote [this article](https://vladmihalcea.com/high-performance-java-persistence-github-repository/) about this repository since it's one of the best way to test JDBC, JPA, Hibernate or even jOOQ code. Or, if you prefer videos, you can watch [this presentation on YouTube](https://www.youtube.com/watch?v=U8MoOe8uMYA).
### Are you struggling with application performance issues?
<a href="https://vladmihalcea.com/hypersistence-optimizer/?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp">
<img src="https://vladmihalcea.com/wp-content/uploads/2019/03/Hypersistence-Optimizer-300x250.jpg" alt="Hypersistence Optimizer">
</a>
Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. No more performance issues, no more having to spend countless hours trying to figure out why your application is barely crawling.
Imagine discovering early during the development cycle that you are using suboptimal mappings and entity relationships or that you are missing performance-related settings.
More, with Hypersistence Optimizer, you can detect all such issues during testing and make sure you don't deploy to production a change that will affect data access layer performance.
[Hypersistence Optimizer](https://vladmihalcea.com/hypersistence-optimizer/?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp) is the tool you've been long waiting for!
#### Training
If you are interested in on-site training, I can offer you my [High-Performance Java Persistence training](https://vladmihalcea.com/trainings/?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp)
which can be adapted to one, two or three days of sessions. For more details, check out [my website](https://vladmihalcea.com/trainings/?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp).
#### Consulting
If you want me to review your application and provide insight into how you can optimize it to run faster,
then check out my [consulting page](https://vladmihalcea.com/consulting/?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp).
#### High-Performance Java Persistence Video Courses
If you want the fastest way to learn how to speed up a Java database application, then you should definitely enroll in [my High-Performance Java Persistence video courses](https://vladmihalcea.com/courses/?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp).
#### High-Performance Java Persistence Book
Or, if you prefer reading books, you are going to love my [High-Performance Java Persistence book](https://vladmihalcea.com/books/high-performance-java-persistence?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp) as well.
<a href="https://vladmihalcea.com/books/high-performance-java-persistence?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp">
<img src="https://i0.wp.com/vladmihalcea.com/wp-content/uploads/2018/01/HPJP_h200.jpg" alt="High-Performance Java Persistence book">
</a>
<a href="https://vladmihalcea.com/courses?utm_source=GitHub&utm_medium=banner&utm_campaign=hpjp">
<img src="https://i0.wp.com/vladmihalcea.com/wp-content/uploads/2018/01/HPJP_Video_Vertical_h200.jpg" alt="High-Performance Java Persistence video course">
</a>
## Java
All examples require at least Java 17 because of the awesome [Text Blocks](https://openjdk.java.net/jeps/355) feature, which makes JPQL and SQL queries so much readable.
## Maven
You need to use Maven 3.6.2 or newer to build the project.
## IntelliJ IDEA
On IntelliJ IDEA, the project runs just fine. You will have to make sure to select Java 17 or newer.
## Database setup
The project uses various database systems for integration testing, and you can configure the JDBC connection settings using the
`DatasourceProvider` instances (e.g., `PostgreSQLDataSourceProvider`).
By default, without configuring any database explicitly, HSQLDB is used for testing.
However, since some integration tests are designed to work on specific relational databases, we will need to have those databases started prior to running those tests.
Therefore, when running a DB-specific test, this GitHub repository will execute the following steps:
1. First, the test will try to find whether there's a local RDBMS it can use to run the test.
2. If no local database is found, the integration tests will use Testcontainers to bootstrap a Docker container
with the required *Oracle*, *SQL Server*, *PostgreSQL*, *MySQL*, *MariaDB*, *YugabyteDB*, or *CockroachDB* instance on demand.
> While you don't need to install any database manually on your local OS, this is recommended since your tests will run much faster than if they used Testcontainers.
### Manual Database configuration
- PostgreSQL
You can install PostgreSQL, and the password for the `postgres` user should be `admin`.
Now you need to create a `high_performance_java_persistence` database.
- Oracle
You need to download and install Oracle XE
Set the `sys` password to `admin`
Connect to Oracle using the "sys as sysdba" user and create a new user:
alter session set "_ORACLE_SCRIPT"=true;
create user oracle identified by admin default tablespace users;
grant dba to oracle;
alter system set processes=1000 scope=spfile;
alter system set sessions=1000 scope=spfile;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Open the `C:\app\${user.name}\product\21c\homes\OraDB21Home1\network\admin` folder where `${user.name}` is your current Windows username.
Locate the `tnsnames.ora` and `listener.ora` files and change the port from `1522` to `1521` if that's the case. If you made these modifications,
you need to restart the `OracleOraDB21Home1TNSListener` and `OracleServiceXE` Windows services.
- MySQL
You should install MySQL 8, and the password for the `mysql` user should be `admin`.
Now, you need to create a `high_performance_java_persistence` schema
Besides having all privileges on this schema, the `mysql` user also requires select permission on `mysql.PROC`.
If you don't have a `mysql` user created at database installation time, you can create one as follows:
````
CREATE USER 'mysql'@'localhost';
SET PASSWORD for 'mysql'@'localhost'='admin';
GRANT ALL PRIVILEGES ON high_performance_java_persistence.* TO 'mysql'@'localhost';
GRANT SELECT ON mysql.* TO 'mysql'@'localhost';
FLUSH PRIVILEGES;
````
- SQL Server
You can install SQL Server Express Edition with Tools. Choose mixed mode authentication and set the `sa` user password to `adm1n`.
Open SQL Server Configuration Manager -> SQL Server Network Configuration and enable Named Pipes and TCP
In the right pane of the TCP/IP option, choose Properties, then IP Addresses and make sure you Enable all listed IP addresses.
You need to blank the dynamic TCP port value and configure the static TCP port 1433 for all IPs.
Open SQL Server Management Studio and create the `high_performance_java_persistence` database
## Maven
> To build the project, don't use *install* or *package*. Instead, just compile test classes like this:
>
> mvnw clean test-compile
Or you can just run the `build.bat` or `build.sh` scripts which run the above Maven command.
Afterward, just pick one test from the IDE and run it individually.
> Don't you run all tests at once (e.g. `mvn clean test`) because the test suite will take a very long time to complete.
>
> So, run the test you are interested in individually.
Enjoy learning more about Java Persistence, Hibernate, and database systems!
| 1 |
kestra-io/kestra | Infinitely scalable, event-driven, language-agnostic orchestration and scheduling platform to manage millions of workflows declaratively in code. | 2019-08-24T13:56:15Z | null | <p align="center">
<a href="https://www.kestra.io">
<img src="https://kestra.io/banner.png" alt="Kestra workflow orchestrator" />
</a>
</p>
<h1 align="center" style="border-bottom: none">
Event-Driven Declarative Orchestrator
</h1>
<div align="center">
<a href="https://github.com/kestra-io/kestra/releases"><img src="https://img.shields.io/github/tag-pre/kestra-io/kestra.svg?color=blueviolet" alt="Last Version" /></a>
<a href="https://github.com/kestra-io/kestra/blob/develop/LICENSE"><img src="https://img.shields.io/github/license/kestra-io/kestra?color=blueviolet" alt="License" /></a>
<a href="https://github.com/kestra-io/kestra/stargazers"><img src="https://img.shields.io/github/stars/kestra-io/kestra?color=blueviolet&logo=github" alt="Github star" /></a> <br>
<a href="https://kestra.io"><img src="https://img.shields.io/badge/Website-kestra.io-192A4E?color=blueviolet" alt="Kestra infinitely scalable orchestration and scheduling platform"></a>
<a href="https://kestra.io/slack"><img src="https://img.shields.io/badge/Slack-Join%20Community-blueviolet?logo=slack" alt="Slack"></a>
</div>
<br />
<p align="center">
<a href="https://twitter.com/kestra_io"><img height="25" src="https://kestra.io/twitter.svg" alt="twitter" /></a>
<a href="https://www.linkedin.com/company/kestra/"><img height="25" src="https://kestra.io/linkedin.svg" alt="linkedin" /></a>
<a href="https://www.youtube.com/@kestra-io"><img height="25" src="https://kestra.io/youtube.svg" alt="youtube" /></a>
</p>
<br />
<p align="center">
<a href="https://www.youtube.com/watch?v=h-P0eK2xN58&ab_channel=Kestra" target="_blank">
<img src="https://kestra.io/startvideo.png" alt="Get started in 4 minutes with Kestra" width="640px" />
</a>
</p>
<p align="center" style="color:grey;"><i>"Click on the image to get started in 4 minutes with Kestra."</i></p>
## Live Demo
Try Kestra using our [live demo](https://demo.kestra.io/ui/login?auto).
## What is Kestra
Kestra is a universal open-source orchestrator that makes both **scheduled** and **event-driven** workflows easy. By bringing **Infrastructure as Code** best practices to data, process, and microservice orchestration, you can build reliable workflows and manage them with confidence.
In just a few lines of code, you can [create a flow](https://kestra.io/docs/getting-started) directly from the UI. Thanks to the declarative YAML interface for defining orchestration logic, business stakeholders can participate in the workflow creation process.
Kestra offers a versatile set of **language-agnostic** developer tools while simultaneously providing an intuitive user interface tailored for business professionals. The YAML definition gets automatically adjusted any time you make changes to a workflow from the UI or via an API call. Therefore, the orchestration logic is always managed **declaratively in code**, even if some workflow components are modified in other ways (UI, CI/CD, Terraform, API calls).
![Adding new tasks in the UI](https://kestra.io/adding-tasks.gif)
## Key concepts
1. `Flow` is the main component in Kestra. It's a container for your tasks and orchestration logic.
2. `Namespace` is used to provide logical isolation, e.g., to separate development and production environments. Namespaces are like folders on your file system — they organize flows into logical categories and can be nested to provide a hierarchical structure.
3. `Tasks` are atomic actions in a flow. By default, all tasks in the list will be executed sequentially, with additional customization options, a.o. to run tasks in parallel or allow a failure of specific tasks when needed.
4. `Triggers` define when a flow should run. In Kestra, flows are triggered based on events. Examples of such events include:
- a regular time-based **schedule**
- an **API** call (*webhook trigger*)
- ad-hoc execution from the **UI**
- a **flow trigger** - flows can be triggered from other flows using a [flow trigger](https://kestra.io/docs/developer-guide/triggers/flow) or a [subflow](https://kestra.io/docs/flow-examples/subflow), enabling highly modular workflows.
- **custom events**, including a new file arrival (*file detection event*), a new message in a message bus, query completion, and more.
5. `Inputs` allow you to pass runtime-specific variables to a flow. They are strongly typed, and allow additional [validation rules](https://kestra.io/docs/developer-guide/inputs#input-validation).
## Extensible platform via plugins
Most tasks in Kestra are available as [plugins](https://kestra.io/plugins), but many type of tasks are available in the core library, including a.o. script tasks supporting various programming languages (e.g., Python, Node, Bash) and the ability to orchestrate your business logic packaged into Docker container images.
To create your own plugins, check the [plugin developer guide](https://kestra.io/docs/plugin-developer-guide).
## Rich orchestration capabilities
Kestra provides a variety of tasks to handle both simple and complex business logic, including:
- subflows
- retries
- timeout
- error handling
- conditional branching
- dynamic tasks
- sequential and parallel tasks
- skipping tasks or triggers when needed by setting the flag `disabled` to `true`.
- configuring dependencies between tasks, flows and triggers
- advanced scheduling and trigger conditions
- backfills
- blueprints
- documenting your flows, tasks and triggers by adding a markdown description to any component
- adding labels to add additional metadata to your flows such as the flow owner or team:
```yaml
id: getting_started
namespace: dev
description: |
# Getting Started
Let's `write` some **markdown** - [first flow](https://t.ly/Vemr0) 🚀
labels:
owner: rick.astley
project: never-gonna-give-you-up
tasks:
- id: hello
type: io.kestra.core.tasks.log.Log
message: Hello world!
description: a *very* important task
disabled: false
timeout: PT10M
retry:
type: constant # type: string
interval: PT15M # type: Duration
maxDuration: PT1H # type: Duration
maxAttempt: 5 # type: int
warningOnRetry: true # type: boolean, default is false
- id: parallel
type: io.kestra.core.tasks.flows.Parallel
concurrent: 3
tasks:
- id: task1
type: io.kestra.plugin.scripts.shell.Commands
commands:
- 'echo "running {{task.id}}"'
- 'sleep 2'
- id: task2
type: io.kestra.plugin.scripts.shell.Commands
commands:
- 'echo "running {{task.id}}"'
- 'sleep 1'
- id: task3
type: io.kestra.plugin.scripts.shell.Commands
commands:
- 'echo "running {{task.id}}"'
- 'sleep 3'
triggers:
- id: schedule
type: io.kestra.core.models.triggers.types.Schedule
cron: "*/15 * * * *"
backfill:
start: 2023-10-05T14:00:00Z
```
## Built-in code editor
You can write workflows directly from the UI. When writing your workflows, the UI provides:
- autocompletion
- syntax validation
- embedded plugin documentation
- example flows provided as blueprints
- topology view (view of your dependencies in a Directed Acyclic Graph) that get updated live as you modify and add new tasks.
## Stay up to date
We release new versions every month. Give the repository a star to stay up to date with the latest releases and get notified about future updates.
![Star the repo](https://kestra.io/star.gif)
## Getting Started
Follow the steps below to start local development.
### Prerequisites
Make sure that Docker is installed and running on your system. The default installation requires the following:
- [Docker](https://docs.docker.com/engine/install/)
- [Docker Compose](https://docs.docker.com/compose/install/)
### Launch Kestra
Download the Docker Compose file:
```sh
curl -o docker-compose.yml https://raw.githubusercontent.com/kestra-io/kestra/develop/docker-compose.yml
```
Alternatively, you can use `wget https://raw.githubusercontent.com/kestra-io/kestra/develop/docker-compose.yml`.
Start Kestra:
```sh
docker compose up -d
```
Open `http://localhost:8080` in your browser and create your first flow.
### Hello-World flow
Here is a simple example logging hello world message to the terminal:
```yaml
id: getting_started
namespace: dev
tasks:
- id: hello_world
type: io.kestra.core.tasks.log.Log
message: Hello World!
```
For more information:
- Follow the [getting started tutorial](https://kestra.io/docs/getting-started/).
- Read the [documentation](https://kestra.io/docs/) to understand how to:
- [Develop your flows](https://kestra.io/docs/developer-guide/)
- [Deploy Kestra](https://kestra.io/docs/administrator-guide/)
- Use our [Terraform provider](https://kestra.io/docs/terraform/) to deploy your flows
- Develop your [own plugins](https://kestra.io/docs/plugin-developer-guide/).
## Plugins
Kestra is built on a [plugin system](https://kestra.io/plugins/). You can find your plugin to interact with your provider; alternatively, you can follow [these steps](https://kestra.io/docs/plugin-developer-guide/) to develop your own plugin.
For a full list of plugins, check the [plugins page](https://kestra.io/plugins/).
Here are some examples of the available plugins:
<table>
<tr>
<td><a href="https://kestra.io/plugins/plugin-airbyte#cloudjobs">Airbyte Cloud</a></td>
<td><a href="https://kestra.io/plugins/plugin-airbyte#connections">Airbyte OSS</a></td>
<td><a href="https://kestra.io/plugins/plugin-aws#athena">Amazon Athena</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-aws#cli">Amazon CLI</a></td>
<td><a href="https://kestra.io/plugins/plugin-aws#dynamodb">Amazon DynamoDb</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-redshift">Amazon Redshift</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-aws#s3">Amazon S3</a></td>
<td><a href="https://kestra.io/plugins/plugin-aws#sns">Amazon SNS</a></td>
<td><a href="https://kestra.io/plugins/plugin-aws#sqs">Amazon SQS</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-amqp">AMQP</a></td>
<td><a href="https://kestra.io/plugins/plugin-serdes#avro">Apache Avro</a></td>
<td><a href="https://kestra.io/plugins/plugin-cassandra">Apache Cassandra</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-kafka">Apache Kafka</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-pinot">Apache Pinot</a></td>
<td><a href="https://kestra.io/plugins/plugin-serdes#parquet">Apache Parquet</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-pulsar">Apache Pulsar</a></td>
<td><a href="https://kestra.io/plugins/plugin-spark">Apache Spark</a></td>
<td><a href="https://kestra.io/plugins/plugin-tika">Apache Tika</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-azure/#batchjob">Azure Batch</a></td>
<td><a href="https://kestra.io/plugins/plugin-azure/#storage-blob">Azure Blob Storage</a></td>
<td><a href="https://kestra.io/plugins/plugin-azure/#storagetable">Azure Blob Table</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-serdes#csv">CSV</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-clickhouse">ClickHouse</a></td>
<td><a href="https://kestra.io/plugins/plugin-compress">Compression</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-couchbase">Couchbase</a></td>
<td><a href="https://kestra.io/plugins/plugin-databricks">Databricks</a></td>
<td><a href="https://kestra.io/plugins/plugin-dbt#cloud">dbt cloud</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-dbt#cli">dbt core</a></td>
<td><a href="https://kestra.io/plugins/plugin-debezium-sqlserver">Debezium Microsoft SQL Server</a></td>
<td><a href="https://kestra.io/plugins/plugin-debezium-mysql">Debezium MYSQL</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-debezium-postgres">Debezium Postgres</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-duckdb">DuckDb</a></td>
<td><a href="https://kestra.io/plugins/plugin-elasticsearch">ElasticSearch</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-notifications#mail">Email</a></td>
<td><a href="https://kestra.io/plugins/plugin-fivetran">Fivetran</a></td>
<td><a href="https://kestra.io/plugins/plugin-fs#ftp">FTP</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-fs#ftps">FTPS</a></td>
<td><a href="https://kestra.io/plugins/plugin-git">Git</a></td>
<td><a href="https://kestra.io/plugins/plugin-gcp#bigquery">Google Big Query</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-gcp#pubsub">Google Pub/Sub</a></td>
<td><a href="https://kestra.io/plugins/plugin-gcp#gcs">Google Cloud Storage</a></td>
<td><a href="https://kestra.io/plugins/plugin-gcp#dataproc">Google DataProc</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-gcp#firestore">Google Firestore</a></td>
<td><a href="https://kestra.io/plugins/plugin-gcp#cli">Google Cli</a></td>
<td><a href="https://kestra.io/plugins/plugin-gcp#vertexai/">Google Vertex AI</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-gcp#gke">Google Kubernetes Engines</a></td>
<td><a href="https://kestra.io/plugins/plugin-googleworkspace#drive">Google Drive</a></td>
<td><a href="https://kestra.io/plugins/plugin-googleworkspace#sheets">Google Sheets</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-script-groovy">Groovy</a></td>
<td><a href="https://kestra.io/plugins/plugin-fs#http">Http</a></td>
<td><a href="https://kestra.io/plugins/plugin-serdes#json">JSON</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-script-julia">Julia</a></td>
<td><a href="https://kestra.io/plugins/plugin-script-jython">Jython</a></td>
<td><a href="https://kestra.io/plugins/plugin-kubernetes">Kubernetes</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-jdbc-sqlserver">Microsoft SQL Server</a></td>
<td><a href="https://kestra.io/plugins/plugin-notifications#teams">Microsoft Teams</a></td>
<td><a href="https://kestra.io/plugins/plugin-mongodb">MongoDb</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-mqtt">MQTT</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-mysql">MySQL</a></td>
<td><a href="https://kestra.io/plugins/plugin-script-nashorn">Nashorn</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-nats">NATS</a></td>
<td><a href="https://kestra.io/plugins/plugin-neo4j">Neo4j</a></td>
<td><a href="https://kestra.io/plugins/plugin-script-node">Node</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-openai">OpenAI</a></td>
<td><a href="https://kestra.io/plugins/plugin-crypto#openpgp">Open PGP</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-oracle">Oracle</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-jdbc-postgres">PostgreSQL</a></td>
<td><a href="https://kestra.io/plugins/plugin-powerbi">Power BI</a></td>
<td><a href="https://kestra.io/plugins/plugin-script-powershell">PowerShell</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-script-python">Python</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-rockset">Rockset</a></td>
<td><a href="https://kestra.io/plugins/plugin-script-r">RScript</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-fs#sftp">SFTP</a></td>
<td><a href="https://kestra.io/plugins/plugin-servicenow">ServiceNow</a></td>
<td><a href="https://kestra.io/plugins/plugin-singer">Singer</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-script-shell">Shell</a></td>
<td><a href="https://kestra.io/plugins/plugin-notifications#slack">Slack</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-snowflake">Snowflake</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-soda">Soda</a></td>
<td><a href="https://kestra.io/plugins/plugin-fs#ssh">SSH</a></td>
<td><a href="https://kestra.io/plugins/plugin-notifications#telegram">Telegram</a></td>
</tr>
<tr>
<td><a href="https://kestra.io/plugins/plugin-jdbc-trino">Trino</a></td>
<td><a href="https://kestra.io/plugins/plugin-serdes#xml">XML</a></td>
<td><a href="https://kestra.io/plugins/plugin-jdbc-vertica">Vertica</a></td>
</tr>
</table>
This list is growing quickly and we welcome contributions.
## Community Support
If you need help or have any questions, reach out using one of the following channels:
- [Slack](https://kestra.io/slack) - join the community and get the latest updates.
- [GitHub discussions](https://github.com/kestra-io/kestra/discussions) - useful to start a conversation that is not a bug or feature request.
- [Twitter](https://twitter.com/kestra_io) - to follow up with the latest updates.
## Contributing
We love contributions, big or small. Check out [our contributor guide](https://github.com/kestra-io/kestra/blob/develop/.github/CONTRIBUTING.md) for details on how to contribute to Kestra.
See our [Plugin Developer Guide](https://kestra.io/docs/plugin-developer-guide/) for details on developing and publishing Kestra plugins.
## License
Apache 2.0 © [Kestra Technologies](https://kestra.io)
| 0 |
doocs/jvm | 🤗 JVM 底层原理最全知识总结 | 2018-06-23T01:12:59Z | null | # Java 虚拟机底层原理知识总结
<a href="https://github.com/doocs/jvm/actions?query=workflow%3ASync"><img src="https://github.com/doocs/jvm/workflows/Sync/badge.svg"></a>
<a href="https://github.com/doocs/jvm/blob/main/LICENSE"><img src="https://badgen.net/github/license/doocs/jvm?color=green" alt="license"></a>
<a href="https://github.com/doocs/jvm/issues"><img src="https://badgen.net/github/open-issues/doocs/jvm" alt="issues"></a>
<a href="https://github.com/doocs/jvm/stargazers"><img src="https://badgen.net/github/stars/doocs/jvm" alt="stars"></a>
<a href="https://github.com/doocs/jvm"><img src="https://badgen.net/badge/⭐/GitHub/blue" alt="github"></a>
<a href="https://gitee.com/doocs/jvm"><img src="https://badgen.net/badge/⭐/Gitee/blue" alt="gitee"></a>
<a href="http://makeapullrequest.com"><img src="https://badgen.net/badge/PRs/welcome/cyan" alt="PRs Welcome"></a>
<a href="https://github.com/doocs/doocs.github.io"><img src="https://badgen.net/badge/organization/join%20us/cyan" alt="open-source-organization"></a>
这里仅仅记录了一些笔者认为需要重点掌握的 JVM 知识点,如果你想更加全面地了解 JVM 底层原理,可以阅读周志明老师《深入理解 Java 虚拟机——JVM 高级特性与最佳实践(第 2/3 版)》全书。
## 清单
- [JVM 内存结构](/docs/01-jvm-memory-structure.md)
- [HotSpot 虚拟机对象探秘](/docs/02-hotspot-jvm-object.md)
- [垃圾收集策略与算法](/docs/03-gc-algorithms.md)
- [HotSpot 垃圾收集器](/docs/04-hotspot-gc.md)
- [内存分配与回收策略](/docs/05-memory-allocation-gc.md)
- [JVM 性能调优](/docs/06-jvm-performance-tuning.md)
- [类文件结构](/docs/07-class-structure.md)
- [类加载的时机](/docs/08-load-class-time.md)
- [类加载的过程](/docs/09-load-class-process.md)
- [类加载器](/docs/10-class-loader.md)
## 站点
本项目使用开源小工具 [Gitee Pages Actions](https://github.com/yanglbme/gitee-pages-action) 实现站点的自动部署更新。
目前支持以下两个站点访问:
- Gitee Pages: https://doocs.gitee.io/jvm
- GitHub Pages: https://doocs.github.io/jvm
## 写作规范
参考《[中文技术文档的写作规范](https://github.com/ruanyf/document-style-guide)》
## 许可证
[知识共享 版权归属-相同方式共享 4.0 国际 公共许可证](http://creativecommons.org/licenses/by-sa/4.0/)
---
## Doocs 社区优质项目
Doocs 技术社区,致力于打造一个内容完整、持续成长的互联网开发者学习生态圈!以下是 Doocs 旗下的一些优秀项目,欢迎各位开发者朋友持续保持关注。
| # | 项目 | 描述 | 热度 |
| --- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| 1 | [advanced-java](https://github.com/doocs/advanced-java) | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识。 | ![](https://badgen.net/github/stars/doocs/advanced-java) <br>![](https://badgen.net/github/forks/doocs/advanced-java) |
| 2 | [leetcode](https://github.com/doocs/leetcode) | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解。 | ![](https://badgen.net/github/stars/doocs/leetcode) <br>![](https://badgen.net/github/forks/doocs/leetcode) |
| 3 | [source-code-hunter](https://github.com/doocs/source-code-hunter) | 互联网常用组件框架源码分析。 | ![](https://badgen.net/github/stars/doocs/source-code-hunter) <br>![](https://badgen.net/github/forks/doocs/source-code-hunter) |
| 4 | [jvm](https://github.com/doocs/jvm) | Java 虚拟机底层原理知识总结。 | ![](https://badgen.net/github/stars/doocs/jvm) <br>![](https://badgen.net/github/forks/doocs/jvm) |
| 5 | [coding-interview](https://github.com/doocs/coding-interview) | 代码面试题集,包括《剑指 Offer》、《编程之美》等。 | ![](https://badgen.net/github/stars/doocs/coding-interview) <br>![](https://badgen.net/github/forks/doocs/coding-interview) |
| 6 | [md](https://github.com/doocs/md) | 一款高度简洁的微信 Markdown 编辑器。 | ![](https://badgen.net/github/stars/doocs/md) <br>![](https://badgen.net/github/forks/doocs/md) |
| 7 | [technical-books](https://github.com/doocs/technical-books) | 值得一看的技术书籍列表。 | ![](https://badgen.net/github/stars/doocs/technical-books) <br>![](https://badgen.net/github/forks/doocs/technical-books) |
## 公众号
[Doocs](https://github.com/doocs) 技术社区旗下唯一公众号「**Doocs**」,欢迎扫码关注,**专注分享技术领域相关知识及行业最新资讯**。当然,也可以加我个人微信(备注:GitHub),拉你进技术交流群。
<table>
<tr>
<td align="center" style="width: 260px;">
<img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-doocs.png" style="width: 400px;"><br>
</td>
<td align="center" style="width: 260px;">
<img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-yanglbme.png" style="width: 400px;"><br>
</td>
</tr>
</table>
关注「**Doocs**」公众号,回复 **JVM**,即可获取本项目离线 PDF 文档,学习更加方便!
![](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/jvm@main/images/jvm-pdf.png)
| 0 |
kunal-kushwaha/DSA-Bootcamp-Java | This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs. | 2021-07-30T12:23:25Z | null | # DSA + Interview preparation bootcamp
- [Join Replit](http://join.replit.com/kunal-kushwaha)
- Subscribe to the [YouTube channel](https://www.youtube.com/KunalKushwaha?sub_confirmation=1)
- [Lectures](https://www.youtube.com/playlist?list=PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ)
- [Course website](https://wemakedevs.org/courses/dsa)
- [Assignments](https://github.com/kunal-kushwaha/DSA-Bootcamp-Java/tree/main/assignments) (solutions can be found on LeetCode)
- [Connect with me](http://kunalkushwaha.com)
| 0 |
spotbugs/spotbugs | SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code. | 2016-11-04T22:18:08Z | null |
# ![SpotBugs](https://spotbugs.github.io/images/logos/spotbugs_logo_300px.png)
[![Build Status](https://github.com/spotbugs/spotbugs/workflows/build/badge.svg)](https://github.com/spotbugs/spotbugs/actions)
[![Documentation Status](https://readthedocs.org/projects/spotbugs/badge/?version=latest)](https://spotbugs.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://sonarcloud.io/api/project_badges/measure?branch=master&project=com.github.spotbugs.spotbugs&metric=coverage)](https://sonarcloud.io/component_measures?id=com.github.spotbugs.spotbugs&metric=coverage)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.spotbugs/spotbugs/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.spotbugs/spotbugs)
[![Javadocs](https://javadoc.io/badge/com.github.spotbugs/spotbugs.svg)](https://javadoc.io/doc/com.github.spotbugs/spotbugs)
[SpotBugs](https://spotbugs.github.io/) is the spiritual successor of [FindBugs](https://github.com/findbugsproject/findbugs), carrying on from the point where it left off with support of its community.
SpotBugs is licensed under the [GNU LESSER GENERAL PUBLIC LICENSE](https://github.com/spotbugs/spotbugs/blob/master/spotbugs/licenses/LICENSE.txt).
More information at the [official website](https://spotbugs.github.io/). A lot of things can still be found at the [old FindBugs website](https://findbugs.sourceforge.net).
# Build
SpotBugs is built using [Gradle](https://gradle.org). The recommended way to obtain it is to simply run the `gradlew` (or `gradlew.bat`) wrapper, which will automatically download and run the correct version as needed (using the settings in `gradle/wrapper/gradle-wrapper.properties`).
Building SpotBugs requires JDK 21 to run all the tests (using SpotBugs requires JDK 8 or above).
To see a list of build options, run `gradle tasks` (or `gradlew tasks`). The `build` task will perform a full build and test.
To build the SpotBugs plugin for Eclipse, you'll need to create the file `eclipsePlugin/local.properties`, containing a property `eclipseRoot.dir` that points to an Eclipse installation's root directory (see `.github/workflows/release.yml` for an example), then run the build.
To prepare Eclipse environment only, run `./gradlew eclipse`. See also [detailed steps](https://github.com/spotbugs/spotbugs/blob/master/eclipsePlugin/doc/building_spotbugs_plugin.txt).
# Using SpotBugs
SpotBugs can be used standalone and through several integrations, including:
* [Ant](https://spotbugs.readthedocs.io/en/latest/ant.html)
* [Maven](https://spotbugs.readthedocs.io/en/latest/maven.html)
* [Gradle](https://spotbugs.readthedocs.io/en/latest/gradle.html)
* [Eclipse](https://spotbugs.readthedocs.io/en/latest/eclipse.html)
* [Sonarqube](https://github.com/spotbugs/sonar-findbugs)
* [IntelliJ IDEA](https://github.com/JetBrains/spotbugs-intellij-plugin)
# Questions?
You can contact us using [GitHub Discussions](https://github.com/spotbugs/spotbugs/discussions).
| 0 |
doocs/leetcode | 🔥LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解 | 2018-09-16T14:03:03Z | null | <p align="center">
<a href="https://github.com/doocs/leetcode"><img src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/images/leetcode-doocs.png" alt="LeetCode-GitHub-Doocs"></a>
</p>
<p align="center">
<a href="https://doocs.github.io/#/?id=how-to-join"><img src="https://img.shields.io/badge/organization-join%20us-42b883?style=flat-square" alt="open-source-organization"></a>
<a href="https://github.com/doocs/leetcode"><img src="https://img.shields.io/badge/langs-Python%20%7C%20Java%20%7C%20C++%20%7C%20Go%20%7C%20TypeScript%20%7C%20Rust%20%7C%20...-red?style=flat-square&color=42b883" alt="languages"></a>
<a href="https://github.com/doocs/leetcode/blob/main/LICENSE"><img src="https://img.shields.io/github/license/doocs/leetcode?color=42b883&style=flat-square" alt="LICENSE"></a><br>
<a href="https://opencollective.com/doocs-leetcode/backers/badge.svg" alt="backers on Open Collective"><img src="https://img.shields.io/opencollective/backers/doocs-leetcode?color=42b883&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
<a href="https://github.com/doocs/leetcode/stargazers"><img src="https://img.shields.io/github/stars/doocs/leetcode?color=42b883&logo=github&style=flat-square" alt="stars"></a>
<a href="https://github.com/doocs/leetcode/network/members"><img src="https://img.shields.io/github/forks/doocs/leetcode?color=42b883&logo=github&style=flat-square" alt="forks"></a>
<a href="https://opencollective.com/doocs-leetcode/sponsors/badge.svg" alt="Sponsors on Open Collective"><img src="https://img.shields.io/opencollective/sponsors/doocs-leetcode?color=42b883&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
</p>
## 介绍
本项目包含 LeetCode、《剑指 Offer(第 2 版)》、《剑指 Offer(专项突击版)》、《程序员面试金典(第 6 版)》等题目的相关题解。所有题解均由多种编程语言实现,包括但不限于:Java、Python、C++、Go、TypeScript、Rust。我们正在全力更新,欢迎 Star 🌟 关注[本项目](https://github.com/doocs/leetcode),获取项目最新动态。
[English Version](/README_EN.md)
## 站点
https://doocs.github.io/leetcode
## 算法全解
- [LeetCode](/solution/README.md)
- [往期竞赛合集](/solution/CONTEST_README.md)
- [剑指 Offer(第 2 版)](/lcof/README.md)
- [剑指 Offer(专项突击版)](/lcof2/README.md)
- [程序员面试金典(第 6 版)](/lcci/README.md)
## 专项突破
- [JavaScript 专项练习](/solution/JAVASCRIPT_README.md)
- [数据库专项练习](/solution/DATABASE_README.md)
## 算法提升专题
### 1. 基础算法
- [在排序数组中查找元素的第一个和最后一个位置](/solution/0000-0099/0034.Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array/README.md) - `二分查找`
- [准时到达的列车最小时速](/solution/1800-1899/1870.Minimum%20Speed%20to%20Arrive%20on%20Time/README.md) - `二分查找`
- [可移除字符的最大数目](/solution/1800-1899/1898.Maximum%20Number%20of%20Removable%20Characters/README.md) - `二分查找`
- [排序数组](/solution/0900-0999/0912.Sort%20an%20Array/README.md) - `快速排序`、`归并排序`
- [字符串相加](/solution/0400-0499/0415.Add%20Strings/README.md) - `高精度加法`
- [字符串相乘](/solution/0000-0099/0043.Multiply%20Strings/README.md) - `高精度乘法`
- [区域和检索 - 数组不可变](/solution/0300-0399/0303.Range%20Sum%20Query%20-%20Immutable/README.md) - `前缀和`
- [二维区域和检索 - 矩阵不可变](/solution/0300-0399/0304.Range%20Sum%20Query%202D%20-%20Immutable/README.md) - `二维前缀和`
- [区间加法](/solution/0300-0399/0370.Range%20Addition/README.md) - `前缀和`、`差分`
- [用邮票贴满网格图](/solution/2100-2199/2132.Stamping%20the%20Grid/README.md) - `二维前缀和`、`二维差分`
- [无重复字符的最长子串](/solution/0000-0099/0003.Longest%20Substring%20Without%20Repeating%20Characters/README.md) - `双指针`、`哈希表`
- [乘积小于 K 的子数组](/solution/0700-0799/0713.Subarray%20Product%20Less%20Than%20K/README.md) - `双指针`
- [位 1 的个数](/solution/0100-0199/0191.Number%20of%201%20Bits/README.md) - `位运算`、`lowbit`
- [合并区间](/solution/0000-0099/0056.Merge%20Intervals/README.md) - `区间合并`
<!-- 排序算法、待补充 -->
### 2. 数据结构
- [设计链表](/solution/0700-0799/0707.Design%20Linked%20List/README.md) - `单链表`、`指针引用`、`数组实现`
- [下一个更大元素 I](/solution/0400-0499/0496.Next%20Greater%20Element%20I/README.md) - `单调栈`
- [每日温度](/solution/0700-0799/0739.Daily%20Temperatures/README.md) - `单调栈`
- [子数组的最小值之和](/solution/0900-0999/0907.Sum%20of%20Subarray%20Minimums/README.md) - `单调栈`
- [最大宽度坡](/solution/0900-0999/0962.Maximum%20Width%20Ramp/README.md) - `单调栈`
- [最多能完成排序的块 II](/solution/0700-0799/0768.Max%20Chunks%20To%20Make%20Sorted%20II/README.md) - `单调栈`
- [子数组范围和](/solution/2100-2199/2104.Sum%20of%20Subarray%20Ranges/README.md) - `单调栈`
- [子数组最小乘积的最大值](/solution/1800-1899/1856.Maximum%20Subarray%20Min-Product/README.md) - `单调栈`
- [滑动窗口最大值](/solution/0200-0299/0239.Sliding%20Window%20Maximum/README.md) - `单调队列`
- [满足不等式的最大值](/solution/1400-1499/1499.Max%20Value%20of%20Equation/README.md) - `单调队列`
- [和至少为 K 的最短子数组](/solution/0800-0899/0862.Shortest%20Subarray%20with%20Sum%20at%20Least%20K/README.md) - `单调队列`
- [带限制的子序列和](/solution/1400-1499/1425.Constrained%20Subsequence%20Sum/README.md) - `动态规划`、`单调队列优化`
- [单词规律 II](/solution/0200-0299/0291.Word%20Pattern%20II/README.md) - `哈希表`、`回溯`
- [最短回文串](/solution/0200-0299/0214.Shortest%20Palindrome/README.md) - `字符串哈希`
- [回文对](/solution/0300-0399/0336.Palindrome%20Pairs/README.md) - `字符串哈希`
- [最长重复子串](/solution/1000-1099/1044.Longest%20Duplicate%20Substring/README.md) - `字符串哈希`、`二分查找`
- [不同的循环子字符串](/solution/1300-1399/1316.Distinct%20Echo%20Substrings/README.md) - `字符串哈希`
### 3. 搜索
- [图像渲染](/solution/0700-0799/0733.Flood%20Fill/README.md)- `BFS`、`DFS`、`Flood Fill 算法`、`连通性模型`
- [岛屿数量](/solution/0200-0299/0200.Number%20of%20Islands/README.md) - `BFS`、`Flood Fill 算法`
- [01 矩阵](/solution/0500-0599/0542.01%20Matrix/README.md) - `多源 BFS`
- [地图中的最高点](/solution/1700-1799/1765.Map%20of%20Highest%20Peak/README.md) - `多源 BFS`
- [进击的骑士](/solution/1100-1199/1197.Minimum%20Knight%20Moves/README.md) - `BFS`、`最短路模型`
- [二进制矩阵中的最短路径](/solution/1000-1099/1091.Shortest%20Path%20in%20Binary%20Matrix/README.md) - `BFS`、`最短路模型`
- [迷宫中离入口最近的出口](/solution/1900-1999/1926.Nearest%20Exit%20from%20Entrance%20in%20Maze/README.md) - `BFS`、`最短路模型`
- [网格中的最短路径](/solution/1200-1299/1293.Shortest%20Path%20in%20a%20Grid%20with%20Obstacles%20Elimination/README.md) - `BFS`、`最短路模型`
- [打开转盘锁](/solution/0700-0799/0752.Open%20the%20Lock/README.md) - `最小步数模型`、`双向 BFS`、`A* 算法`
- [单词接龙](/solution/0100-0199/0127.Word%20Ladder/README.md) - `最小步数模型`、`双向 BFS`
- [转化数字的最小运算数](/solution/2000-2099/2059.Minimum%20Operations%20to%20Convert%20Number/README.md) - `最小步数模型`、`双向 BFS`
- [滑动谜题](/solution/0700-0799/0773.Sliding%20Puzzle/README.md) - `BFS`、`最小步数模型`、`A* 算法`
- [访问所有节点的最短路径](/solution/0800-0899/0847.Shortest%20Path%20Visiting%20All%20Nodes/README.md) - `BFS`、`最小步数模型`、`A* 算法`
- [为高尔夫比赛砍树](/solution/0600-0699/0675.Cut%20Off%20Trees%20for%20Golf%20Event/README.md) - `BFS`、`A* 算法`
- [使网格图至少有一条有效路径的最小代价](/solution/1300-1399/1368.Minimum%20Cost%20to%20Make%20at%20Least%20One%20Valid%20Path%20in%20a%20Grid/README.md) - `双端队列 BFS`
- [到达角落需要移除障碍物的最小数目](/solution/2200-2299/2290.Minimum%20Obstacle%20Removal%20to%20Reach%20Corner/README.md) - `双端队列 BFS`
- [迷宫](/solution/0400-0499/0490.The%20Maze/README.md) - `DFS`、`连通性模型`、`Flood Fill 算法`
- [单词搜索](/solution/0000-0099/0079.Word%20Search/README.md) - `DFS`、`搜索顺序`、`回溯`
- [黄金矿工](/solution/1200-1299/1219.Path%20with%20Maximum%20Gold/README.md) - `DFS`、`搜索顺序`、`回溯`
- [火柴拼正方形](/solution/0400-0499/0473.Matchsticks%20to%20Square/README.md) - `DFS`、`回溯`、`剪枝`
- [划分为 k 个相等的子集](/solution/0600-0699/0698.Partition%20to%20K%20Equal%20Sum%20Subsets/README.md) - `DFS`、`回溯`、`剪枝`
- [完成所有工作的最短时间](/solution/1700-1799/1723.Find%20Minimum%20Time%20to%20Finish%20All%20Jobs/README.md) - `DFS`、`回溯`、`剪枝`
- [公平分发饼干](/solution/2300-2399/2305.Fair%20Distribution%20of%20Cookies/README.md) - `DFS`、`回溯`、`剪枝`
- [矩阵中的最长递增路径](/solution/0300-0399/0329.Longest%20Increasing%20Path%20in%20a%20Matrix/README.md) - `DFS`、`记忆化搜索`
- [网格图中递增路径的数目](/solution/2300-2399/2328.Number%20of%20Increasing%20Paths%20in%20a%20Grid/README.md) - `DFS`、`记忆化搜索`
- [翻转游戏 II](/solution/0200-0299/0294.Flip%20Game%20II/README.md) - `DFS`、`状态压缩`、`记忆化搜索`
- [统计所有可行路径](/solution/1500-1599/1575.Count%20All%20Possible%20Routes/README.md) - `DFS`、`记忆化搜索`
- [切披萨的方案数](/solution/1400-1499/1444.Number%20of%20Ways%20of%20Cutting%20a%20Pizza/README.md) - `DFS`、`记忆化搜索`
<!-- DFS 待补充 -->
### 4. 动态规划(DP)
- [杨辉三角](/solution/0100-0199/0118.Pascal's%20Triangle/README.md) - `线性 DP`、`数字三角形模型`
- [最小路径和](/solution/0000-0099/0064.Minimum%20Path%20Sum/README.md) - `线性 DP`、`数字三角形模型`
- [摘樱桃](/solution/0700-0799/0741.Cherry%20Pickup/README.md) - `线性 DP`、`数字三角形模型`
- [摘樱桃 II](/solution/1400-1499/1463.Cherry%20Pickup%20II/README.md) - `线性 DP`、`数字三角形模型`
- [最长递增子序列](/solution/0300-0399/0300.Longest%20Increasing%20Subsequence/README.md) - `线性 DP`、`最长上升子序列模型`
- [无重叠区间](/solution/0400-0499/0435.Non-overlapping%20Intervals/README.md) - `线性 DP`、`最长上升子序列模型`、`贪心优化`
- [删列造序 III](/solution/0900-0999/0960.Delete%20Columns%20to%20Make%20Sorted%20III/README.md) - `线性 DP`、`最长上升子序列模型`
- [俄罗斯套娃信封问题](/solution/0300-0399/0354.Russian%20Doll%20Envelopes/README.md) - `线性 DP`、`最长上升子序列模型`、`贪心优化`
- [堆叠长方体的最大高度](/solution/1600-1699/1691.Maximum%20Height%20by%20Stacking%20Cuboids/README.md) - `排序`、`线性 DP`、`最长上升子序列模型`
- [无矛盾的最佳球队](/solution/1600-1699/1626.Best%20Team%20With%20No%20Conflicts/README.md) - `排序`、`线性 DP`、`最长上升子序列模型`
- [最长公共子序列](/solution/1100-1199/1143.Longest%20Common%20Subsequence/README.md) - `线性 DP`、`最长公共子序列模型`
- [两个字符串的最小 ASCII 删除和](/solution/0700-0799/0712.Minimum%20ASCII%20Delete%20Sum%20for%20Two%20Strings/README.md) - `线性 DP`、`最长公共子序列模型`
- [两个字符串的删除操作](/solution/0500-0599/0583.Delete%20Operation%20for%20Two%20Strings/README.md) - `线性 DP`、`最长公共子序列模型`
- [目标和](/solution/0400-0499/0494.Target%20Sum/README.md) - `0-1 背包问题`
- [分割等和子集](/solution/0400-0499/0416.Partition%20Equal%20Subset%20Sum/README.md) - `0-1 背包问题`
- [最后一块石头的重量 II](/solution/1000-1099/1049.Last%20Stone%20Weight%20II/README.md) - `0-1 背包问题`
- [零钱兑换](/solution/0300-0399/0322.Coin%20Change/README.md) - `完全背包问题`
- [组合总和 Ⅳ](/solution/0300-0399/0377.Combination%20Sum%20IV/README.md) - `完全背包问题`
- [从栈中取出 K 个硬币的最大面值和](/solution/2200-2299/2218.Maximum%20Value%20of%20K%20Coins%20From%20Piles/README.md) - `分组背包问题`
- [数字 1 的个数](/solution/0200-0299/0233.Number%20of%20Digit%20One/README.md) - `数位 DP`、`记忆化搜索`
- [统计各位数字都不同的数字个数](/solution/0300-0399/0357.Count%20Numbers%20with%20Unique%20Digits/README.md) - `数位 DP`、`记忆化搜索`、`状态压缩`
- [不含连续 1 的非负整数](/solution/0600-0699/0600.Non-negative%20Integers%20without%20Consecutive%20Ones/README.md) - `数位 DP`、`记忆化搜索`
- [旋转数字](/solution/0700-0799/0788.Rotated%20Digits/README.md) - `数位 DP`、`记忆化搜索`
- [最大为 N 的数字组合](/solution/0900-0999/0902.Numbers%20At%20Most%20N%20Given%20Digit%20Set/README.md) - `数位 DP`、`记忆化搜索`
- [统计特殊整数](/solution/2300-2399/2376.Count%20Special%20Integers/README.md) - `数位 DP`、`记忆化搜索`
<!-- 背包问题、状态机模型、状压DP、区间DP、树形DP、数位DP 待补充 -->
### 5. 高级数据结构
- [二维网格图中探测环](/solution/1500-1599/1559.Detect%20Cycles%20in%202D%20Grid/README.md) - `并查集`、`检测环`
- [除法求值](/solution/0300-0399/0399.Evaluate%20Division/README.md) - `并查集`、`权值维护`
- [由斜杠划分区域](/solution/0900-0999/0959.Regions%20Cut%20By%20Slashes/README.md) - `并查集`、`连通分量个数`
- [水位上升的泳池中游泳](/solution/0700-0799/0778.Swim%20in%20Rising%20Water/README.md) - `并查集`
- [交换字符串中的元素](/solution/1200-1299/1202.Smallest%20String%20With%20Swaps/README.md) - `并查集`
- [打砖块](/solution/0800-0899/0803.Bricks%20Falling%20When%20Hit/README.md) - `并查集`、`逆向思维`
- [尽量减少恶意软件的传播 II](/solution/0900-0999/0928.Minimize%20Malware%20Spread%20II/README.md) - `并查集`、`逆向思维`
- [检查边长度限制的路径是否存在](/solution/1600-1699/1697.Checking%20Existence%20of%20Edge%20Length%20Limited%20Paths/README.md) - `并查集`、`离线思维`
- [保证图可完全遍历](/solution/1500-1599/1579.Remove%20Max%20Number%20of%20Edges%20to%20Keep%20Graph%20Fully%20Traversable/README.md) - `双并查集`
- [区域和检索 - 数组可修改](/solution/0300-0399/0307.Range%20Sum%20Query%20-%20Mutable/README.md) - `树状数组`、`线段树`
- [通过指令创建有序数组](/solution/1600-1699/1649.Create%20Sorted%20Array%20through%20Instructions/README.md) - `树状数组`、`线段树`
- [统计数组中好三元组数目](/solution/2100-2199/2179.Count%20Good%20Triplets%20in%20an%20Array/README.md) - `树状数组`、`线段树`
- [最多 K 次交换相邻数位后得到的最小整数](/solution/1500-1599/1505.Minimum%20Possible%20Integer%20After%20at%20Most%20K%20Adjacent%20Swaps%20On%20Digits/README.md) - `树状数组`
- [二维区域和检索 - 可变](/solution/0300-0399/0308.Range%20Sum%20Query%202D%20-%20Mutable/README.md) - `二维树状数组`、`线段树`
- [计算右侧小于当前元素的个数](/solution/0300-0399/0315.Count%20of%20Smaller%20Numbers%20After%20Self/README.md) - `离散化树状数组`、`线段树`
- [区间和的个数](/solution/0300-0399/0327.Count%20of%20Range%20Sum/README.md) - `离散化树状数组`、`线段树`
- [翻转对](/solution/0400-0499/0493.Reverse%20Pairs/README.md) - `离散化树状数组`、`分治归并`、`线段树`
- [最长递增子序列的个数](/solution/0600-0699/0673.Number%20of%20Longest%20Increasing%20Subsequence/README.md) - `离散化树状数组`、`区间最值问题`
- [奇妙序列](/solution/1600-1699/1622.Fancy%20Sequence/README.md) - `动态开点线段树`、`懒标记`
- [Range 模块](/solution/0700-0799/0715.Range%20Module/README.md) - `动态开点线段树`、`懒标记`
- [我的日程安排表 III](/solution/0700-0799/0732.My%20Calendar%20III/README.md) - `动态开点线段树`、`懒标记`
- [每天绘制的新区域数量](/solution/2100-2199/2158.Amount%20of%20New%20Area%20Painted%20Each%20Day/README.md) - `动态开点线段树`、`懒标记`、`区间染色模型`
- [由单个字符重复的最长子字符串](/solution/2200-2299/2213.Longest%20Substring%20of%20One%20Repeating%20Character/README.md) - `线段树`、`动态最大子段和模型`
- [矩形面积 II](/solution/0800-0899/0850.Rectangle%20Area%20II/README.md) - `线段树`、`离散化`、`扫描线`
### 6. 图论
- [网络延迟时间](/solution/0700-0799/0743.Network%20Delay%20Time/README.md) - `最短路`、`Dijkstra 算法`、`Bellman Ford 算法`、`SPFA 算法`
- [得到要求路径的最小带权子图](/solution/2200-2299/2203.Minimum%20Weighted%20Subgraph%20With%20the%20Required%20Paths/README.md) - `最短路`、`Dijkstra 算法`
- [连接所有点的最小费用](/solution/1500-1599/1584.Min%20Cost%20to%20Connect%20All%20Points/README.md) - `最小生成树`、`Prim 算法`、`Kruskal 算法`
- [最低成本联通所有城市](/solution/1100-1199/1135.Connecting%20Cities%20With%20Minimum%20Cost/README.md) - `最小生成树`、`Kruskal 算法`、`并查集`
- [水资源分配优化](/solution/1100-1199/1168.Optimize%20Water%20Distribution%20in%20a%20Village/README.md) - `最小生成树`、`Kruskal 算法`、`并查集`
- [找到最小生成树里的关键边和伪关键边](/solution/1400-1499/1489.Find%20Critical%20and%20Pseudo-Critical%20Edges%20in%20Minimum%20Spanning%20Tree/README.md) - `最小生成树`、`Kruskal 算法`、`并查集`
- [判断二分图](/solution/0700-0799/0785.Is%20Graph%20Bipartite/README.md) - `染色法判定二分图`、`并查集`
<!-- 待补充
### 7. 数学知识
-->
## 加入我们
刷编程题的最大好处就是可以锻炼解决问题的思维能力。相信我,「如何去思考」 本身也是一项需要不断学习和练习的技能。非常感谢前微软工程师、现蚂蚁金服技术专家 [@kfstorm](https://github.com/kfstorm) 贡献了本项目的所有 [C# 题解](https://github.com/doocs/leetcode/pull/245)。
如果你对本项目感兴趣,并且希望加入我们刷题小分队,欢迎随时提交 [PR](https://github.com/doocs/leetcode/pulls)。请参考如下步骤:
1. 将本项目 fork 到你的个人 GitHub 帐户,然后 clone 到你的本地机器;
1. 进入 leetcode 目录,切换到一个新的分支;
1. 对项目做出一些变更,然后使用 git add、commit、push 等命令将你的本地变更提交到你的远程 GitHub 仓库;
1. 将你的变更以 PR 的形式提交过来,项目的维护人员会在第一时间对你的变更进行 review!
1. 你也可以参考帮助文档 https://help.github.com/cn 了解更多细节。
<p align="center">
<a href="https://github.com/doocs/leetcode"><img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/leetcode@main/images/how-to-contribute.svg" alt="how-to-contribute"></a>
</p>
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=149001365&machine=basicLinux32gb&location=SoutheastAsia)
## Stars 趋势
<!-- 使用 https://starchart.cc/ 自动刷新 stars 数据,若有问题,可以使用 GitHub Action: starcharts.yml -->
<!-- <a href="https://github.com/doocs/leetcode/stargazers" target="_blank"><img src="https://starchart.cc/doocs/leetcode.svg" alt="Stargazers over time" /></a> -->
<!-- [![Star History Chart](https://api.star-history.com/svg?repos=doocs/leetcode&type=Date)](https://star-history.com/#doocs/leetcode) -->
<a href="https://github.com/doocs/leetcode/stargazers" target="_blank"><img src="./images/starcharts.svg" alt="Stargazers over time" /></a>
## 贡献者
感谢以下所有朋友对本项目的贡献!
<a href="https://github.com/doocs/leetcode/graphs/contributors" target="_blank"><img src="https://contrib.rocks/image?repo=doocs/leetcode&max=500" /></a>
## 赞助者
感谢以下个人、组织对本项目的支持和赞助!
<a href="https://opencollective.com/doocs-leetcode/backers.svg?width=890" target="_blank"><img src="https://opencollective.com/doocs-leetcode/backers.svg?width=890"></a>
<a href="https://opencollective.com/doocs-leetcode/sponsors.svg?width=890" target="_blank"><img src="https://opencollective.com/doocs-leetcode/sponsors.svg?width=890"></a>
> "_You help the developer community practice for interviews, and there is nothing better we could ask for._" -- [Alan Yessenbayev](https://opencollective.com/alan-yessenbayev)
## 推荐者
知名互联网科技博主 [@爱可可-爱生活](https://weibo.com/fly51fly) 微博推荐。
<a href="https://weibo.com/fly51fly" target="_blank"><img src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/images/recommender-fly51fly.png"></a>
## 版权
本项目著作权归 [GitHub 开源社区 Doocs](https://github.com/doocs) 所有,商业转载请联系 @yanglbme 获得授权,非商业转载请注明出处。
## 联系我们
欢迎各位小伙伴们添加 @yanglbme 的个人微信(微信号:YLB0109),备注 「**leetcode**」。后续我们会创建算法、技术相关的交流群,大家一起交流学习,分享经验,共同进步。
| <img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-yanglbme.png" width="260px" align="left"/> |
| ------------------------------------------------------------------------------------------------------------------------------ |
## 许可证
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">知识共享 版权归属-相同方式共享 4.0 国际 公共许可证</a>
| 0 |
prometheus/jmx_exporter | A process for exposing JMX Beans via HTTP for Prometheus consumption | 2014-02-25T10:55:39Z | null | # JMX Exporter
[![Build Status](https://circleci.com/gh/prometheus/jmx_exporter.svg?style=svg)](https://circleci.com/gh/prometheus/jmx_exporter)
JMX to Prometheus exporter: a collector that can configurable scrape and
expose MBeans of a JMX target.
This exporter is intended to be run as a Java Agent, exposing a HTTP server
and serving metrics of the local JVM. It can be also run as a standalone
HTTP server and scrape remote JMX targets, but this has various
disadvantages, such as being harder to configure and being unable to expose
process metrics (e.g., memory and CPU usage).
**Running the exporter as a Java agent is strongly encouraged.**
# Documentation
**Documentation is specific to a release.**
[0.20.0](https://github.com/prometheus/jmx_exporter/tree/release-0.20.0)
[0.19.0](https://github.com/prometheus/jmx_exporter/tree/release-0.19.0)
[0.18.0](https://github.com/prometheus/jmx_exporter/tree/release-0.18.0)
[0.17.2](https://github.com/prometheus/jmx_exporter/tree/release-0.17.2)
# Contributing and community
See [CONTRIBUTING.md](CONTRIBUTING.md) and the [community section](http://prometheus.io/community/) of the Prometheus homepage.
The Prometheus Java community is present on the [CNCF Slack](https://cloud-native.slack.com) on `#prometheus-java`, and we have a fortnightly community call in the [Prometheus public calendar](https://prometheus.io/community/).
# License
Apache License 2.0, see [LICENSE](LICENSE).
| 0 |
dromara/Sa-Token | 这可能是史上功能最全的Java权限认证框架!目前已集成——登录认证、权限认证、分布式Session会话、微服务网关鉴权、单点登录、OAuth2.0、踢人下线、Redis集成、前后台分离、记住我模式、模拟他人账号、临时身份切换、账号封禁、多账号认证体系、注解式鉴权、路由拦截式鉴权、花式token生成、自动续签、同端互斥登录、会话治理、密码加密、jwt集成、Spring集成、WebFlux集成... | 2020-02-03T10:34:29Z | null | <p align="center">
<img alt="logo" src="https://sa-token.cc/logo.png" width="150" height="150">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Sa-Token v1.38.0</h1>
<h4 align="center">一个轻量级 Java 权限认证框架,让鉴权变得简单、优雅!</h4>
<p align="center">
<a href="https://gitee.com/dromara/sa-token/stargazers"><img src="https://gitee.com/dromara/sa-token/badge/star.svg?theme=gvp"></a>
<a href="https://gitee.com/dromara/sa-token/members"><img src="https://gitee.com/dromara/sa-token/badge/fork.svg?theme=gvp"></a>
<a href="https://github.com/dromara/sa-token/stargazers"><img src="https://img.shields.io/github/stars/dromara/sa-token?style=flat-square&logo=GitHub"></a>
<a href="https://github.com/dromara/sa-token/network/members"><img src="https://img.shields.io/github/forks/dromara/sa-token?style=flat-square&logo=GitHub"></a>
<a href="https://github.com/dromara/sa-token/watchers"><img src="https://img.shields.io/github/watchers/dromara/sa-token?style=flat-square&logo=GitHub"></a>
<a href="https://github.com/dromara/sa-token/issues"><img src="https://img.shields.io/github/issues/dromara/sa-token.svg?style=flat-square&logo=GitHub"></a>
<a href="https://github.com/dromara/sa-token/blob/master/LICENSE"><img src="https://img.shields.io/github/license/dromara/sa-token.svg?style=flat-square"></a>
</p>
<!-- <p align="center">学习测试请拉取 master 分支,dev 是在开发分支 (在根目录执行 `git checkout master`)</p> -->
<p align="center"><a href="https://sa-token.cc" target="_blank">在线文档:https://sa-token.cc</a></p>
---
### Sa-Token 介绍
Sa-Token 是一个轻量级 Java 权限认证框架,目前拥有五大核心模块:登录认证、权限认证、单点登录、OAuth2.0、微服务鉴权。
<details>
<summary><b>简单示例展示:(点击展开 / 折叠)</b></summary>
Sa-Token 旨在以简单、优雅的方式完成系统的权限认证部分,以登录认证为例,你只需要:
``` java
// 会话登录,参数填登录人的账号id
StpUtil.login(10001);
```
无需实现任何接口,无需创建任何配置文件,只需要这一句静态代码的调用,便可以完成会话登录认证。
如果一个接口需要登录后才能访问,我们只需调用以下代码:
``` java
// 校验当前客户端是否已经登录,如果未登录则抛出 `NotLoginException` 异常
StpUtil.checkLogin();
```
在 Sa-Token 中,大多数功能都可以一行代码解决:
踢人下线:
``` java
// 将账号id为 10077 的会话踢下线
StpUtil.kickout(10077);
```
权限认证:
``` java
// 注解鉴权:只有具备 `user:add` 权限的会话才可以进入方法
@SaCheckPermission("user:add")
public String insert(SysUser user) {
// ...
return "用户增加";
}
```
路由拦截鉴权:
``` java
// 根据路由划分模块,不同模块不同鉴权
registry.addInterceptor(new SaInterceptor(handler -> {
SaRouter.match("/user/**", r -> StpUtil.checkPermission("user"));
SaRouter.match("/admin/**", r -> StpUtil.checkPermission("admin"));
SaRouter.match("/goods/**", r -> StpUtil.checkPermission("goods"));
SaRouter.match("/orders/**", r -> StpUtil.checkPermission("orders"));
SaRouter.match("/notice/**", r -> StpUtil.checkPermission("notice"));
// 更多模块...
})).addPathPatterns("/**");
```
当你受够 Shiro、SpringSecurity 等框架的三拜九叩之后,你就会明白,相对于这些传统老牌框架,Sa-Token 的 API 设计是多么的简单、优雅!
</details>
<details>
<summary> <b>核心模块一览:(点击展开 / 折叠)</b> </summary>
- **登录认证** —— 单端登录、多端登录、同端互斥登录、七天内免登录。
- **权限认证** —— 权限认证、角色认证、会话二级认证。
- **踢人下线** —— 根据账号id踢人下线、根据Token值踢人下线。
- **注解式鉴权** —— 优雅的将鉴权与业务代码分离。
- **路由拦截式鉴权** —— 根据路由拦截鉴权,可适配 restful 模式。
- **Session会话** —— 全端共享Session,单端独享Session,自定义Session,方便的存取值。
- **持久层扩展** —— 可集成 Redis,重启数据不丢失。
- **前后台分离** —— APP、小程序等不支持 Cookie 的终端也可以轻松鉴权。
- **Token风格定制** —— 内置六种 Token 风格,还可:自定义 Token 生成策略。
- **记住我模式** —— 适配 [记住我] 模式,重启浏览器免验证。
- **二级认证** —— 在已登录的基础上再次认证,保证安全性。
- **模拟他人账号** —— 实时操作任意用户状态数据。
- **临时身份切换** —— 将会话身份临时切换为其它账号。
- **同端互斥登录** —— 像QQ一样手机电脑同时在线,但是两个手机上互斥登录。
- **账号封禁** —— 登录封禁、按照业务分类封禁、按照处罚阶梯封禁。
- **密码加密** —— 提供基础加密算法,可快速 MD5、SHA1、SHA256、AES 加密。
- **会话查询** —— 提供方便灵活的会话查询接口。
- **Http Basic认证** —— 一行代码接入 Http Basic、Digest 认证。
- **全局侦听器** —— 在用户登陆、注销、被踢下线等关键性操作时进行一些AOP操作。
- **全局过滤器** —— 方便的处理跨域,全局设置安全响应头等操作。
- **多账号体系认证** —— 一个系统多套账号分开鉴权(比如商城的 User 表和 Admin 表)
- **单点登录** —— 内置三种单点登录模式:同域、跨域、同Redis、跨Redis、前后端分离等架构都可以搞定。
- **单点注销** —— 任意子系统内发起注销,即可全端下线。
- **OAuth2.0认证** —— 轻松搭建 OAuth2.0 服务,支持openid模式 。
- **分布式会话** —— 提供共享数据中心分布式会话方案。
- **微服务网关鉴权** —— 适配Gateway、ShenYu、Zuul等常见网关的路由拦截认证。
- **RPC调用鉴权** —— 网关转发鉴权,RPC调用鉴权,让服务调用不再裸奔
- **临时Token认证** —— 解决短时间的 Token 授权问题。
- **独立Redis** —— 将权限缓存与业务缓存分离。
- **Quick快速登录认证** —— 为项目零代码注入一个登录页面。
- **标签方言** —— 提供 Thymeleaf 标签方言集成包,提供 beetl 集成示例。
- **jwt集成** —— 提供三种模式的 jwt 集成方案,提供 token 扩展参数能力。
- **RPC调用状态传递** —— 提供 dubbo、grpc 等集成包,在RPC调用时登录状态不丢失。
- **参数签名** —— 提供跨系统API调用签名校验模块,防参数篡改,防请求重放。
- **自动续签** —— 提供两种Token过期策略,灵活搭配使用,还可自动续签。
- **开箱即用** —— 提供SpringMVC、WebFlux、Solon 等常见框架集成包,开箱即用。
- **最新技术栈** —— 适配最新技术栈:支持 SpringBoot 3.x,jdk 17。
</details>
![sa-token-js](https://color-test.oss-cn-qingdao.aliyuncs.com/sa-token/x/sa-token-js4.png)
### SSO 单点登录
Sa-Token SSO 分为三种模式,解决同域、跨域、共享Redis、跨Redis、前后端一体、前后端分离……等不同架构下的 SSO 接入问题:
| 系统架构 | 采用模式 | 简介 | 文档链接 |
| :-------- | :-------- | :-------- | :-------- |
| 前端同域 + 后端同 Redis | 模式一 | 共享Cookie同步会话 | [文档](https://sa-token.cc/doc.html#/sso/sso-type1)、[示例](https://gitee.com/dromara/sa-token/blob/master/sa-token-demo/sa-token-demo-sso1-client) |
| 前端不同域 + 后端同 Redis | 模式二 | URL重定向传播会话 | [文档](https://sa-token.cc/doc.html#/sso/sso-type2)、[示例](https://gitee.com/dromara/sa-token/blob/master/sa-token-demo/sa-token-demo-sso2-client) |
| 前端不同域 + 后端 不同Redis | 模式三 | Http请求获取会话 | [文档](https://sa-token.cc/doc.html#/sso/sso-type3)、[示例](https://gitee.com/dromara/sa-token/blob/master/sa-token-demo/sa-token-demo-sso3-client) |
1. 前端同域:就是指多个系统可以部署在同一个主域名之下,比如:`c1.domain.com`、`c2.domain.com`、`c3.domain.com`
2. 后端同Redis:就是指多个系统可以连接同一个Redis。(此处并非要所有项目数据都放在一个Redis中,Sa-Token提供 **`[权限缓存与业务缓存分离]`** 的解决方案)
3. 如果既无法做到前端同域,也无法做到后端同Redis,可以走模式三,Http请求校验 ticket 获取会话。
4. 提供 NoSdk 模式示例,不使用 Sa-Token 的系统也可以对接。
5. 提供 sso-server 接口文档,不使用 java 语言的系统也可以对接。
6. 提供前后端分离整合方案:无论是 sso-server 还是 sso-client 的前后端分离都可以整合。
7. 提供安全校验:域名校验、ticket校验、参数签名校验,有效防 ticket 劫持,防请求重放等攻击。
8. 参数防丢:笔者曾试验多个SSO框架,均有参数丢失情况,比如登录前是:`http://a.com?id=1&name=2`,登录成功后就变成了:`http://a.com?id=1`,Sa-Token-SSO 内有专门算法保证了参数不丢失,登录成功后精准原路返回。
9. 提供用户数据同步/迁移方案的建议:开发前统一迁移、运行时实时数据同步、根据关联字段匹配、根据 center_id 字段匹配等。
10. 提供直接可运行的 demo 示例,帮助你快速熟悉 SSO 大致登录流程。
### OAuth2 授权认证
Sa-Token-OAuth2 模块分为四种授权模式,解决不同场景下的授权需求
| 授权模式 | 简介 |
| :-------- | :-------- |
| 授权码(Authorization Code) | OAuth2.0 标准授权步骤,Server 端向 Client 端下放 Code 码,Client 端再用 Code 码换取授权 Token |
| 隐藏式(Implicit) | 无法使用授权码模式时的备用选择,Server 端使用 URL 重定向方式直接将 Token 下放到 Client 端页面 |
| 密码式(Password) | Client直接拿着用户的账号密码换取授权 Token |
| 客户端凭证(Client Credentials)| Server 端针对 Client 级别的 Token,代表应用自身的资源授权 |
详细参考文档:[https://sa-token.cc/doc.html#/oauth2/readme](https://sa-token.cc/doc.html#/oauth2/readme)
### 开源集成案例
- [[ Snowy ]](https://gitee.com/xiaonuobase/snowy):国内首个国密前后分离快速开发平台,采用 Vue3 + AntDesignVue3 + Vite + SpringBoot + Mp + HuTool + SaToken。
- [[ RuoYi-Vue-Plus ]](https://gitee.com/dromara/RuoYi-Vue-Plus):重写RuoYi-Vue所有功能 集成 Sa-Token+Mybatis-Plus+Jackson+Xxl-Job+knife4j+Hutool+OSS 定期同步
- [[ RuoYi-Cloud-Plus ]](https://gitee.com/dromara/RuoYi-Cloud-Plus):重写RuoYi-Cloud所有功能 整合 SpringCloudAlibaba Dubbo3.0 Sa-Token Mybatis-Plus MQ OSS ES Xxl-Job Docker 全方位升级 定期同步
- [[ EasyAdmin ]](https://gitee.com/lakernote/easy-admin):一个基于SpringBoot2 + Sa-Token + Mybatis-Plus + Snakerflow + Layui 的后台管理系统,灵活多变可前后端分离,也可单体,内置代码生成器、权限管理、工作流引擎等
- [[ YC-Framework ]](http://framework.youcongtech.com/):致力于打造一款优秀的分布式微服务解决方案。
- [[ Pig-Satoken ]](https://gitee.com/wchenyang/cloud-satoken):重写 Pig 授权方式为 Sa-Token,其他代码不变。
还有更多优秀开源案例无法逐一展示,请参考:[Awesome-Sa-Token](https://gitee.com/sa-token/awesome-sa-token)
### 友情链接
- [[ OkHttps ]](https://gitee.com/ejlchina-zhxu/okhttps):轻量级 http 通信框架,API无比优雅,支持 WebSocket、Stomp 协议
- [[ Bean Searcher ]](https://github.com/ejlchina/bean-searcher):专注高级查询的只读 ORM,使一行代码实现复杂列表检索!
- [[ Jpom ]](https://gitee.com/dromara/Jpom):简而轻的低侵入式在线构建、自动部署、日常运维、项目监控软件。
- [[ TLog ]](https://gitee.com/dromara/TLog):一个轻量级的分布式日志标记追踪神器。
- [[ hippo4j ]](https://gitee.com/agentart/hippo4j):强大的动态线程池框架,附带监控报警功能。
- [[ hertzbeat ]](https://gitee.com/dromara/hertzbeat):易用友好的开源实时监控告警系统,无需Agent,高性能集群,强大自定义监控能力。
- [[ Solon ]](https://gitee.com/noear/solon):一个更现代感的应用开发框架:更快、更小、更自由。
### 交流群
QQ交流群:685792424 [点击加入](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Y05Ld4125W92YSwZ0gA8e3RhG9Q4Vsfx&authKey=IomXuIuhP9g8G7l%2ByfkrRsS7i%2Fna0lIBpkTXxx%2BQEaz0NNEyJq00kgeiC4dUyNLS&noverify=0&group_code=685792424)
<!-- QQ交流群:936523917 [点击加入](https://qm.qq.com/q/xfoMJA5Az0) -->
微信交流群:
<img src="https://oss.dev33.cn/sa-token/qr/wx-qr-m-400k.png" width="230px" title="微信群" />
<!-- <img src="https://oss.dev33.cn/sa-token/qr/i-wx-qr2.png" width="230px" title="微信群" /> -->
(扫码添加微信,备注:sa-token,邀您加入群聊)
<br>
加入群聊的好处:
- 第一时间收到框架更新通知。
- 第一时间收到框架 bug 通知。
- 第一时间收到新增开源案例通知。
- 和众多大佬一起互相 (huá shuǐ) 交流 (mō yú)。
| 0 |
motianhuo/VCameraDemo | 微信小视频+秒拍,FFmpeg库封装 | 2015-07-13T08:57:50Z | null | ![微信小视频](http://img.blog.csdn.net/20150703110355740)
微信从6.0版本开始推出小视频功能,随着4G网络的出现,视频将会是一个趋势,他能表达出文字所不能表现的东西,增加了微信的黏性。
还记得微信小视频这个功能一推出,如同病毒一样席卷朋友圈。
2016年,4G时代到来,正式宣告进入视频元年,视频直播,短视频类的APP如火如荼, 如果你也正在寻找视频直播,短视频类APP的解决方案,可以下载来参考一下!
![微信小视频](http://a1.eoeandroid.com/attachment/forum/201507/15/161150dwgrgh8e0hmg2d8b.png)
作为爱美的我们,怎么能把我们的窘态暴露给朋友圈的小伙伴呢,必须正能量!美好的!必须美化!
So,录制小视频后,加各种滤镜,炫酷MV主题,妈妈再也不担心我的猪窝了...
![高仿微信 小视频](http://a1.eoeandroid.com/attachment/forum/201507/15/160941j9ztbxxgdxqwxbnt.gif)
PS:gif 图片比较大,如果等不及的童鞋,可以[点击这里查看视频](http://video.weibo.com/show?fid=1034:b50abae7fe8bd291c5fac40d75a1028a)
Download APK
===
<a href="http://42.81.5.134/file3.data.weipan.cn/1078079/436bbc923e1886bc3c82c16ece8a98ddd8ae7a23?ip=1436780160,124.207.56.162&ssig=62aV9bk2ip&Expires=1436781930&KID=sae,l30zoo1wmz&fn=%E9%AB%98%E4%BB%BF%E5%BE%AE%E4%BF%A1.apk&skiprd=2&se_ip_debug=124.207.56.162&corp=2&from=1221134&wsiphost=local">
<img src="https://camo.githubusercontent.com/bdaf711a93d64d0bb5e5abfc346a8b84ea47f164/68747470733a2f2f706c61792e676f6f676c652e636f6d2f696e746c2f656e5f75732f6261646765732f696d616765732f67656e657269632f656e2d706c61792d62616467652e706e67" alt="Get on google play" height="60" border="0" data-canonical-src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" style="max-width:100%;">
</a>
License
-------
Copyright (c) 2015 Juns Alen
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.
| 0 |
yangpeixing/YImagePicker | 小红书多图剪裁+微信图片选择器+大图预览+图片剪裁(支持圆形剪裁和镂空剪裁),已适配androidQ,借鉴并升级matisse加载内核!超强定制性可轻松实现知乎/马蜂窝/微博等特殊样式!支持跨进程回调!内部结构轻量级,无任何第三方开源库!支持support依赖! | 2018-04-09T02:09:19Z | null | ### 关于YImagePicker
[点击查看2.x版本readme](https://github.com/yangpeixing/YImagePicker/blob/master/README_2_x.md)
本文档更新于:2020/4/15 上午10点36分
[ ![Download](https://api.bintray.com/packages/yangpeixing/yimagepicker/androidx/images/download.svg?version=3.1.4) ](https://bintray.com/yangpeixing/yimagepicker/androidx/3.1.4/link)
- 支持小红书多图剪裁、微信多图选择、单图剪裁、多图批量剪裁、大图预览
- 支持自定义所有UI,包括标题栏、底部栏、列表item、文件夹item、剪裁页面、预览页面等
- 支持13种视频图片格式混合加载,支持过滤掉指定格式文件
- 支持大图预览,支持超长图、超大图,拒绝too lagre(已修复单图剪裁长图)
- 支持自定义剪裁比例、剪裁边距、圆形剪裁、镂空/充满剪裁(仿最新微信图片头像选择)
- 支持视频多选和预览
- 支持只选择图片或者视频类型
- 支持恢复上一次选中的图片状态(微信样式)
- 支持屏蔽指定媒体文件(微信样式)
- 选择结果直接回调,拒绝配置ActivityForResult+requestCode,即调用即处理
- 支持选择器调用失败回调
- 支持自定义回调类型
- 支持直接回调媒体相册列表及文件列表
- 支持选择器所有文案修改、国际化定制
- 支持多种特殊需求覆盖,支持自定义选择器拦截事件
- 已全面适配androidQ
- 支持直接拍摄视频、照片等
- 轻量级,aar大小不超过300K,无so库,无任何第三方依赖
- 支持androidx和support
- 永久维护
### 引入依赖
**androidx版本:**
```java
implementation 'com.ypx.yimagepicker:androidx:3.1.4'
```
**support版本:后期可能不再维护,请使用者尽早切换androidx** (support依赖最高兼容28)
```java
implementation 'com.ypx.yimagepicker:support:3.1.4.1'
```
### 核心原理
YImagePicker与主项目通过IPickerPresenter进行交互与解耦,presenter采用序列化接口的方式实现。使用者需要自行实现presenter的方法。选择器回调采用嵌入fragment的方式实现,类似于Glide或RxPermisson.原理上还是使用OnActivityResult,但无需再配置requestCode并且支持跨进程回调。
调用选择器之前必须实现 [IPickerPresenter](https://github.com/yangpeixing/YImagePicker/wiki/Documentation_3.x#自定义IPickerPresenter) 接口
[选择器问题解答汇总](https://github.com/yangpeixing/YImagePicker/wiki/questions)
[点击查看3.x详细API文档](https://github.com/yangpeixing/YImagePicker/wiki/Documentation_3.x)
[apk体验地址 - 密码:123456](https://www.pgyer.com/imagepicker)
### 效果图集
- **demo效果**
![demo效果](https://imgconvert.csdnimg.cn/aHR0cHM6Ly93d3cucGd5ZXIuY29tL2ltYWdlL3ZpZXcvYXBwX3NjcmVlbnNob3RzL2Y5YWUxNmNiNWZmZWFjZGY4OWVmZDA2YzE5MTA4MWIxLTUyOA?x-oss-process=image/format,png)
- **小红书样式**
![小红书样式](https://www.pgyer.com/image/view/app_screenshots/5378234cde61dec8d3823ebbbfa0255a-528)
![小红书样式](https://app-screenshot.pgyer.com/image/view/app_screenshots/87b43cb9ef8f40377bc3910b3ad3737b-528)
![小红书样式](https://www.pgyer.com/image/view/app_screenshots/9f6ccada146068692fda0e30b7a5df18-528)
- **微信样式**
![微信样式](https://www.pgyer.com/image/view/app_screenshots/825b3d168d70ab4539aed61af6be7f36-528)
![微信样式](https://app-screenshot.pgyer.com/image/view/app_screenshots/21145d344498c57954704bde3e0e7dfc-528)
![微信样式](https://www.pgyer.com/image/view/app_screenshots/1ec0113d850e5ee9917172a447c2737f-528)
- **自定义样式**
![自定义样式](https://www.pgyer.com/image/view/app_screenshots/74e132b3b997df394a41f0c0b8622467-528)
![自定义样式](https://app-screenshot.pgyer.com/image/view/app_screenshots/57a62bcc84844400878fdb343cf762e8-528)
- **自定义比例剪裁**
![自定义比例剪裁](https://app-screenshot.pgyer.com/image/view/app_screenshots/15483adb087360ff49e831cb988adce1-528)
![自定义比例剪裁](https://app-screenshot.pgyer.com/image/view/app_screenshots/4cf64a6afb74b6457103bd04debb7e58-528)
- **多图剪裁页面(仿aloha)**
![aloha](https://www.pgyer.com/image/view/app_screenshots/a35c837bd25612c9b04f097f99457d62-528)
### 微信图片选择
支持视频、GIF、长图选择,支持选择状态保存。调用前请按照demo实现IPickerPresenter接口 ,示例如下:
[WeChatPresenter](https://github.com/yangpeixing/YImagePicker/blob/master/YPX_ImagePicker_androidx/app/src/main/java/com/ypx/imagepickerdemo/style/WeChatPresenter.java)
```java
ImagePicker.withMulti(new WeChatPresenter())//指定presenter
//设置选择的最大数
.setMaxCount(9)
//设置列数
.setColumnCount(4)
//设置要加载的文件类型,可指定单一类型
.mimeTypes(MimeType.ofAll())
//设置需要过滤掉加载的文件类型
.filterMimeTypes(MimeType.GIF)
.showCamera(true)//显示拍照
.setPreview(true)//开启预览
//大图预览时是否支持预览视频
.setPreviewVideo(true)
//设置视频单选
.setVideoSinglePick(true)
//设置图片和视频单一类型选择
.setSinglePickImageOrVideoType(true)
//当单选或者视频单选时,点击item直接回调,无需点击完成按钮
.setSinglePickWithAutoComplete(false)
//显示原图
.setOriginal(true)
//显示原图时默认原图选项开关
.setDefaultOriginal(false)
//设置单选模式,当maxCount==1时,可执行单选(下次选中会取消上一次选中)
.setSelectMode(SelectMode.MODE_SINGLE)
//设置视频可选取的最大时长,同时也是视频可录制的最大时长
.setMaxVideoDuration(1200000L)
//设置视频可选取的最小时长
.setMinVideoDuration(60000L)
//设置上一次操作的图片列表,下次选择时默认恢复上一次选择的状态
.setLastImageList(null)
//设置需要屏蔽掉的图片列表,下次选择时已屏蔽的文件不可选择
.setShieldList(null)
.pick(this, new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//图片选择回调,主线程
}
});
```
### 小红书图片选择
高仿小红书图片剪裁框架,支持视频以及多图剪裁、支持视频预览,支持UI自定义,支持fragment样式侵入。调用前请按照demo实现IPickerPresenter接口 ,示例如下:
[RedBookPresenter](https://github.com/yangpeixing/YImagePicker/blob/master/YPX_ImagePicker_androidx/app/src/main/java/com/ypx/imagepickerdemo/style/RedBookPresenter.java)
```java
ImagePicker.withCrop(new RedBookPresenter())//设置presenter
.setMaxCount(9)//设置选择数量
.showCamera(true)//设置显示拍照
.setColumnCount(4)//设置列数
.mimeTypes(MimeType.ofImage())//设置需要加载的文件类型
.filterMimeTypes(MimeType.GIF)//设置需要过滤掉的文件类型
.assignGapState(false)//强制留白模式
.setFirstImageItem(null)//设置上一次选中的图片
.setFirstImageItemSize(1,1)//设置上一次选中的图片地址
.setVideoSinglePick(true)//设置视频单选
.setMaxVideoDuration(1200000L)//设置可选区的最大视频时长
.setMinVideoDuration(60000L)//设置视频可选取的最小时长
.pick(this, new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//图片剪裁回调,主线程
//注意:剪裁回调里的ImageItem中getCropUrl()才是剪裁过后的图片地址
}
});
```
### 预览
支持多图预览和自定义预览界面,支持加载大图,超长图和高清图,示例如下:
```java
//配置需要预览的所有图片列表,其中imageitem可替换为Uri或者String(绝对路径)
ArrayList<ImageItem> allPreviewImageList = new ArrayList<>();
//默认选中的图片索引
int defaultPosition = 0;
//开启预览
ImagePicker.preview(this, new WXImgPickerPresenter(), allPreviewImageList, defaultPosition, new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//图片编辑回调,主线程
}
});
```
### 拍照 3.1版本已变更
支持直接打开摄像头拍照,3.1版本去除了原有的拍照保存路径,新增了isCopyInDCIM入参,代表是否将拍照的图片copy一份到外部DCIM目录中
因为安卓Q禁止直接写入文件到系统DCIM文件下,所以拍照入参必须是私有目录路径.所以废弃掉原有的imagepath入参
如果想让拍摄的照片写入外部存储中,则需要copy一份文件到DCIM目录中并刷新媒体库
示例如下:
```java
String name="图片名称,不要加后缀";//可为null
boolean isCopyInDCIM=true;//copy一份保存到系统相册文件
ImagePicker.takePhoto(this,name,isCopyInDCIM, new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//拍照回调,主线程
}
});
```
### 拍摄视频 3.1版本已变更
支持直接打开摄像头拍视频,3.1已变更,变更理由参考拍照 示例如下:
```java
String name="视频名称,不要加后缀";//可为null
long maxDuration=10000l;//可录制的最大时常,单位毫秒ms
boolean isCopyInDCIM=true;//copy一份保存到系统相册文件
ImagePicker.takeVideo(this,name,maxDuration, isCopyInDCIM,new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//视频回调,主线程
}
});
```
### 调用选择器并剪裁
支持选择图片完调用剪裁,支持自定义比例剪裁,支持圆形剪裁,示例如下:
```java
ImagePicker.withMulti(new WeChatPresenter())
.mimeTypes(MimeType.ofImage())
.filterMimeTypes(MimeType.GIF)
//剪裁完成的图片是否保存在DCIM目录下
//true:存储在DCIM下 false:存储在 data/包名/files/imagePicker/ 目录下
.cropSaveInDCIM(false)
//设置剪裁比例
.setCropRatio(1,1)
//设置剪裁框间距,单位px
.cropRectMinMargin(50)
//是否圆形剪裁,圆形剪裁时,setCropRatio无效
.cropAsCircle()
//设置剪裁模式,留白或充满 CropConfig.STYLE_GAP 或 CropConfig.STYLE_FILL
.cropStyle(CropConfig.STYLE_FILL)
//设置留白模式下生成的图片背景色,支持透明背景
.cropGapBackgroundColor(Color.TRANSPARENT)
.crop(this, new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//图片剪裁回调,主线程
}
});
```
### 拍照并剪裁
支持直接打开摄像头拍照并剪裁,支持自定义比例剪裁和圆形剪裁,示例如下:
```java
//配置剪裁属性
CropConfig cropConfig = new CropConfig();
//设置上一次剪裁矩阵位置信息,用于恢复上一次剪裁,Info类型从imageitem或者cropimageview中取,可为null
cropConfig.setCropRestoreInfo(new Info());
//设置剪裁比例
cropConfig.setCropRatio(1, 1);
//设置剪裁框间距,单位px
cropConfig.setCropRectMargin(100);
//是否保存到DCIM目录下,false时会生成在 data/files/imagepicker/ 目录下
cropConfig.saveInDCIM(false);
//是否圆形剪裁,圆形剪裁时,setCropRatio无效
cropConfig.setCircle(false);
//设置剪裁模式,留白或充满 CropConfig.STYLE_GAP 或 CropConfig.STYLE_FILL
cropConfig.setCropStyle(CropConfig.STYLE_GAP);
//设置留白模式下生成的图片背景色,支持透明背景
cropConfig.setCropGapBackgroundColor(Color.TRANSPARENT );
//调用拍照
ImagePicker.takePhotoAndCrop(this, new WXImgPickerPresenter(), cropConfig,
new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//剪裁回调,主线程
}
});
```
### 直接剪裁
支持直接跳转剪裁页面,示例如下:
```java
CropConfig cropConfig = new CropConfig();
//设置上一次剪裁矩阵位置信息,用于恢复上一次剪裁,Info类型从imageitem或者cropimageview中取,可为null
cropConfig.setCropRestoreInfo(new Info());
//设置剪裁比例
cropConfig.setCropRatio(1, 1);
//设置剪裁框间距,单位px
cropConfig.setCropRectMargin(100);
//是否保存到DCIM目录下,false时会生成在 data/files/imagepicker/ 目录下
cropConfig.saveInDCIM(false);
//是否圆形剪裁,圆形剪裁时,setCropRatio无效
cropConfig.setCircle(false);
//设置剪裁模式,留白或充满 CropConfig.STYLE_GAP 或 CropConfig.STYLE_FILL
cropConfig.setCropStyle(CropConfig.STYLE_GAP);
//设置留白模式下生成的图片背景色,支持透明背景
cropConfig.setCropGapBackgroundColor(Color.TRANSPARENT );
//调用剪裁
String needCropImageUrl="需要剪裁的图片路径";
ImagePicker.crop(this, new WXImgPickerPresenter(), cropConfig, needCropImageUrl,
new OnImagePickCompleteListener() {
@Override
public void onImagePickComplete(ArrayList<ImageItem> items) {
//剪裁回调,主线程
}
});
```
### 提供媒体数据——支持回调相册数据、所有媒体数据、指定相册内媒体数据
#### 获取媒体相册数据
```java
//指定要回调的相册类型,可以指定13种图片视频文件格式混合
Set<MimeType> mimeTypes = MimeType.ofAll();
ImagePicker.provideMediaSets(this, mimeTypes, new MediaSetsDataSource.MediaSetProvider() {
@Override
public void providerMediaSets(ArrayList<ImageSet> imageSets) {
//相册列表回调,主线程
}
});
```
#### 获取全部媒体文件
```java
//指定要回调的相册类型,可以指定13种图片视频文件格式混合
Set<MimeType> mimeTypes = MimeType.ofAll();
ImagePicker.provideAllMediaItems(this, mimeTypes, new MediaItemsDataSource.MediaItemProvider() {
@Override
public void providerMediaItems(ArrayList<ImageItem> imageItems, ImageSet allVideoSet) {
//全部媒体数据回调,主线程
//只有当mimeTypes既包含图片或者视频格式文件时,allVideoSet才有值
}
});
```
#### 获取指定相册内全部媒体文件
```java
//指定要回调的相册类型,可以指定13种图片视频文件格式混合
Set<MimeType> mimeTypes = MimeType.ofAll();
//指定相册,id不能为空
ImageSet imageSet = new ImageSet();
ImagePicker.provideMediaItemsFromSet(this, imageSet, mimeTypes, new MediaItemsDataSource.MediaItemProvider() {
@Override
public void providerMediaItems(ArrayList<ImageItem> imageItems, ImageSet allVideoSet) {
//全部媒体数据回调,主线程
//只有当mimeTypes既包含图片或者视频格式文件时,allVideoSet才有值
}
});
```
#### 预加载获取指定相册内全部媒体文件
```java
//指定要回调的相册类型,可以指定13种图片视频文件格式混合
Set<MimeType> mimeTypes = MimeType.ofAll();
//指定相册,id不能为空
ImageSet imageSet = new ImageSet();
//预加载个数
int preloadSize = 40;
ImagePicker.provideMediaItemsFromSetWithPreload(this, imageSet, mimeTypes, preloadSize,
new MediaItemsDataSource.MediaItemPreloadProvider() {
@Override
public void providerMediaItems(ArrayList<ImageItem> imageItems) {
//预加载回调,预先加载指定数目的媒体文件回调
}
},
new MediaItemsDataSource.MediaItemProvider() {
@Override
public void providerMediaItems(ArrayList<ImageItem> imageItems, ImageSet allVideoSet) {
//所有媒体文件回调
}
});
```
### 使用前请务必阅读[选择器问题解答汇总](https://github.com/yangpeixing/YImagePicker/wiki/questions)以及 [3.x使用文档](https://github.com/yangpeixing/YImagePicker/wiki/Documentation_3.x)
### 版本记录
[查看详细版本记录](https://github.com/yangpeixing/YImagePicker/wiki/YImagePicker版本记录)
#### 3.1.4版本 [2020.04.15]
1. 修复3.1.3版本path取不到绝对路径问题
2. 修复quicktime类型视频无法过滤的问题
#### 3.1.3版本 [2020.04.09]
1. 修复安卓10上全部视频文件夹缩略图不展示
2. 修复安卓10上部分手机上部分图片无法展示问题
3. 修复大图预览放大缩小卡顿问题
4. 彻底修复toolarge闪退
5. 优化了图片剪裁预览质量
6. 修复预览界面无法预览视频问题
7. 预览支持自定义预览item,可根据图片还是视频动态显示布局
8. presenter的interceptItemClick方法新增isClickCheckBox入参,代表拦截的对象是否是点击右上角checkbox
9. 新增showCameraOnlyInAllMediaSet方法代表是否只在全部文件夹里才展示拍照item,其他文件夹不展示
10. imageitem新增displayName字段代表文件名称
11. 其他更多细节优化
#### 3.1版本 [2020.02.24]
1. [优化]isOriginalImage加入到imageitem里
2. [变更]自定义文本统一,删除了PickerConstants类,presenter中无需对选择器文案进行修改,若需要修改文案,则直接复制imagepicker中string文件,另外demo已覆盖英文适配
3. [优化]多图剪裁已加入demo(AlohaActivity)
4. [bug修复]长图剪裁崩溃问题
5. [bug修复]关闭屏幕旋转问题
6. [新增]新增setDefaultOriginal用于设置此次打开选择器的默认原图开关
7. [新增]单图剪裁支持保存状态,下次恢复
8. [新增]录制视频添加最大时长配置
9. [优化]完全兼容androudQ拍照问题
10. [新增]UiPickerConfig新增主题色设置
11. [优化]demo架构调整,使用者参考更清晰
### 下个版本排期
时间:暂定2020年5月中旬
1. [剪裁支持输出大小](https://github.com/yangpeixing/YImagePicker/issues/19)
2. [剪裁支持旋转(尽量)](https://github.com/yangpeixing/YImagePicker/issues/32)
3. [文件大小加载限制](https://github.com/yangpeixing/YImagePicker/issues/41)
4. 支持darkmode模式
5. 支持activity自定义跳转动画
6. 内置新版本微信样式,知乎样式等
7. 支持切换视频底层框架(吐槽:官方videoView太难用了~~/(ㄒoㄒ)/~~)
8. **等你来提**
永不TODO:
1. 不会支持图片压缩,请使用者自行使用luBan
2. 不会支持图片和视频高级编辑(滤镜、贴纸等)
### 感谢
- 本框架媒体库查询部分借鉴于知乎开源框架Matisee,并在其基础上拓展并延伸,让查询更富有定制性,在此对Matisee原作者表示感谢。
- 本库来源于mars App,想要体验城市最新的吃喝玩乐,欢迎读者下载体验mars!
- 感谢所有支持或star本项目的使用者,感谢所有给我提issue的朋友们 !
### 心声
YImagePicker从当初的只支持微信图片选择器到支持小红书样式,再到各种自定义,可谓花费了我近一年多的时光,可能有人觉得这个项目很简单,但是从开源性的角度上来说,很多时候代码不是我们想怎么写就怎么写的。为了达成统一风格,本人也借鉴了不下于20多个图片选择库。但是随着业务的复杂和机型的多样,不得不一遍遍重构,其中带来了不少的问题,也学习到了很多。在我的计划中,本库3.0版本算是一次较大的更新,相比2.x有着更优异的稳定性和定制性。但这绝不是最优版本,随着越来越多的定制化需求,架构可能会面临一次又一次的更新。所以使用者在使用的过程中如果出现各种各样的问题,还请不要放弃本库,可以直接加我联系方式并反馈给我(喷我),如果有更好的建议,也可以给我提request,我们一起完善此框架。最后说一句,没有什么是完美的,但我会力所能及~
- 作者:[calorYang](https://blog.csdn.net/qq_16674697)
- 邮箱:313930500@qq.com
- QQ号: 313930500
- 微信:calor0616
- 博客:[CSDN](https://blog.csdn.net/qq_16674697)
**遇到问题别绕路,QQ微信直接呼~ 您的star就是我前进的动力~🌹** | 0 |
developer-shivam/Crescento | Add curve at bottom of image views and relative layouts. | 2016-11-17T12:08:14Z | null | Crescento
=========
Android library that adds a curve at the below of image views and relative layouts. **CrescentoImageView** and **CrescentoContainer** are the image view and relative layout respectively. You can change the radius of curve with **attribute:curvature**.
[![API](https://img.shields.io/badge/API-11%2B-red.svg)](https://android-arsenal.com/api?level=11)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Crescento-green.svg?style=true)](https://android-arsenal.com/details/1/4684)
[![Android Weekly](https://img.shields.io/badge/Android%20Weekly-%23232-blue.svg)](http://androidweekly.net/issues/issue-232)
[![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23119-yellow.svg)](https://www.androiddevdigest.com/digest-119/)
![Sample Image 2][SampleOneNexus]
Overview
--------
**Crescento** provides following advantages:
* **Curve Bottom**: It adds a curve bottom as stated above.
* **Tint**: It add tint on **CrescentoImageView** by using **attribute:tintColor**. It pick color automatically from the image if **tintMode** is set to **automatic**.
* **Alpha**: Add transparency in tint by using **attribute:tintAlpha**. Varies from 0 to 255.
* **Gradient** : Add gradient on the imageview.
* **Gravity** : You can now add crescento to bottom of your layout. Arc will form on top.
**[Sample Apk]**
Use with **[KenBurnsView]**
---------------------------------------
![Sample Image 1][GifSample]
```java
<developer.shivam.library.CrescentoContainer android:id="@+id/crescentoContainer"
android:layout_width="match_parent"
android:layout_height="300dp"
android:elevation="20dp"
android:scaleType="centerCrop"
attribute:curvature="50dp">
<com.flaviofaria.kenburnsview.KenBurnsView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/wallpaper2" />
</developer.shivam.library.CrescentoContainer>
```
Donations
---------
This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, coffee and beer). Thank you!
**PayPal**
* **[Donate $5]**: Thank's for creating this project, here's a coffee (or some beer) for you!
* **[Donate $10]**: Wow, I am stunned. Let me take you to the movies!
* **[Donate $15]**: I really appreciate your work, let's grab some lunch!
* **[Donate $25]**: That's some awesome stuff you did right there, dinner is on me!
* **[Donate $50]**: I really really want to support this project, great job!
* **[Donate $100]**: You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!
* **[Donate $2799]**: Go buddy, buy Macbook Pro for yourself!
Of course, you can also choose what you want to donate, all donations are awesome!
Demo
----
Here is a very good example of how to use `Crescento`. **Zsolt Szilvai** has made a very good design and I've illustrated using crescento.
https://material.uplabs.com/posts/cinema-application-interface
![Sample of Zsolt Szilvai's design][SampleTwo]
Gradle Integration
------------------
If you are using gradle then add these lines in build.gradle file at project level.
```java
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
Add below lines in build.gradle at app level.
```java
compile 'com.github.developer-shivam:Crescento:1.2.1'
```
Basic Usage
-----------
*For a working implementation, see `/app` folder*
**ImageView**
```xml
<developer.shivam.crescento.ImageView android:id="@+id/crescentoImageView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:elevation="20dp"
android:scaleType="centerCrop"
attribute:gravity="top"
attribute:curvature="50dp"
attribute:crescentoTintMode="manual"
attribute:crescentoTintColor="#FFFFFF"
attribute:tintAlpha="50" />
```
**Container**
```xml
<developer.shivam.crescento.Container android:id="@+id/crescentoContainer"
android:layout_width="match_parent"
android:layout_height="300dp"
android:elevation="20dp"
attribute:curvature="50dp">
<!-- Your code here -->
</developer.shivam.library.CrescentoContainer>
```
Attributes
----------
* **curvature**: To change the size of curve.
* **curvatureDirection** : To change the direction of curvature. Whether **inward** or **outward**.
* **tintColor**: To add tint on image view.
* **tintMode**: To add tint **manually** or **automatically**. If **automatically** it will pick color from image you have set.
* **tintAlpha**: To set the amount of tint. 0 for 100% transparent and 255 for opaque.
* **gradientDirection** : To set the direction of gradient. Supported direction are **TOP_TO_BOTTOM**, **BOTTOM_TO_TOP**, **LEFT_TO_RIGHT** and **RIGHT_TO_LEFT**.
* **gradientStartColor** : gradient start color.
* **gradientEndColor** : gradient end color.
* **gravity** : To set gravity. **TOP** or **BOTTOM**.
Connect With Me
-----------
Shivam Satija (droidsergeant)
<a href="https://plus.google.com/108004024169425288075">
<img alt="Connect me on Google+" src="/art/gplus.png" />
</a>
<a href="https://www.facebook.com/developerShivam">
<img alt="Connect me on Facebook" src="/art/fb.png" width="64" height="64" />
</a>
<a href="https://in.linkedin.com/in/developershivam">
<img alt="Connect me on LinkedIn" src="/art/linkedin.png" />
</a>
Question / Contact Me / Hire Me
---------------------
Please feel free to ping me at **dr.droid27@gmail.com**. Expected package would be **6 lpa**.
License
-------
```
MIT License
Copyright (c) 2016 Shivam Satija
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
[Facebook]: /art/fb.png
[Google+]: /art/gplus.png
[LinkedIn]: /art/linkedin.png
[SampleOne]: /art/sample1_resize.png
[SampleTwo]: /art/sample2.png
[SampleOneNexus]: /art/sample_image.jpg
[GifSample]: /art/sample2.gif
[GifSample2]: /art/sample3.gif
[Donate $5]: https://www.paypal.me/developerShivam/5
[Donate $10]: https://www.paypal.me/developerShivam/10
[Donate $15]: https://www.paypal.me/developerShivam/15
[Donate $25]: https://www.paypal.me/developerShivam/25
[Donate $50]: https://www.paypal.me/developerShivam/50
[Donate $100]: https://www.paypal.me/developerShivam/100
[Donate $2799]: https://www.paypal.me/developerShivam/2799
[Sample Apk]: https://github.com/developer-shivam/crescento/blob/master/demo.apk
[KenBurnsView]: https://github.com/flavioarfaria/KenBurnsView
| 0 |
romainguy/google-io-2014 | Demo for the Material Witness talk I gave at Google I/O. | 2014-06-27T06:18:28Z | null | Material Witness
================
A Google I/O 2014 demo written by Romain Guy [http://www.curious-creature.org](http://www.curious-creature.org)
Material Witness is a sample application for the new Material Design APIs introduced in the Android L Preview SDK:
* Custom theme colors
* Dynamic palette
* Circular reveal
* Activity transitions
And a few other things such as colored status and navigation bars, path tracing, etc.
The complete video of the Google I/O 2014 talk detailing how this application works can be found on [YouTube](https://www.youtube.com/watch?v=97SWYiRtF0Y&feature=youtu.be).
![Material Witness](art/MaterialWitness1.png)
![Material Witness](art/MaterialWitness2.png)
How to use this source code
===========================
The google-io-2014 project can be opened in Android Studio 1.0 or later. It contains a single module
called **app** in the `app/` folder.
The project can be compiled from the command line using Gradle.
The actual source code and resources can be found in `app/src/main/`. The only dependencies are in `app/lib/`.
Source code license
===================
This project is subject to the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).
Library licenses
================
__androidsvg-1.2.0__ is subject to the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).
More information on [the official web site](https://code.google.com/p/androidsvg/).
__android-support-v7-palette__ is subject to the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).
| 0 |
shaohui10086/BottomDialog | BottomDialog is a bottom dialog layout implemented with DialogFragment, Supports pop-up animation, Support any layout | 2016-10-11T09:04:21Z | null | # BottomDialog
[![build](https://img.shields.io/badge/build-1.1.9-brightgreen.svg?maxAge=2592000)](https://bintray.com/shaohui/maven/BottomDialog)
[![license](https://img.shields.io/badge/license-Apache%202-blue.svg?maxAge=2592000)](https://github.com/shaohui10086/BottomDialog/blob/master/LICENSE)
[中文版](/README_ZH.md)
`BottomDialog` is a bottom dialog layout implemented with `DialogFragment`,And supports pop-up animation, support any layout
## Preview
![BottomDialogShare](/preview/bottom_dialog_share.gif)
![BottomDialogShare](/preview/bottom_dialog_edit.gif)
## Import
Maven
<dependency>
<groupId>me.shaohui</groupId>
<artifactId>bottomdialog</artifactId>
<version>1.1.9</version>
<type>pom</type>
</dependency>
or Gradle
compile 'me.shaohui:bottomdialog:1.1.9'
## Uasge
You can use `BottomDialog` in two different ways :
### 1.Use directly `BottomDialog`
A simple three lines of code can be done:
BottomDialog.create(getSupportFragmentManager())
.setLayoutRes(R.layout.dialog_layout) // dialog layout
.show();
Of course, you can also make simple settings:
BottomDialog.create(getSupportFragmentManager())
.setViewListener(new BottomDialog.ViewListener() {
@Override
public void bindView(View v) {
// // You can do any of the necessary the operation with the view
}
})
.setLayoutRes(R.layout.dialog_layout)
.setDimAmount(0.1f) // Dialog window dim amount(can change window background color), range:0 to 1,default is : 0.2f
.setCancelOutside(false) // click the external area whether is closed, default is : true
.setTag("BottomDialog") // setting the DialogFragment tag
.show();
So Easy!
### 2.or extends `BaseBottomDialog` to use
First of all, according to your needs to define a class,extends `BaseBottomDialog`,For example below `ShareBottomDialog`
public class ShareBottomDialog extends BaseBottomDialog{
@Override
public int getLayoutRes() {
return R.layout.dialog_layout;
}
@Override
public void bindView(View v) {
// do any thing you want
}
}
So simple, only two abstract methods needed to achieve, the rest is to add your logic. Of course, you can also rewrite some of the necessary methods to meet your needs, You can manipulate this Dialog as you would a Fragment
int getHeight() // return your bottomDialog height
float getDimAmount() // set dialog dim amount(can change window background color), default is 0.2f
boolean getCancelOutside() // click the external area whether is closed, default is : true
String getFragmentTag() // set dialogFragment tag
The rest is use it:
ShareBottomDialog dialog = new ShareBottomDialog();
dialog.show(getFragmentManager());
That is all!
## Issue
If you are in the process of using, encountered any problems, welcome to put forward issue
## License
Copyright 2016 shaohui10086
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.
| 0 |
sleekbyte/tailor | Cross-platform static analyzer and linter for Swift. | 2015-05-25T02:11:10Z | null | [![Tailor](https://cloud.githubusercontent.com/assets/1350704/9867389/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png)](https://tailor.sh)
<p align="center">
<a href="https://travis-ci.org/sleekbyte/tailor">
<img src="https://travis-ci.org/sleekbyte/tailor.svg?branch=master" alt="Build Status">
</a>
<a href="https://coveralls.io/github/sleekbyte/tailor">
<img src="https://coveralls.io/repos/github/sleekbyte/tailor/badge.svg" alt="Code Coverage">
</a>
<a href="https://codeclimate.com/github/sleekbyte/tailor">
<img src="https://codeclimate.com/github/sleekbyte/tailor/badges/gpa.svg" alt="Code Climate">
</a>
</p>
<p align="center">
<a href="https://github.com/sleekbyte/tailor/wiki">Wiki</a>
•
<a href="#installation">Installation</a>
•
<a href="#usage">Usage</a>
•
<a href="#features">Features</a>
•
<a href="#developers">Developers</a>
•
<a href="#license">License</a>
</p>
[Tailor][] is a cross-platform [static analysis][] and [lint][] tool for source code written in Apple's [Swift][] programming language. It analyzes your code to ensure consistent styling and help avoid bugs.
[static analysis]: https://en.wikipedia.org/wiki/Static_program_analysis
[lint]: https://en.wikipedia.org/wiki/Lint_(software)
## [Tailor][]. Cross-platform static analyzer and linter for [Swift][].
[Tailor]: https://tailor.sh
[Swift]: https://swift.org
Tailor supports Swift 3.0.1 out of the box and helps enforce style guidelines outlined in the [The Swift Programming Language][], [GitHub][], [Ray Wenderlich][], and [Coursera][] style guides. It supports cross-platform usage and can be run on Mac OS X via your shell or integrated with Xcode, as well as on Linux and Windows.
[The Swift Programming Language]: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/
[GitHub]: https://github.com/github/swift-style-guide
[Ray Wenderlich]: https://github.com/raywenderlich/swift-style-guide
[Coursera]: https://github.com/coursera/swift-style-guide
Tailor parses Swift source code using the primary Java target of [ANTLR](http://www.antlr.org):
> ANTLR is a powerful parser generator [ . . . ] widely used in academia and industry to build all sorts of languages, tools, and frameworks.
— [About the ANTLR Parser Generator](http://www.antlr.org/about.html)
# Getting Started
## Installation
Requires Java (JRE or JDK) Version 8 or above: [Java SE Downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
### [Homebrew](http://brew.sh), [Linuxbrew](http://linuxbrew.sh)
```bash
brew install tailor
```
### Mac OS X (10.10+), Linux
```bash
curl -fsSL https://tailor.sh/install.sh | sh
```
### Windows (10+)
```powershell
iex (new-object net.webclient).downloadstring('https://tailor.sh/install.ps1')
```
### Manually
You may also download Tailor via [GitHub Releases](https://github.com/sleekbyte/tailor/releases), extract the archive, and symlink the `tailor/bin/tailor` shell script to a location in your `$PATH`.
### Continuous Integration
If your continuous integration server supports [Homebrew](http://brew.sh) installation, you may use the following snippet:
```yaml
before_install:
- brew update
- brew install tailor
```
In other cases, use this snippet:
Replace `${TAILOR_RELEASE_ARCHIVE}` with the URL of the release you would like to install, e.g. `https://github.com/sleekbyte/tailor/releases/download/v0.1.0/tailor.tar`.
```yaml
before_script:
- wget ${TAILOR_RELEASE_ARCHIVE} -O /tmp/tailor.tar
- tar -xvf /tmp/tailor.tar
- export PATH=$PATH:$PWD/tailor/bin/
```
## Usage
Run Tailor with a list of files and directories to analyze, or via Xcode.
```bash
$ tailor [options] [--] [[file|directory] ...]
```
Help for Tailor is accessible via the `[-h|--help]` option.
```
$ tailor -h
Usage: tailor [options] [--] [[file|directory] ...]
Perform static analysis on Swift source files.
Invoking Tailor with at least one file or directory will analyze all Swift files at those paths. If
no paths are provided, Tailor will analyze all Swift files found in '$SRCROOT' (if defined), which
is set by Xcode when run in a Build Phase. Tailor may be set up as an Xcode Build Phase
automatically with the --xcode option.
Options:
-c,--config=<path/to/.tailor.yml> specify configuration file
--debug print ANTLR error messages when parsing error occurs
--except=<rule1,rule2,...> run all rules except the specified ones
-f,--format=<xcode|json|cc|html> select an output format
-h,--help display help
--invert-color invert colorized console output
-l,--max-line-length=<0-999> maximum Line length (in characters)
--list-files display Swift source files to be analyzed
--max-class-length=<0-999> maximum Class length (in lines)
--max-closure-length=<0-999> maximum Closure length (in lines)
--max-file-length=<0-999> maximum File length (in lines)
--max-function-length=<0-999> maximum Function length (in lines)
--max-name-length=<0-999> maximum Identifier name length (in characters)
--max-severity=<error|warning (default)> maximum severity
--max-struct-length=<0-999> maximum Struct length (in lines)
--min-name-length=<1-999> minimum Identifier name length (in characters)
--no-color disable colorized console output
--only=<rule1,rule2,...> run only the specified rules
--purge=<1-999> reduce memory usage by clearing DFA cache after
specified number of files are parsed
--show-rules show description for each rule
-v,--version display version
--xcode=<path/to/project.xcodeproj> add Tailor Build Phase Run Script to Xcode Project
```
# Features
* [Enabling and Disabling Rules](#enabling-and-disabling-rules)
* [Cross-Platform](#cross-platform)
* [Automatic Xcode Integration](#automatic-xcode-integration)
* [Colorized Output](#colorized-output)
* [Warnings, Errors, and Failing the Build](#warnings-errors-and-failing-the-build)
* [Disable Violations within Source Code](#disable-violations-within-source-code)
* [Configuration](#configuration)
* [Formatters](#formatters)
## Enabling and Disabling Rules
Rule identifiers and "preferred/not preferred" code samples may be found on the [Rules](https://github.com/sleekbyte/tailor/wiki/Rules) page.
Rules may be individually disabled (blacklist) or enabled (whitelist) via the `--except` and `--only` command-line flags.
### Except
```bash
tailor --except=brace-style,trailing-whitespace main.swift
```
### Only
```bash
tailor --only=redundant-parentheses,terminating-semicolon main.swift
```
## Cross-Platform
Tailor may be used on Mac OS X via your shell or integrated with Xcode, as well as on Linux and Windows.
### Linux
![Tailor on Ubuntu](https://cloud.githubusercontent.com/assets/1350704/9894130/2b959794-5bee-11e5-9ed2-84d035895239.png)
### Windows
![Tailor on Windows](https://cloud.githubusercontent.com/assets/1791760/9913016/2ff0e9a8-5cc8-11e5-8722-d5a6f9d84027.PNG)
## Automatic Xcode Integration
Tailor can be integrated with Xcode projects using the `--xcode` option.
```bash
tailor --xcode /path/to/demo.xcodeproj/
```
This adds the following Build Phase Run Script to your project's default target.
![Run Script](https://cloud.githubusercontent.com/assets/1350704/11074861/5bae6b24-87f2-11e5-8167-4328b9b01174.png)
Tailor's output will be displayed inline within the Xcode Editor Area and as a list in the Log Navigator.
![Xcode messages](https://cloud.githubusercontent.com/assets/1350704/11017260/b79cb162-8599-11e5-94fa-e7cf77fdc657.png)
### Configure Xcode to Analyze Code Natively (⇧⌘B)
1. Add a new configuration, say `Analyze`, to the project
<img width="1020" alt="screen shot 2016-11-30 at 12 29 34 am" src="https://cloud.githubusercontent.com/assets/1791760/20745188/fba98222-b694-11e6-8212-038333b259b3.png">
2. Modify the active scheme's `Analyze` phase to use the new build configuration created above
<img width="899" alt="screen shot 2016-11-30 at 12 37 08 am" src="https://cloud.githubusercontent.com/assets/1791760/20745259/57e71acc-b695-11e6-9671-092f89029467.png">
3. Tweak the build phase run script to run Tailor **only** when analyzing the project (⇧⌘B)
```bash
if [ "${CONFIGURATION}" = "Analyze" ]; then
if hash tailor 2>/dev/null; then
tailor
else
echo "warning: Please install Tailor from https://tailor.sh"
fi
fi
```
## Colorized Output
Tailor uses the following color schemes to format CLI output:
* **Dark theme** (enabled by default)
![Dark theme](https://cloud.githubusercontent.com/assets/1791760/9807444/fde82de6-5870-11e5-9e20-05a9d736e136.png)
* **Light theme** (enabled via `--invert-color` option)
![Light theme](https://cloud.githubusercontent.com/assets/1791760/9807312/129ce45e-586f-11e5-8e26-fe818af0ec09.png)
* **No color theme** (enabled via `--no-color` option)
![No color](https://cloud.githubusercontent.com/assets/1791760/9807318/261811d4-586f-11e5-9010-0e627431bbb9.png)
## Warnings, Errors, and Failing the Build
`--max-severity` can be used to control the maximum severity of violation messages. It can be set to `error` or `warning` (by default, it is set to `warning`). Setting it to `error` allows you to distinguish between lower and higher priority messages. It also fails the build in Xcode, if any errors are reported (similar to how a compiler error fails the build in Xcode). With `max-severity` set to `warning`, all violation messages are warnings and the Xcode build will never fail.
This setting also affects Tailor's exit code on the command-line, a failing build will `exit 1` whereas having warnings only will `exit 0`, allowing Tailor to be easily integrated into pre-commit hooks.
## Disable Violations within Source Code
Violations on a specific line may be disabled with a **trailing** single-line comment.
```swift
import Foundation; // tailor:disable
```
Additionally, violations in a given block of code can be disabled by **enclosing the block** within `tailor:off` and `tailor:on` comments.
```swift
// tailor:off
import Foundation;
import UIKit;
import CoreData;
// tailor:on
class Demo() {
// Define public members here
}
```
### Note
* `// tailor:off` and `// tailor:on` comments must be paired
## Configuration
The behavior of Tailor can be customized via the `.tailor.yml` configuration file. It enables you to
* include/exclude certain files and directories from analysis
* enable and disable specific analysis rules
* specify output format
* specify CLI output color scheme
You can tell Tailor which configuration file to use by specifying its file path via the `--config` CLI option. By default, Tailor will look for the configuration file in the directory where you will run Tailor from.
The file follows the [YAML 1.1](http://www.yaml.org/spec/1.1/) format.
### Including/Excluding files
Tailor checks all files found by a recursive search starting from the directories given as command line arguments. However, it only analyzes Swift files that end in `.swift`. If you would like Tailor to analyze specific files and directories, you will have to add entries for them under `include`. Files and directories can also be ignored through `exclude`.
Here is an example that might be used for an iOS project:
```yaml
include:
- Source # Inspect all Swift files under "Source/"
exclude:
- '**Tests.swift' # Ignore Swift files that end in "Tests"
- Source/Carthage # Ignore Swift files under "Source/Carthage/"
- Source/Pods # Ignore Swift files under "Source/Pods/"
```
#### Notes
* Files and directories are specified relative to where `tailor` is run from
* Paths to directories or Swift files provided explicitly via CLI will cause the `include`/`exclude` rules specified in `.tailor.yml` to be ignored
* *Exclude* is given higher precedence than *Include*
* Tailor recognizes the [Java Glob](https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob) syntax
### Enabling/Disabling rules
Tailor allows you to individually disable (blacklist) or enable (whitelist) rules via the `except` and `only` labels.
Here is an example showcasing how to enable certain rules:
```yaml
# Tailor will solely check for violations to the following rules
only:
- upper-camel-case
- trailing-closure
- forced-type-cast
- redundant-parentheses
```
Here is an example showcasing how to disable certain rules:
```yaml
# Tailor will check for violations to all rules except for the following ones
except:
- parenthesis-whitespace
- lower-camel-case
```
#### Notes
* *only* is given precedence over *except*
* Rules that are explicitly included/excluded via CLI will cause the `only`/`except` rules specified in `.tailor.yml` to be ignored
### Specifying output format
Tailor allows you to specify the output format (`xcode`/`json`) via the `format` label.
Here is an example showcasing how to specify the output format:
```yaml
# The output format will now be in JSON
format: json
```
#### Note
* The output format explicitly specified via CLI will cause the output format defined in `.tailor.yml` to be ignored
### Specifying CLI output color scheme
Tailor allows you to specify the CLI output color schemes via the `color` label. To disable colored output, set `color` to `disable`. To invert the color scheme, set `color` to `invert`.
Here is an example showcasing how to specify the CLI output color scheme:
```yaml
# The CLI output will not be colored
color: disable
```
#### Note
* The CLI output color scheme explicitly specified via CLI will cause the output color scheme defined in `.tailor.yml` to be ignored
## Formatters
Tailor's output format may be customized via the `-f`/`--format` option. The Xcode formatter is selected by default.
### Xcode Formatter (default)
The default `xcode` formatter outputs violation messages according to the format expected by Xcode to be displayed inline within the Xcode Editor Area and as a list in the Log Navigator. This format is also as human-friendly as possible on the console.
```
$ tailor main.swift
********** /main.swift **********
/main.swift:1: warning: [multiple-imports] Imports should be on separate lines
/main.swift:1:18: warning: [terminating-semicolon] Statements should not terminate with a semicolon
/main.swift:3:05: warning: [constant-naming] Global Constant should be either lowerCamelCase or UpperCamelCase
/main.swift:5:07: warning: [redundant-parentheses] Conditional clause should not be enclosed within parentheses
/main.swift:7: warning: [terminating-newline] File should terminate with exactly one newline character ('\n')
Analyzed 1 file, skipped 0 files, and detected 5 violations (0 errors, 5 warnings).
```
### [JSON](http://www.json.org) Formatter
The `json` formatter outputs an array of violation messages for each file, and a `summary` object indicating the parsing results and the violation counts.
```
$ tailor -f json main.swift
{
"files": [
{
"path": "/main.swift",
"violations": [
{
"severity": "warning",
"rule": "constant-naming",
"location": {
"line": 1,
"column": 5
},
"message": "Global Constant should be either lowerCamelCase or UpperCamelCase"
}
],
"parsed": true
}
],
"summary": {
"violations": 1,
"warnings": 1,
"analyzed": 1,
"errors": 0,
"skipped": 0
}
}
```
### HTML Formatter
The `html` formatter outputs a complete HTML document that should be written to a file.
```
tailor -f html main.swift > tailor.html
```
![HTML format](https://cloud.githubusercontent.com/assets/1350704/14971733/236fd5b0-10a3-11e6-9a02-fa1e70702e47.png)
# Developers
Please review the [guidelines for contributing](https://github.com/sleekbyte/tailor/blob/master/.github/CONTRIBUTING.md) to this repository.
## Development Environment
* [Java Version 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
* [Gradle](https://gradle.org) (optional, `./gradlew` may be used instead)
* [Ruby 2.0.0+](https://www.ruby-lang.org/en/)
* [Bundler](http://bundler.io)
# External Tools and Libraries
## Development & Runtime
Tool | License
----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------
[ANTLR 4.5](https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Home) | [The BSD License](http://www.antlr.org/license.html)
[Apache Commons CLI](http://commons.apache.org/proper/commons-cli/) | [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
[Jansi](https://github.com/fusesource/jansi) | [Apache License, Version 2.0](https://github.com/fusesource/jansi/blob/master/license.txt)
[Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | [MIT](https://github.com/CocoaPods/Xcodeproj/blob/master/LICENSE)
[SnakeYAML](https://bitbucket.org/asomov/snakeyaml) | [Apache License, Version 2.0](https://bitbucket.org/asomov/snakeyaml/raw/8939e0aa430d25b3b49b353508b23e072dd02171/LICENSE.txt)
[Gson](https://github.com/google/gson) | [Apache License, Version 2.0](https://github.com/google/gson/blob/master/LICENSE)
[Mustache.java](https://github.com/spullara/mustache.java) | [Apache License, Version 2.0](https://github.com/spullara/mustache.java/blob/master/LICENSE)
## Development Only
Tool | License
------------------------------------------------------------ | ----------------------------------------------------------------------------------------
[Gradle](https://gradle.org) | [Apache License, Version 2.0](http://gradle.org/license/)
[Travis CI](https://travis-ci.org) | [Free for Open Source Projects](https://travis-ci.com/plans)
[Mockito](http://mockito.org) | [MIT](https://code.google.com/p/mockito/wiki/License)
[JUnit](http://junit.org) | [Eclipse Public License 1.0](http://junit.org/license)
[Java Hamcrest](http://hamcrest.org/JavaHamcrest/) | [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
[FindBugs](http://findbugs.sourceforge.net) | [GNU Lesser General Public License](http://findbugs.sourceforge.net/manual/license.html)
[Checkstyle](http://checkstyle.sourceforge.net) | [GNU Lesser General Public License](http://checkstyle.sourceforge.net/license.html)
[PMD](http://pmd.sourceforge.net) | [BSD-style](http://pmd.sourceforge.net/pmd-5.3.2/license.html)
[JaCoCo](http://eclemma.org/jacoco/) | [Eclipse Public License v1.0](http://eclemma.org/license.html)
[Coveralls](https://coveralls.io) | [Free for Open Source](https://coveralls.io/pricing)
[Bundler](http://bundler.io) | [MIT](https://github.com/bundler/bundler/blob/master/LICENSE.md)
[Codacy](https://www.codacy.com) | [Free for Open Source](https://www.codacy.com/pricing)
[System Rules](http://stefanbirkner.github.io/system-rules/) | [Common Public License 1.0](https://stefanbirkner.github.io/system-rules/license.html)
[Ronn](https://github.com/rtomayko/ronn) | [MIT](https://github.com/rtomayko/ronn/blob/master/COPYING)
# License
Tailor is released under the MIT license. See [LICENSE.md](https://github.com/sleekbyte/tailor/blob/master/LICENSE.md) for details.
| 0 |
xwjie/PLMCodeTemplate | 给部门制定的代码框架模板 | 2017-04-02T08:43:47Z | null | # 晓风轻的Spring开发代码模板
> 本文的面向目标群为编写业务代码的初学者。
>
> 本文的目的是编写简单易读的代码。
给部门制定的代码框架模板。追求工匠精神,编写简单代码。
作者微信交流
![晓风轻微信](docs/weixin.jpg) ![java技术交流群](docs/java技术交流群二维码.png)
pdf电子书请见ebook目录。
[`SpringBoot版本在这里`](https://github.com/xwjie/ElementVueSpringbootCodeTemplate)**,持续更新中,后续加入vue+element的代码模板,欢迎加星加watch。**
# 前言
参考 [**程序员你为什么这么累**](https://zhuanlan.zhihu.com/p/28705206) 系列文章 ,里面有详细的讲解,评论里面有不同观点的讨论,建议也看看,相信对你有帮助。
![](/pictures/main.png)
# 工程使用说明
工程使用jdk6+,使用了[lombok](https://projectlombok.org/)插件。在 Idea 里面选择 `source`目录导入 `Maven` 工程即可。然后在Tomcat里面运行工程即可。
启动项目,访问地址 `http://localhost:8080/+[应用名(可为空)]` 即可。
[工程使用详细说明](docs/install.md)
# 目录
**以下为简要说明,详细说明请看 [https://xwjie.github.io/](https://xwjie.github.io/)**
> * 优雅编码 - 接口定义规范
> * 优雅编码 - ResultBean的重要性和约束
> * 优雅编码 - 异常处理
> * 优雅编码 - 参数校验和国际化规范
> * 优雅编码 - 日志打印
> * 优雅编码 - 工具类编写
> * 技术点总结
> * 对开发组长的要求
> * 对开发人员的建议
# 优雅编码 - 接口定义规范
请阅读 [我的编码习惯 - 接口定义](https://zhuanlan.zhihu.com/p/28708259) ,不要犯里面的错误。
1. 所有接口都必须返回ResultBean。
2. 一开始就要考虑成功和失败二种场景。
3. ResultBean只允许出现在controller,不允许到处传。
4. 不要出现 map ,json 等复杂对象做为输入和输出。
5. 不要出现 local ,messagesource 等和业务无关的参数。
# 优雅编码 - ResultBean的重要性和约束
请阅读 [我的编码习惯 - Controller规范](https://zhuanlan.zhihu.com/p/28717374)。
这里都是对开发组长的要求。使用 `AOP` 统一处理异常,并根据不同异常返回不同返回码。尤其关注非用户自己抛出的异常。
# 优雅编码 - 异常处理
请阅读 [我的编码习惯 - 异常处理](https://zhuanlan.zhihu.com/p/29005176)。
1. 开发人员不准捕获异常,直接抛出。
2. 少加空判断。如果对象不应该为空,就不需要加空判断,加了空判断就要测试为空和不为空二种情况。
其他对开发组长的要求请见上面的文章和代码。
# 优雅编码 - 日志打印
请阅读 [我的编程习惯 - 日志建议](https://zhuanlan.zhihu.com/p/28629319)。
## 分支语句的变量需要打印变量
分支语句变量会影响代码走向,不打日志无法知道究竟走那个分支。如下
```Java
// optype决定代码走向,需要打印日志
logger.info("edit user, opType:" + opType);
if (opType == CREATE) {
// 新增操作
} else if (opType == UPDATE) {
// 修改操作
} else {
// 错误的类型,抛出异常
throw new IllegalArgumentException("unknown optype:" + opType);
}
```
如果没有打印optype的值,出了问题你只能从前找到后,看optype是什么了,很浪费时间。
> 重要建议:养成增加else语句,把不合法参数抛出异常的好习惯。
>
> 抛异常的时候把对应的非法值抛出来。
## 修改操作需要打印操作的对象
这点是为了跟踪。防止出现,一个数据被删除了,找不到谁做的。如
```Java
private void deleteDoc(long id) {
logger.info("delete doc, id:" + id);
// 删除代码
}
```
## 大量数据操作的时候需要打印数据长度
建议前后打印日志,而且要打印出数据长度,目的是为了知道 `处理了多少数据用了多少时间` 。如一个操作用了3秒钟,性能是好还是坏? 如果处理了1条数据,那么可能就是性能差,如果处理了10000条数据,那么可能就是性能好。
```Java
logger.info("query docment start, params:" + params);
List<Document> docList = query(params);
logger.info("query docment done, size:" + docList.size())
```
## 使用log4j的MDC打印用户名等额外信息
有时候,业务量大的系统要找到某一个用户的操作日志定位问题非常痛苦,每一个日志上加用户名又低效也容易漏掉,所以我们要在更高层级上解决这些共性问题。
我们使用log4j的 `MDC` 功能达成这个目的。在用户登录后,把用户标志放到 `MDC` 中。
```Java
private final static ThreadLocal<String> tlUser = new ThreadLocal<>();
public static final String KEY_USER = "user";
public static void setUser(String userid) {
tlUser.set(userid);
// 把用户信息放到log4j
MDC.put(KEY_USER, userid);
}
```
然后修改log4j配置,pattern上增加 `%X{user}` ,位置随意。增加线程相关配置 `[%t]` 。更多参数[log4j变量](https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html)
```XML
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%t]%-d{MM-dd HH:mm:ss,SSS} %-5p: %X{user} - %c - %m%n" />/>
</layout>
```
最终效果图:
![日志](docs/pictures/log1.png)
> 没有用户信息的时候并不会报错,而是空串。
>
> 不要一开始就关注日志级别和日志性能,规则越多越难落地。
>
> 必须记得清空。
## 集群环境下需要在静态服务器增加配置,返回处理机器的信息到响应头
配置后可以直接找到代码在那个机器上运行,快速定位。举例,`Nginx` 集群最简配置(主要使用 `$upstream_addr`) :
```
upstream code_server{
server 127.0.0.1:8080;
server 127.0.0.1:18080;
ip_hash;
keepalive 32;
}
server{
listen 80;
server_name xwjie.com;
location /plm {
proxy_pass http://code_server/plm;
add_header x-slave $upstream_addr;
}
}
```
效果图:
![nginx](docs/pictures/nginx.png)
# 优雅编码 - 参数校验和国际化规范
请阅读 [我的编码习惯 - 参数校验和国际化规范](https://zhuanlan.zhihu.com/p/29129469) 。
1. 调用自己的校验函数
2. 业务代码任何地方参数上都不要出现local,messagesource
3. 异常信息里面,不正确的参数值要提示出来,减少定位时间
4. 国际化参数不要放到每一个url上
# 优雅编码 - 工具类编写
请阅读 [我的编码习惯 - 工具类规范](https://zhuanlan.zhihu.com/p/29199049) 。
工具类的目标是要编写通用灵活的方法。重点注意参数的优化,多使用重载。
1. 隐藏实现,编写自己的工具类方法,不要再业务代码直接调用第三方工具类
2. 使用父类/接口
3. 使用重载编写衍生函数组
4. 使用静态引入,方便找到工具方法
5. 物理上独立存放,独立维护
# 技术点总结
1. spring的aop的使用
2. log4j的MDC使用
3. JDK的ThreadLocal的使用
# 对开发组长的要求
定义好代码框架,不要做太多、太细的要求,否则无法落地。这篇文章中,规范中要求做到的少,不准做的多,落地相对容易。
1. 定义好统一的接口格式、异常、常量等
2. 多使用AOP和ThreadLocal简化代码
3. 亲自编写校验函数和工具类
4. 代码评审中,严格控制函数的参数,不允许出现复杂参数和业务无关的参数
# 对开发人员的建议
1. 不要养成面对debug编程,用日志代替debug
2. 不要一上来就做整个功能测试,要一行一行代码一个一个函数测试
3. 谨慎捕获异常和加空判断,加了空判断就要测试为空和不为空二种情况
4. 日志也是代码的一部分,提交代码前先运行看一遍操作日志
| 0 |
Codecademy/EventHub | An open source event analytics platform | 2014-05-05T18:37:02Z | null | # EventHub
EventHub enables companies to do cross device event tracking. Events are joined by their associated user on EventHub and can be visualized by the built-in dashboard to answer the following common business questions
* what is my funnel conversion rate?
* what is my cohorted KPI retention?
* which variant in my A/B test has a higher conversion rate?
Most important of all, EventHub is free and open source.
**Table of Contents**
- [Quick Start](#quick-start)
- [Server](#server)
- [Dashboard](#dashboard)
- [Javascript Library](#javascript-library)
- [Ruby Library](#ruby-library)
## Quick Start
### Playground
A [demo server](http://codecademy:codecademy@floating-mesa-9408.herokuapp.com/) is available on Heroku and the username/password to access the dashboard is `codecademy/codecademy`.
- [Example funnel query](http://codecademy:codecademy@54.193.159.140/?start_date=20130101&end_date=20130107&num_days_to_complete_funnel=7&funnel_steps%5B%5D=receive_email&funnel_steps%5B%5D=view_track_page&funnel_steps%5B%5D=finish_course&type=funnel)
- [Example cohort query](http://codecademy:codecademy@54.193.159.140/?start_date=20130101&end_date=20130107&row_event_type=receive_email&column_event_type=start_track&num_days_per_row=1&num_columns=11&type=cohort)
### Screenshots
![Funnel screenshot](https://raw.githubusercontent.com/Codecademy/EventHub/master/funnel-screenshot.png)
![Cohort screenshot](https://raw.githubusercontent.com/Codecademy/EventHub/master/cohort-screenshot.png)
### Deploy with Heroku
Developers who want to try EventHub can quickly set the server up on Heroku with the following commands. However, please be aware that Heroku's file system is ephemeral and your data will be wiped after the instance is closed.
```bash
git clone https://github.com/Codecademy/EventHub.git
cd EventHub
heroku create
git push heroku master
heroku open
```
### Required dependencies
* [java sdk7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
* [maven](http://maven.apache.org)
### Compile and run
```bash
# set up proper JAVA_HOME for mac
export JAVA_HOME=$(/usr/libexec/java_home)
git clone https://github.com/Codecademy/EventHub.git
cd EventHub
export EVENT_HUB_DIR=`pwd`
mvn -am -pl web clean package
java -jar web/target/web-1.0-SNAPSHOT.jar
```
### How to run all the tests
#### Unit/Integration/Functional testing
```bash
mvn -am -pl web clean test
```
#### Manual testing with curl
Comprehensive examples can be found in `script.sh`.
```bash
cd ${EVENT_HUB_DIR}; ./script.sh
```
Test all event related endpoints
* Add new event
```bash
curl -X POST http://localhost:8080/events/track --data "event_type=signup&external_user_id=foobar&event_property_1=1"
```
* Batch add new event
```bash
curl -X POST http://localhost:8080/events/batch_track --data "events=[{event_type: signup, external_user_id: foobar, date: 20130101, event_property_1: 1}]"
```
* Show all event types
```bash
curl http://localhost:8080/events/types
```
* Show events for a given user
```bash
curl http://localhost:8080/users/timeline\?external_user_id\=chengtao@codecademy.com\&offset\=0\&num_records\=1
```
* Show all property keys for the given event type
```bash
curl 'http://localhost:8080/events/keys?event_type=signup'
```
* Show all property values for the given event type and property key
```bash
curl 'http://localhost:8080/events/values?event_type=signup&event_key=treatment'
```
* Show all property values for the given event type, property key and value prefix
```bash
curl 'http://localhost:8080/events/values?event_type=signup&event_key=treatment&prefix=fa'
```
* Show server stats
```bash
curl http://localhost:8080/varz
```
* Funnel query
```bash
today=`date +'%Y%m%d'`
end_date=`(date -d '+7day' +'%Y%m%d' || date -v '+7d' +'%Y%m%d') 2> /dev/null`
curl -X POST "http://localhost:8080/events/funnel" --data "start_date=${today}&end_date=${end_date}&funnel_steps[]=signup&funnel_steps[]=view_shopping_cart&funnel_steps[]=checkout&num_days_to_complete_funnel=7&eck=event_property_1&ecv=1"
```
* Retention query
```bash
today=`date +'%Y%m%d'`
end_date=`(date -d '+7day' +'%Y%m%d' || date -v '+7d' +'%Y%m%d') 2> /dev/null`
curl -X POST "http://localhost:8080/events/cohort" --data "start_date=${today}&end_date=${end_date}&row_event_type=signup&column_event_type=view_shopping_cart&num_days_per_row=1&num_columns=2"
```
Test all user related endpoints
* show paginated events for a given user
```bash
curl http://localhost:8080/users/timeline\?external_user_id\=chengtao@codecademy.com\&offset\=0\&num_records\=5
```
* show information of users who have matched property keys & values
```bash
curl -X POST http://localhost:8080/users/find --data "ufk[]=external_user_id&ufv[]=chengtao1@codecademy.com"
```
* add or update user information
```bash
curl -X POST http://localhost:8080/users/add_or_update --data "external_user_id=chengtao@codecademy.com&foo=bar&hello=world"
```
* Show all property keys for users
```bash
curl 'http://localhost:8080/users/keys
```
* Show all property values for users given property key and (optional) value prefix
```bash
curl 'http://localhost:8080/users/values?user_key=hello&prefix=w'
```
#### Load testing with Jmeter
We use [Apache Jmeter](http://jmeter.apache.org) for load testing, and the load testing script can be found in `${EVENT_HUB_DIR}/jmeter.jmx`.
```bash
export JMETER_DIR=~/Downloads/apache-jmeter-2.11/
java -jar ${JMETER_DIR}/bin/ApacheJMeter.jar -JnumThreads=1 -n -t jmeter.jmx -p jmeter.properties
java -jar ${JMETER_DIR}/bin/ApacheJMeter.jar -JnumThreads=5 -n -t jmeter.jmx -p jmeter.properties
java -jar ${JMETER_DIR}/bin/ApacheJMeter.jar -JnumThreads=10 -n -t jmeter.jmx -p jmeter.properties
# generate graph (require matplotlib)
./plot_jmeter_performance.py 1-jmeter-performance.csv 5-jmeter-performance.csv 10-jmeter-performance.csv
# open "Track Event.png"
```
## Server
### Key observations & design decisions
Our goal is to build something usable on a single machine with a reasonably large SSD drive. Let's say, hypothetically, the server receives 100M events monthly (might cost you few thousand dollars per month to use SAAS provider), and each event is 500 bytes without compression. In this situation, storing all the events likely only takes you few hundreds GB with compression, and chances are, only the data in recent months are of interest.
Also, to efficiently run basic funnel and cohort queries without filtering, only two forward indices are needed, event index sharded by event types and event index sharded by users. Therefore, our strategy is to make those two indices as small as possible to fit in memory, and if the client wants to do filtering for events, we build a bloomfilter to reject most of the non exact-match. Imagine we are running another hypothetical query while assuming both indices and the bloomfilters can be fit in memory. Say there are 1M events that cannot be rejected and need to hit the disk, assuming each SSD disk read is 16 microseconds, we are talking about sub-minute query time, while assuming none of the data are in memory. In practice, this situation is likely much better as we cache all the recently hit records, and most of the queries likely only care the most recent data.
To simplify the design of the server and store indices compactly so that they fit in memory, we made the following two assumptions.
1. Times are associated to events when the server receives the an event
2. Date is the finest level of granularity
With the above two assumptions, we can rely on the server generated monotonically increasing id to maintain the total order for the events. In addition, as long as we track the id of the first event in any given date, we do not need to store the time information in the indices (which greatly reduces the size of the indices). The direct implication for those assumptions are, first, if the client chose to cache some events locally and sent them later, the timing for those events will be recorded as the server receives them, not when the user made those actions; second, though the server maintains the total ordering of all events, it cannot answer questions like what is the conversion rate for the given funnel between 2pm and 3pm on a given date.
Lastly, for both indices, since they are sharded by event types or users, we can expect the size of the indices to reduce significantly with proper compression.
### Architecture
At the highest level, `com.codecademy.evenhub.web.EventHubHandler` is the main entry point. It runs a [Jetty](http://www.eclipse.org/jetty) server, reflectively collects supported commands under `com.codecademy.evenhub.web.commands`, handles JSONP request transparently, handles requests to static resources like the dashboard, and most importantly, act as a proxy which translates http request and respones to and from method calls to `com.codecademy.evenhub.EventHub`.
`com.codecademy.evenhub.EventHub` can be thought of as a facade to the key components of `UserStorage`, `EventStorage`, `ShardedEventIndex`, `DatedEventIndex`, `UserEventIndex` and `PropertiesIndex`.
For `UserStorage` and `EventStorage`, at the lowest level, we implemented `Journal{User,Event}Storage` backed by [HawtJournal](https://github.com/fusesource/hawtjournal/) to store underlying records reliably. In addition, when clients are quering records which cannot be filtered by the supported indices, the server will loop through all the potential hits, look up the properties from the `Journal` and then filter accordingly. For better performance, there are also decorators for each storage like `Cached{User,Event}Storage` to support caching and `BloomFiltered{User,Event}Storage` to support fast rejection for filters like `ExactMatch`. Please also beware that each `Storage` maintains a monotonically increasing counter as the internal id generator for each event and user received.
To make the funnel and cohort queries fast, `EventHub` also maintains three indices, `ShardedEventIndex`, `UserEventIndex`, and `DatedEventIndex` behind the scene. `DatedEventIndex` simply tracks the mapping from a given date, the id of the first event received in that day. `ShardedEventIndex` can be thought of as sorted event ids sharded by event type. `UserEventIndex` can be thought of as sorted event ids sharded by users.
Lastly, `EventHub` maintains a `PropertiesIndex` backed by [LevelDB Jni](https://github.com/fusesource/leveldbjni) to track what properties keys are available for a given event type and what properties values are available for a given event type and a property key.
### Horizontal scalabiltiy
While EventHub does not need any information from different users, with a broker in front of EventHub servers, EventHub can be easily sharded by users and scale horizontally.
### Performance
In the following three experiments, the spec of the computer used can be found in the following table
| Component | Spec |
|----------------|-----------------------------------------|
| Computer Model | Mac Book Pro, Retina 15-inch, Late 2013 |
| Processor | 2GHz Intel Core i7 |
| Memory | 8GB 1600 MHz DDR3 |
| Software | OS X 10.9.2 |
| Jvm | Oracle JDK 1.7 |
#### Write performance
The following graph is generated as described in [Load testing with Jmeter](#load-testing-with-jmeter). The graph shows both the throughput and latency of adding the first one million events (without batching) with different number of threads (1, 5, 10, 15).
![Throughput and latency by threads](http://i60.tinypic.com/16ad66b.png)
#### Query performance
While it is difficult to come up with a generic benchmark, we would rather show something rather than show nothing. After generating about one million events with the load testing script as described in [Load testing with Jmeter](#load-testing-with-jmeter), we ran the four types of queries twice, once after the server starts cleanly and another time while the cache is still warm.
| Query | 1st execution | 2nd execution | command |
|-------------------------|---------------|---------------|---------|
| Funnel without filters | 1.15s | 0.19s | curl -X POST "http://localhost:8080/events/funnel" --data "start_date=20130101&end_date=20130130&funnel_steps[]=receive_email&funnel_steps[]=view_track_page&funnel_steps[]=start_track&num_days_to_complete_funnel=30" |
| Funnel with filters | 1.31s | 0.43s | curl -X POST "http://localhost:8080/events/funnel" --data "start_date=20130101&end_date=20130130&funnel_steps[]=receive_email&funnel_steps[]=view_track_page&funnel_steps[]=start_track&num_days_to_complete_funnel=30&efk0[]=event_property_1&efv0[]=1" |
| Cohort without filters | 0.63s | 0.13s | curl -X POST "http://localhost:8080/events/cohort" --data "start_date=20130101&end_date=20130130&row_event_type=receive_email&column_event_type=start_track&num_days_per_row=1&num_columns=7" |
| Cohort with filters | 1.20s | 0.32s | curl -X POST "http://localhost:8080/events/cohort" --data "start_date=20130101&end_date=20130130&row_event_type=receive_email&column_event_type=start_track&num_days_per_row=1&num_columns=7&refk[]=event_property_1&refv[]=1" |
#### Memory footprint
In the experiment, the server was bootstrapped differently. Instead of using the load testing script, we used subset of data from Codecademy, which has around 53M events and 2.4M users. Please be aware that the current storage format on disk is fairly inefficient and has serious internal fragmentation. However, when the data are loaded to memory, it will be much more efficient as we would never load those "hole" pages into memory.
| Key Component | Size in memory | Note |
|---------------------------|-----------------|------|
| ShardedEventIndex | 424Mb | (data size) + (index size) <br>= (event id size * number of events) + negligible<br>= (8 * 53M) |
| UserEventIndex | 722Mb | (data size) + (index size) <br>= (event id size * number of events) + (index entry size * number of users)<br>= (8 * 53M) + ((numPointersPerIndexEntry * 2 + 1) * 8 + 4) * 2.4M)<br>= (8 * 53M) + (124 * 2.4M) |
| BloomFilteredEventStorage | 848Mb | (bloomfilter size) * (number of events) <br>= 16 * 53M |
## Dashboard
The server comes with a built-in dashboard which is simply some static resources stored in `/web/src/main/resources/frontend` and gets compiled into the server jar file. After running the server, the dashboard can be accessed at [http://localhost:8080](http://localhost:8080). Through the dashboard, you can access the server for your funnel and cohort analysis.
#### Password protection
The dashboard comes with insecure basic authentication which send unencrypted information without SSL. Please use it at your own discretion. The default username/password is codecademy/codecademy and you can change it by modifying your web.properties file or use the following command to start your server
```bash
USERNAME=foo
PASSWORD=bar
java -Deventhubhandler.username=${USERNAME} -Deventhubhandler.password=${PASSWORD} -jar web/target/web-1.0-SNAPSHOT.jar
```
## Javascript Library
The project comes with a javascript library which can be integrated with your website as a way to send events to your EventHub server.
### How to run JS tests
#### install [karma](http://karma-runner.github.io/0.12/index.html)
```bash
cd ${EVENT_HUB_DIR}
npm install -g karma
npm install -g karma-jasmine@2_0
npm install -g karma-chrome-launcher
karma start karma.conf.js
```
### API
The javascript library is extremely simple and heavily inspired by mixpanel. There are only five methods that a developer needs to understand. Beware that behind the scenes, the library maintains a queue backed by localStorage, buffers the events in the queue, and has a timer reguarly clear the queue. If the browser doesn't support localStorage, a in-memory queue will be created as EventHub is created. Also, our implementation relies on the server to track the timestamp of each event. Therefore, in the case of a browser session disconnected before all the events are sent, the remaining events will be sent in the next browser session and thus have the timestamp recorded as the next session starts.
#### window.newEventHub()
The method will create an EventHub and start the timer which clears out the event queue in every second (default)
```javascript
var name = "EventHub";
var options = {
url: 'http://example.com',
flushInterval: 10 /* in seconds */
};
var eventHub = window.newEventHub(name, options);
```
#### eventHub.track()
This method enqueues the given event which will be cleared in batch at every flushInterval. Beware that if there is no identify method called before the track method is called, the library will automatically generate an user id which remain the same for the entire session (clears after the browser tab is closed), and send the generated user id along with the queued event. On the other hand, if `eventhub.identify()` is called before the track method is called, the user information passed along with the identify method call will be merged to the queued event.
```javascript
eventHub.track("signup", {
property_1: 'value1',
property_2: 'value2'
});
```
#### eventHub.alias()
This method links the given user to the automatically generated user. Typically, you only want to call this method once -- right after the user successfully signs up.
```javascript
eventHub.alias('chengtao@codecademy.com');
```
#### eventHub.identify()
This method tells the library instead of using the automatically generated user information, use the given information instead.
```javascript
eventHub.identify('chengtao@codecademy.com', {
user_property_1: 'value1',
user_property_2: 'value2'
});
```
#### eventHub.register()
This method allows the developer to add additional information to the generated user.
```javascript
eventHub.register({
user_property_1: 'value1',
user_property_2: 'value2'
});
```
### Scenario and Receipes
#### Link the events sent before and after an user sign up
The following code
```javascript
var eventHub = window.newEventHub('EventHub', { url: 'http://example.com' });
eventHub.track('pageview', { page: 'home' });
eventHub.register({
ip: '10.0.0.1'
});
// after user signup
eventHub.alias('chengtao@codecademy.com');
eventHub.identify('chengtao@codecademy.com', {
gender: 'male'
});
eventHub.track('pageview', { page: 'learn' });
```
will result in a funnel like
```javascript
{
user: 'something generated',
event: 'pageview',
page: 'home',
ip: '10.0.0.1'
}
link 'chengtao@codecademy.com' to 'something generated'
{
user: 'chengtao@codecademy.com',
event: 'pageview',
page: 'learn',
gender: 'male'
}
```
#### A/B testing
The following code
```javascript
var eventHub = window.newEventHub('EventHub', { url: 'http://example.com' });
eventHub.identify('chengtao@codecademy.com', {});
eventHub.track('pageview', {
page: 'javascript exercise 1',
experiment: 'fancy feature',
treatment: 'new'
});
eventHub.track('submit', {
page: 'javascript exercise 1'
});
```
and
```javascript
var eventHub = window.newEventHub('EventHub', { url: 'http://example.com' });
eventHub.identify('bob@codecademy.com', {});
eventHub.track('pageview', {
page: 'javascript exercise 1',
experiment: 'fancy feature',
treatment: 'control'
});
eventHub.track('skip', {
page: 'javascript exercise 1'
});
```
will result in two funnels like
```javascript
{
user: 'chengtao@codecademy.com',
event: 'pageview',
page: 'javascript exercise 1',
experiment: 'fancy feature',
treatment: 'new'
}
{
user: 'chengtao@codecademy.com',
event: 'submit',
page: 'javascript exercise 1'
}
```
and
```javascript
{
user: 'bob@codecademy.com',
event: 'pageview',
page: 'javascript exercise 1',
experiment: 'fancy feature',
treatment: 'control'
}
{
user: 'bob@codecademy.com',
event: 'skip',
page: 'javascript exercise 1'
}
```
## Ruby Library
Separate ruby gem is also available at [https://github.com/Codecademy/EventHubClient](https://github.com/Codecademy/EventHubClient)
## License
MIT License.
Copyright (c) 2022 Codecademy LLC
| 0 |
shzlw/poli | An easy-to-use BI server built for SQL lovers. Power data analysis in SQL and gain faster business insights. | 2018-11-27T03:56:44Z | null | # **Poli(魄力)**
[![Version](https://img.shields.io/badge/Version-0.12.2-0065FF.svg)](#)
[![license: MIT](https://img.shields.io/badge/license-MIT-FF5630.svg)](https://opensource.org/licenses/MIT)
[![Download](https://img.shields.io/github/downloads/shzlw/poli/total.svg?color=6554C0)](https://github.com/shzlw/poli/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/zhonglu/poli.svg)](https://cloud.docker.com/u/zhonglu/repository/docker/zhonglu/poli)
[![Build Status](https://travis-ci.org/shzlw/poli.svg?branch=master)](https://travis-ci.org/shzlw/poli)
[![codecov](https://codecov.io/gh/shzlw/poli/branch/master/graph/badge.svg)](https://codecov.io/gh/shzlw/poli)
Poli is an easy-to-use SQL reporting application built for SQL lovers!
## Why Poli
#### :zap: Self-hosted & easy setup
Platform independent web application. Single JAR file + Single SQLite DB file. Get up and running in 5 minutes.
#### :muscle: Connect to any database supporting JDBC drivers
PostgreSQL, Oracle, SQL Server, MySQL, Elasticsearch... You name it.
#### :bulb: SQL editor & schema viewer
No ETLs, no generated SQL, polish your own SQL query to transform data.
#### :fire: Rich and flexible styling
Pixel-perfect positioning + Drag'n'Drop support to customize the reports and charts in your own way.
#### :bookmark_tabs: Interactive Adhoc report
Utilize the power of dynamic SQL with query variables to connect Filters and Charts.
#### :hourglass: Canned report
Capture the snapshot of historical data. Free up space in your own database.
#### :santa: User management
Three system level role configurations + Group based report access control.
#### :earth_americas: Internationalization
Custom the language pack and translations just for your audience.
#### :moneybag: MIT license
Open and free for all usages.
#### :gem: Is that all?
Auto refresh, drill through, fullscreen, embeds, color themes + more features in development.
## What's New ([latest](https://shzlw.github.io/poli/#/change-logs))
![poli v0.8.0](http://66.228.42.235:8080/image-0.8.0/bob_glass_en.jpg)
## Gallery
#### Slicer & Charts
![poli v0.5.0](http://66.228.42.235:8080/slicer.gif)
#### Move & Resize
![poli component reposition](http://66.228.42.235:8080/move.gif)
#### Color palette switch & export CSV
![poli v0.6.0](http://66.228.42.235:8080/v0.6.0_new.gif)
## Quick Installation
Windows/Linux
```sh
java -jar poli-0.12.2.jar
```
Docker
```sh
docker run -d -p 6688:6688 --name poli zhonglu/poli:0.12.2
```
Check [installation guide](https://shzlw.github.io/poli/#/installation) for more details.
## Download
[Download](https://github.com/shzlw/poli/releases) the latest version of Poli via the github release page.
## Documentation
Poli's documentation and other information can be found at [here](https://shzlw.github.io/poli/).
## Run on GCP
[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)
## License
MIT License
Copyright (c) Zhonglu Wang | 0 |
baiiu/DropDownMenu | a better DropDownMenu solution, 完整的筛选器解决方案 | 2016-02-21T03:22:50Z | null | ## DropDownMenu
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DropDownMenu-green.svg?style=true)](https://android-arsenal.com/details/1/3803)
This is a DropDownMenu with the advantage of all the dropDownMenus by others before,
I have written it for several times, Now the code is most clearly.
[中文文档](README-cn.md)
##Feature
1. use Adapter to add the SubDropDownMenu. Override the `getView()` method to supply the wantted view.
2. use Generic to make all kinds of model(pojo,javabean...) can be used.
3. use FilterCheckedView which implements `Checkable`, so you can use selector to respond to all user action.
4. use FilterUrl to save the current choosen data, only override `toString()` you will get the url.
##ScreenShot
![DropDownMenu](images/dropDownMenu.gif "Gif Example")
## Usage
the xml:
```xml
<com.baiiu.filter.DropDownMenu
android:id="@+id/filterDropDownView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@id/mFilterContentView" //mFilterContentView must be add into the view.the view can be a RecyclerView or others.
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:textSize="22sp" />
</com.baiiu.filter.DropDownMenu>
```
the JavaCode:
```java
//set the Adapter.
dropDownView.setMenuAdapter(new DropMenuAdapter(this, titleList));
```
the DropMenuAdapter:
```java
@Override
public int getMenuCount() {
return titles.length;
}
@Override
public String getMenuTitle(int position) {
return titles[position];
}
@Override
public int getBottomMargin(int position) {
return 0;
}
@Override
public View getView(int position, FrameLayout parentContainer) {
...
return createSingleListView();
}
```
add a SingleListView:
```java
private View createSingleListView() {
SingleListView<String> singleListView = new SingleListView<String>(mContext)
.adapter(new SimpleTextAdapter<String>(null, mContext) {
@Override
public String provideText(String string) {
return string;
}
})
.onItemClick(new OnFilterItemClickListener<String>() {
@Override
public void onItemClick(String item) {
FilterUrl.instance().singleListPosition = item;
FilterUrl.instance().position = 0;
FilterUrl.instance().positionTitle = item;
if (onFilterDoneListener != null) {
onFilterDoneListener.onFilterDone(0, "", "");
}
}
});
//初始化数据
singleListView.setList(list, -1);//默认不选中
}
```
## License
Copyright (C) 2016 zhe zhu
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.
| 0 |
aptana/studio3 | This repository contains the code for core components of Aptana Studio 3. | 2009-10-15T23:46:08Z | null | [![Build Status](https://jenkins.appcelerator.org/buildStatus/icon?job=aptana-studio/studio3/development)](https://jenkins.appcelerator.org/job/aptana-studio/job/studio3/job/development/)
Aptana Studio 3 Core
========================
Aptana Studio 3 Core holds the core set of plugins used to build the Aptana Studio 3 IDE/RCP. Currently it relies on consuming a pre-built [FTP/FTPS/SFTP library](https://github.com/aptana/libraries_com) as a dependency for building. This holds a commercial library, so the sources do not contain the JAR due to licensing restrictions.
This set of plugins deals with providing support for web development: HTML, CSS, XML, and JavaScript. It also includes our own Git plugin support. Features that deal with adding support for [PHP](https://github.com/aptana/studio3-php), [Python](https://github.com/aptana/PyDev) and [Ruby](https://github.com/aptana/studio3-ruby) are broken out to other repositories. The Portion dealing with bundling all of that together to form the IDE is in the [studio3-rcp](https://github.com/aptana/studio3-rcp) repository.
How to Download Aptana
----------
1. Visit https://github.com/aptana/studio3/releases
2. Download the latest version for your operating system. Windows (.exe) and Mac (.dmg) have installers. Linux is a .zip file that you'll expand in your chosen location.
How to Contribute
----------
1. Fork this repo.
2. Ensure you have [Maven 3.x+ installed](http://www.vogella.com/tutorials/ApacheMaven/article.html#maven_installation)
3. Make local changes and test with maven/tycho:
```mvn clean verify```
4. Submit a PR
Setting up an Eclipse Development Environment
----------------------------------------------
2. [Download Eclipse 4.13 for RCP Developers](https://www.eclipse.org/downloads/packages/release/2019-09/r#node-55605) and install it
3. Install npm packages for our dependency installer script: ```npm ci```
4. Install the dependencies from the target platform into eclipse ```npm run eclipse```
5. Then import the features, plugins, and test plugins into your workspace. _File > Import > General > Existing Projects Into Workspace_. Select the directory this repo was cloned into.
6. Make your changes on your fork, then submit a Pull Request.
License
-------
This program Copyright (c) 2005-2019 by Appcelerator, Inc. This program is distributed under the GNU General Public license. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, Version 3, as published by the Free Software Foundation.
Any modifications must keep this entire license intact.
-----------------------------------------------------------------------
GNU General Public License
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based on the Program.
To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
* a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
* b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
* c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
* d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
* a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
* b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
* c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
* d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
* e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
* a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
* b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
* c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
* d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
* e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
* f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
-----------------------------------------------------------------------
Appcelerator GPL Exception
Section 7 Exception
As a special exception to the terms and conditions of the GNU General Public License Version 3 (the "GPL"): You are free to convey a modified version that is formed entirely from this file (for purposes of this exception, the "Program" under the GPL) and the works identified at http://www.aptana.com/legal/gpl (each an "Excepted Work"), which are conveyed to you by Appcelerator, Inc. and licensed under one or more of the licenses identified in the Excepted License List below (each an "Excepted License"), as long as:
1. you obey the GPL in all respects for the Program and the modified version, except for Excepted Works which are identifiable sections of the modified version, which are not derived from the Program, and which can reasonably be considered independent and separate works in themselves,
2. all Excepted Works which are identifiable sections of the modified version, which are not derived from the Program, and which can reasonably be considered independent and separate works in themselves,
1. are distributed subject to the Excepted License under which they were originally licensed, and
2. are not themselves modified from the form in which they are conveyed to you by Aptana, and
3. the object code or executable form of those sections are accompanied by the complete corresponding machine-readable source code for those sections, on the same medium as the corresponding object code or executable forms of those sections, and are licensed under the applicable Excepted License as the corresponding object code or executable forms of those sections, and
3. any works which are aggregated with the Program, or with a modified version on a volume of a storage or distribution medium in accordance with the GPL, are aggregates (as defined in Section 5 of the GPL) which can reasonably be considered independent and separate works in themselves and which are not modified versions of either the Program, a modified version, or an Excepted Work.
If the above conditions are not met, then the Program may only be copied, modified, distributed or used under the terms and conditions of the GPL or another valid licensing option from Appcelerator, Inc. Terms used but not defined in the foregoing paragraph have the meanings given in the GPL.
-----------------------------------------------------------------------
Excepted License List
* Apache Software License: version 1.0, 1.1, 2.0
* Eclipse Public License: version 1.0
* GNU General Public License: version 2.0
* GNU Lesser General Public License: version 2.0
* License of Jaxer
* License of HTML jTidy
* Mozilla Public License: version 1.1
* W3C License
* BSD License
* MIT License
* Aptana Commercial Licenses
This list may be modified by Appcelerator from time to time. See Appcelerator's website for the latest version.
-----------------------------------------------------------------------
Attribution Requirement
This license does not grant any license or rights to use the trademarks "Aptana," any "Aptana" logos, or any other trademarks of Appcelerator, Inc. You are not authorized to use the name Aptana or the names of any author or contributor for publicity purposes, without written authorization.
However, in addition to the other notice obligations of this License, all copies of any covered work conveyed by you must include on each user interface screen and in the Appropriate Legal Notices the following text: "Powered by Aptana". On user interface screens, this text must be visibly and clearly displayed in the title bar, status bar, or otherwise directly in the view that is in focus.
| 0 |
yomorun/hashids-java | Hashids algorithm v1.0.0 implementation in Java | 2014-04-18T01:45:57Z | null | # Hashids.java [![Version](https://maven-badges.herokuapp.com/maven-central/org.hashids/hashids/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.hashids/hashids) [![Stories in Ready](https://badge.waffle.io/10cella/hashids-java.png?label=ready&title=Ready)](https://waffle.io/10cella/hashids-java) [![CircleCI](https://circleci.com/gh/10cella/hashids-java/tree/master.svg?style=shield)](https://circleci.com/gh/10cella/hashids-java/tree/master)
A small Java class to generate YouTube-like hashes from one or many numbers.
Ported from javascript [hashids.js](https://github.com/ivanakimov/hashids.js) by [Ivan Akimov](https://github.com/ivanakimov)
## What is it?
hashids (Hash ID's) creates short, unique, decodable hashes from unsigned (long) integers.
It was designed for websites to use in URL shortening, tracking stuff, or making pages private (or at least unguessable).
This algorithm tries to satisfy the following requirements:
1. Hashes must be unique and decodable.
2. They should be able to contain more than one integer (so you can use them in complex or clustered systems).
3. You should be able to specify minimum hash length.
4. Hashes should not contain basic English curse words (since they are meant to appear in public places - like the URL).
Instead of showing items as `1`, `2`, or `3`, you could show them as `U6dc`, `u87U`, and `HMou`.
You don't have to store these hashes in the database, but can encode + decode on the fly.
All (long) integers need to be greater than or equal to zero.
## Usage
#### Add the dependency
hashids is available in Maven Central. If you are using Maven, add the following dependency to your pom.xml's dependencies:
```
<dependency>
<groupId>org.hashids</groupId>
<artifactId>hashids</artifactId>
<version>1.0.3</version>
</dependency>
```
Alternatively, if you use gradle or are on android, add the following to your app's `build.gradle` file under dependencies:
```
compile 'org.hashids:hashids:1.0.3'
```
#### Import the package
```java
import org.hashids;
```
#### Encoding one number
You can pass a unique salt value so your hashes differ from everyone else's. I use "this is my salt" as an example.
```java
Hashids hashids = new Hashids("this is my salt");
String hash = hashids.encode(12345L);
```
`hash` is now going to be:
NkK9
#### Decoding
Notice during decoding, same salt value is used:
```java
Hashids hashids = new Hashids("this is my salt");
long[] numbers = hashids.decode("NkK9");
```
`numbers` is now going to be:
[ 12345 ]
#### Decoding with different salt
Decoding will not work if salt is changed:
```java
Hashids hashids = new Hashids("this is my pepper");
long[] numbers = hashids.decode("NkK9");
```
`numbers` is now going to be:
[]
#### Encoding several numbers
```java
Hashids hashids = new Hashids("this is my salt");
String hash = hashids.encode(683L, 94108L, 123L, 5L);
```
`hash` is now going to be:
aBMswoO2UB3Sj
#### Decoding is done the same way
```java
Hashids hashids = new Hashids("this is my salt");
long[] numbers = hashids.decode("aBMswoO2UB3Sj");
```
`numbers` is now going to be:
[ 683, 94108, 123, 5 ]
#### Encoding and specifying minimum hash length
Here we encode integer 1, and set the minimum hash length to **8** (by default it's **0** -- meaning hashes will be the shortest possible length).
```java
Hashids hashids = new Hashids("this is my salt", 8);
String hash = hashids.encode(1L);
```
`hash` is now going to be:
gB0NV05e
#### Decoding
```java
Hashids hashids = new Hashids("this is my salt", 8);
long[] numbers = hashids.decode("gB0NV05e");
```
`numbers` is now going to be:
[ 1 ]
#### Specifying custom hash alphabet
Here we set the alphabet to consist of only six letters: "0123456789abcdef"
```java
Hashids hashids = new Hashids("this is my salt", 0, "0123456789abcdef");
String hash = hashids.encode(1234567L);
```
`hash` is now going to be:
b332db5
### Encoding and decoding "MongoDB" ids
In addition to encoding and decoding long values Hashids provides functionality
for encoding and decoding ids in a hex notation such as object ids generated by
MongoDB.
```java
Hashids hashids = new Hashids("This is my salt");
String hash = hashids.encodeHex("507f1f77bcf86cd799439011"); // goMYDnAezwurPKWKKxL2
String objectId = hashids.decodeHex(hash); // 507f1f77bcf86cd799439011
```
Note that the algorithm used for encoding and decoding hex values is not
compatible with the algorthm for encoding and decoding long values. That
means that you cannot use `decodeHex` to extract a hex representation of
a long id that was encoded with `encode`.
## Randomness
The primary purpose of hashids is to obfuscate ids. It's not meant or tested to be used for security purposes or compression.
Having said that, this algorithm does try to make these hashes unguessable and unpredictable:
#### Repeating numbers
```java
Hashids hashids = new Hashids("this is my salt");
String hash = hashids.encode(5L, 5L, 5L, 5L);
```
You don't see any repeating patterns that might show there's 4 identical numbers in the hash:
1Wc8cwcE
Same with incremented numbers:
```java
Hashids hashids = new Hashids("this is my salt");
String hash = hashids.encode(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L);
```
`hash` will be :
kRHnurhptKcjIDTWC3sx
### Incrementing number hashes:
```java
Hashids hashids = new Hashids("this is my salt");
String hash1 = hashids.encode(1L); /* NV */
String hash2 = hashids.encode(2L); /* 6m */
String hash3 = hashids.encode(3L); /* yD */
String hash4 = hashids.encode(4L); /* 2l */
String hash5 = hashids.encode(5L); /* rD */
```
## Bad hashes
I wrote this class with the intent of placing these hashes in visible places - like the URL. If I create a unique hash for each user, it would be unfortunate if the hash ended up accidentally being a bad word. Imagine auto-creating a URL with hash for your user that looks like this - `http://example.com/user/a**hole`
Therefore, this algorithm tries to avoid generating most common English curse words with the default alphabet. This is done by never placing the following letters next to each other:
c, C, s, S, f, F, h, H, u, U, i, I, t, T
## Limitations
The original and reference implementation is the [JS](https://github.com/ivanakimov/hashids.js) ([Hashids Website](http://hashids.org)) version. JS `number` limitation is `(2^53 - 1)`. Our java implementation uses `Long`, but is limited to the same limits JS is, for the sake of compatibility. If a bigger number is provided, an `IllegalArgumentException` will be thrown.
## Contributors
+ [C.C.](https://github.com/fanweixiao)
+ [0x3333](https://github.com/0x3333)
## Contact
Follow me [C.C.(@fanweixiao)](https://twitter.com/fanweixiao), [@IvanAkimov](http://twitter.com/ivanakimov), [@0x3333](https://twitter.com/0x3333).
## License
MIT License. See the `LICENSE` file.
| 0 |
xuhuisheng/lemon | 开源OA | 2013-11-13T17:11:49Z | null | lemon
=====
[![Build Status](https://travis-ci.org/xuhuisheng/lemon.png)](https://travis-ci.org/xuhuisheng/lemon)
开源OA
http://www.mossle.com/
| 0 |
aimacode/aima-java | Java implementation of algorithms from Russell And Norvig's Artificial Intelligence - A Modern Approach"" | 2015-03-12T21:25:57Z | null | # ![](https://github.com/aimacode/aima-java/blob/gh-pages/aima3e/images/aima3e.jpg)AIMA3e-Java (JDK 8+) [![Build Status](https://travis-ci.org/aimacode/aima-java.svg?branch=AIMA3e)](https://travis-ci.org/aimacode/aima-java) [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/aimacode/aima-java/AIMA3e)
Java implementation of algorithms from [Russell](http://www.cs.berkeley.edu/~russell/) and [Norvig's](http://www.norvig.com/) [Artificial Intelligence - A Modern Approach 3rd Edition](http://aima.cs.berkeley.edu/). You can use this in conjunction with a course on AI, or for study on your own. We're looking for [solid contributors](https://github.com/aimacode/aima-java/wiki/AIMAJava-Contributing) to help.
### Getting Started Links
* [Overview of Project](https://github.com/aimacode/aima-java/wiki/AIMA3e-Overview)
* [Interested in Contributing](https://github.com/aimacode/aima-java/wiki/AIMAJava-Contributing)
* [Setting up your own workspace](https://github.com/aimacode/aima-java/wiki/AIMA3e-Workspace-Setup)
* [Comments on architecture and design](https://github.com/aimacode/aima-java/wiki/AIMA3e-Architecture-and-Design)
* [Demo Applications that can be run from your browser (unfortunately not up to date)](http://aimacode.github.io/aima-java/aima3e/aima3ejavademos.html)
* [Javadoc for the aima-core project (outdated)](http://aimacode.github.io/aima-java/aima3e/javadoc/aima-core/index.html)
* [Download the latest official (but outdated) version = 1.9.1 (Dec 18 2016)](https://github.com/aimacode/aima-java/releases/tag/aima3e-v1.9.1)
* Latest Maven Information (for integration as a third party library)<br>
```
<dependency>
<groupId>com.googlecode.aima-java</groupId>
<artifactId>aima-core</artifactId>
<version>3.0.0</version>
</dependency>
```
### Index of Implemented Algorithms
|Figure|Page|Name (in 3<sup>rd</sup> edition)|Code
| -------- |:--------:| :-----| :----- |
|2|34|Environment|[Environment](/aima-core/src/main/java/aima/core/agent/Environment.java)|
|2.1|35|Agent|[Agent](/aima-core/src/main/java/aima/core/agent/Agent.java)|
|2.3|36|Table-Driven-Vacuum-Agent|[TableDrivenVacuumAgent](/aima-core/src/main/java/aima/core/environment/vacuum/TableDrivenVacuumAgent.java)|
|2.7|47|Table-Driven-Agent|[TableDrivenAgentProgram](/aima-core/src/main/java/aima/core/agent/impl/aprog/TableDrivenAgentProgram.java)|
|2.8|48|Reflex-Vacuum-Agent|[ReflexVacuumAgent](/aima-core/src/main/java/aima/core/environment/vacuum/ReflexVacuumAgent.java)|
|2.10|49|Simple-Reflex-Agent|[SimpleReflexAgentProgram](/aima-core/src/main/java/aima/core/agent/impl/aprog/SimpleReflexAgentProgram.java)|
|2.12|51|Model-Based-Reflex-Agent|[ModelBasedReflexAgentProgram](/aima-core/src/main/java/aima/core/agent/impl/aprog/ModelBasedReflexAgentProgram.java)|
|3|66|Problem|[Problem](/aima-core/src/main/java/aima/core/search/framework/problem/Problem.java)|
|3.1|67|Simple-Problem-Solving-Agent|[SimpleProblemSolvingAgent](/aima-core/src/main/java/aima/core/search/agent/SimpleProblemSolvingAgent.java)|
|3.2|68|Romania|[SimplifiedRoadMapOfRomania](/aima-core/src/main/java/aima/core/environment/map/SimplifiedRoadMapOfRomania.java)|
|3.7|77|Tree-Search|[TreeSearch](/aima-core/src/main/java/aima/core/search/framework/qsearch/TreeSearch.java)|
|3.7|77|Graph-Search|[GraphSearch](/aima-core/src/main/java/aima/core/search/framework/qsearch/GraphSearch4e.java)|
|3.10|79|Node|[Node](/aima-core/src/main/java/aima/core/search/framework/Node.java)|
|3.11|82|Breadth-First-Search|[BreadthFirstSearch](/aima-core/src/main/java/aima/core/search/uninformed/BreadthFirstSearch.java)|
|3.14|84|Uniform-Cost-Search|[UniformCostSearch](/aima-core/src/main/java/aima/core/search/uninformed/UniformCostSearch.java)|
|3|85|Depth-first Search|[DepthFirstSearch](/aima-core/src/main/java/aima/core/search/uninformed/DepthFirstSearch.java)|
|3.17|88|Depth-Limited-Search|[DepthLimitedSearch](/aima-core/src/main/java/aima/core/search/uninformed/DepthLimitedSearch.java)|
|3.18|89|Iterative-Deepening-Search|[IterativeDeepeningSearch](/aima-core/src/main/java/aima/core/search/uninformed/IterativeDeepeningSearch.java)|
|3|90|Bidirectional search|[BidirectionalSearch](/aima-core/src/main/java/aima/core/search/framework/qsearch/BidirectionalSearch.java)|
|3|92|Best-First search|[BestFirstSearch](/aima-core/src/main/java/aima/core/search/informed/BestFirstSearch.java)|
|3|92|Greedy best-First search|[GreedyBestFirstSearch](/aima-core/src/main/java/aima/core/search/informed/GreedyBestFirstSearch.java)|
|3|93|A\* Search|[AStarSearch](/aima-core/src/main/java/aima/core/search/informed/AStarSearch.java)|
|3.26|99|Recursive-Best-First-Search |[RecursiveBestFirstSearch](/aima-core/src/main/java/aima/core/search/informed/RecursiveBestFirstSearch.java)|
|4.2|122|Hill-Climbing|[HillClimbingSearch](/aima-core/src/main/java/aima/core/search/local/HillClimbingSearch.java)|
|4.5|126|Simulated-Annealing|[SimulatedAnnealingSearch](/aima-core/src/main/java/aima/core/search/local/SimulatedAnnealingSearch.java)|
|4.8|129|Genetic-Algorithm|[GeneticAlgorithm](/aima-core/src/main/java/aima/core/search/local/GeneticAlgorithm.java)|
|4.11|136|And-Or-Graph-Search|[AndOrSearch](/aima-core/src/main/java/aima/core/search/nondeterministic/AndOrSearch.java)|
|4|147|Online search problem|[OnlineSearchProblem](/aima-core/src/main/java/aima/core/search/framework/problem/OnlineSearchProblem.java)|
|4.21|150|Online-DFS-Agent|[OnlineDFSAgent](/aima-core/src/main/java/aima/core/search/online/OnlineDFSAgent.java)|
|4.24|152|LRTA\*-Agent|[LRTAStarAgent](/aima-core/src/main/java/aima/core/search/online/LRTAStarAgent.java)|
|5.3|166|Minimax-Decision|[MinimaxSearch](/aima-core/src/main/java/aima/core/search/adversarial/MinimaxSearch.java)|
|5.7|170|Alpha-Beta-Search|[AlphaBetaSearch](/aima-core/src/main/java/aima/core/search/adversarial/AlphaBetaSearch.java)|
|6|202|CSP|[CSP](/aima-core/src/main/java/aima/core/search/csp/CSP.java)|
|6.1|204|Map CSP|[MapCSP](/aima-core/src/main/java/aima/core/search/csp/examples/MapCSP.java)|
|6.3|209|AC-3|[AC3Strategy](/aima-core/src/main/java/aima/core/search/csp/solver/inference/AC3Strategy.java)|
|6.5|215|Backtracking-Search|[AbstractBacktrackingSolver](/aima-core/src/main/java/aima/core/search/csp/solver/AbstractBacktrackingSolver.java)|
|6.8|221|Min-Conflicts|[MinConflictsSolver](/aima-core/src/main/java/aima/core/search/csp/solver/MinConflictsSolver.java)|
|6.11|224|Tree-CSP-Solver|[TreeCspSolver](/aima-core/src/main/java/aima/core/search/csp/solver/TreeCspSolver.java)|
|7|235|Knowledge Base|[KnowledgeBase](/aima-core/src/main/java/aima/core/logic/propositional/kb/KnowledgeBase.java)|
|7.1|236|KB-Agent|[KBAgent](/aima-core/src/main/java/aima/core/logic/propositional/agent/KBAgent.java)|
|7.7|244|Propositional-Logic-Sentence|[Sentence](/aima-core/src/main/java/aima/core/logic/propositional/parsing/ast/Sentence.java)|
|7.10|248|TT-Entails|[TTEntails](/aima-core/src/main/java/aima/core/logic/propositional/inference/TTEntails.java)|
|7|253|Convert-to-CNF|[ConvertToCNF](/aima-core/src/main/java/aima/core/logic/propositional/transformations/ConvertToCNF.java)|
|7.12|255|PL-Resolution|[PLResolution](/aima-core/src/main/java/aima/core/logic/propositional/inference/PLResolution.java)|
|7.15|258|PL-FC-Entails?|[PLFCEntails](/aima-core/src/main/java/aima/core/logic/propositional/inference/PLFCEntails.java)|
|7.17|261|DPLL-Satisfiable?|[DPLLSatisfiable](/aima-core/src/main/java/aima/core/logic/propositional/inference/DPLLSatisfiable.java)|
|7.18|263|WalkSAT|[WalkSAT](/aima-core/src/main/java/aima/core/logic/propositional/inference/WalkSAT.java)|
|7.20|270|Hybrid-Wumpus-Agent|[HybridWumpusAgent](/aima-core/src/main/java/aima/core/environment/wumpusworld/HybridWumpusAgent.java)|
|7.22|272|SATPlan|[SATPlan](/aima-core/src/main/java/aima/core/logic/propositional/inference/SATPlan.java)|
|9|323|Subst|[SubstVisitor](/aima-core/src/main/java/aima/core/logic/fol/SubstVisitor.java)|
|9.1|328|Unify|[Unifier](/aima-core/src/main/java/aima/core/logic/fol/Unifier.java)|
|9.3|332|FOL-FC-Ask|[FOLFCAsk](/aima-core/src/main/java/aima/core/logic/fol/inference/FOLFCAsk.java)|
|9.6|338|FOL-BC-Ask|[FOLBCAsk](/aima-core/src/main/java/aima/core/logic/fol/inference/FOLBCAsk.java)|
|9|345|CNF|[CNFConverter](/aima-core/src/main/java/aima/core/logic/fol/CNFConverter.java)|
|9|347|Resolution|[FOLTFMResolution](/aima-core/src/main/java/aima/core/logic/fol/inference/FOLTFMResolution.java)|
|9|354|Demodulation|[Demodulation](/aima-core/src/main/java/aima/core/logic/fol/inference/Demodulation.java)|
|9|354|Paramodulation|[Paramodulation](/aima-core/src/main/java/aima/core/logic/fol/inference/Paramodulation.java)|
|9|345|Subsumption|[SubsumptionElimination](/aima-core/src/main/java/aima/core/logic/fol/SubsumptionElimination.java)|
|10.9|383|Graphplan|[GraphPlan](/aima-core/src/main/java/aima/core/logic/planning/GraphPlanAlgorithm.java)|
|11.5|409|Hierarchical-Search|[HierarchicalSearchAlgorithm](/aima-core/src/main/java/aima/core/logic/planning/hierarchicalsearch/HierarchicalSearchAlgorithm.java)|
|11.8|414|Angelic-Search|---|
|13.1|484|DT-Agent|[DT-Agent](/aima-core/src/main/java/aima/core/agent/DTAgent.java)|
|13|484|Probability-Model|[ProbabilityModel](/aima-core/src/main/java/aima/core/probability/ProbabilityModel.java)|
|13|487|Probability-Distribution|[ProbabilityDistribution](/aima-core/src/main/java/aima/core/probability/ProbabilityDistribution.java)|
|13|490|Full-Joint-Distribution|[FullJointDistributionModel](/aima-core/src/main/java/aima/core/probability/full/FullJointDistributionModel.java)|
|14|510|Bayesian Network|[BayesianNetwork](/aima-core/src/main/java/aima/core/probability/bayes/BayesianNetwork.java)|
|14.9|525|Enumeration-Ask|[EnumerationAsk](/aima-core/src/main/java/aima/core/probability/bayes/exact/EnumerationAsk.java)|
|14.11|528|Elimination-Ask|[EliminationAsk](/aima-core/src/main/java/aima/core/probability/bayes/exact/EliminationAsk.java)|
|14.13|531|Prior-Sample|[PriorSample](/aima-core/src/main/java/aima/core/probability/bayes/approx/PriorSample.java)|
|14.14|533|Rejection-Sampling|[RejectionSampling](/aima-core/src/main/java/aima/core/probability/bayes/approx/RejectionSampling.java)|
|14.15|534|Likelihood-Weighting|[LikelihoodWeighting](/aima-core/src/main/java/aima/core/probability/bayes/approx/LikelihoodWeighting.java)|
|14.16|537|GIBBS-Ask|[GibbsAsk](/aima-core/src/main/java/aima/core/probability/bayes/approx/GibbsAsk.java)|
|15.4|576|Forward-Backward|[ForwardBackward](/aima-core/src/main/java/aima/core/probability/temporal/generic/ForwardBackward.java)|
|15|578|Hidden Markov Model|[HiddenMarkovModel](/aima-core/src/main/java/aima/core/probability/hmm/HiddenMarkovModel.java)|
|15.6|580|Fixed-Lag-Smoothing|[FixedLagSmoothing](/aima-core/src/main/java/aima/core/probability/hmm/exact/FixedLagSmoothing.java)|
|15|590|Dynamic Bayesian Network|[DynamicBayesianNetwork](/aima-core/src/main/java/aima/core/probability/bayes/DynamicBayesianNetwork.java)|
|15.17|598|Particle-Filtering|[ParticleFiltering](/aima-core/src/main/java/aima/core/probability/bayes/approx/ParticleFiltering.java)|
|16.9|632|Information-Gathering-Agent|[InformationGatheringAgent](/aima-core/src/main/java/aima/core/probability/InformationGatheringAgent.java)|
|17|647|Markov Decision Process|[MarkovDecisionProcess](/aima-core/src/main/java/aima/core/probability/mdp/MarkovDecisionProcess.java)|
|17.4|653|Value-Iteration|[ValueIteration](/aima-core/src/main/java/aima/core/probability/mdp/search/ValueIteration.java)|
|17.7|657|Policy-Iteration|[PolicyIteration](/aima-core/src/main/java/aima/core/probability/mdp/search/PolicyIteration.java)|
|17.9|663|POMDP-Value-Iteration|[POMDPValueIteration](/aima-core/src/main/java/aima/core/probability/mdp/search/POMDPValueIteration.java)|
|18.5|702|Decision-Tree-Learning|[DecisionTreeLearner](/aima-core/src/main/java/aima/core/learning/learners/DecisionTreeLearner.java)|
|18.8|710|Cross-Validation-Wrapper|[CrossValidation](/aima-core/src/main/java/aima/core/learning/inductive/CrossValidation.java)|
|18.11|717|Decision-List-Learning|[DecisionListLearner](/aima-core/src/main/java/aima/core/learning/learners/DecisionListLearner.java)|
|18.24|734|Back-Prop-Learning|[BackPropLearning](/aima-core/src/main/java/aima/core/learning/neural/BackPropLearning.java)|
|18.34|751|AdaBoost|[AdaBoostLearner](/aima-core/src/main/java/aima/core/learning/learners/AdaBoostLearner.java)|
|19.2|771|Current-Best-Learning|[CurrentBestLearning](/aima-core/src/main/java/aima/core/learning/knowledge/CurrentBestLearning.java)|
|19.3|773|Version-Space-Learning|[VersionSpaceLearning](/aima-core/src/main/java/aima/core/learning/knowledge/VersionSpaceLearning.java)|
|19.8|786|Minimal-Consistent-Det|[MinimalConsistentDet](/aima-core/src/main/java/aima/core/learning/knowledge/MinimalConsistentDet.java)|
|19.12|793|FOIL|[FOIL](https://github.com/aimacode/aima-java/blob/AIMA3e/aima-core/src/main/java/aima/core/learning/knowledge/FOIL.java)|
|21.2|834|Passive-ADP-Agent|[PassiveADPAgent](/aima-core/src/main/java/aima/core/learning/reinforcement/agent/PassiveADPAgent.java)|
|21.4|837|Passive-TD-Agent|[PassiveTDAgent](/aima-core/src/main/java/aima/core/learning/reinforcement/agent/PassiveTDAgent.java)|
|21.8|844|Q-Learning-Agent|[QLearningAgent](/aima-core/src/main/java/aima/core/learning/reinforcement/agent/QLearningAgent.java)|
|22.1|871|HITS|[HITS](/aima-core/src/main/java/aima/core/nlp/ranking/HITS.java)|
|23.5|894|CYK-Parse|[CYK](/aima-core/src/main/java/aima/core/nlp/parsing/CYK.java)|
|25.9|982|Monte-Carlo-Localization|[MonteCarloLocalization](/aima-core/src/main/java/aima/core/robotics/MonteCarloLocalization.java)|
### Index of implemented notebooks
|Chapter No|Name |Status (in 3<sup>rd</sup> edition)|Status (in 4<sup>th</sup> edition)
| -------- |:--------:| :-----| :----- |
|3| [Solving Problems by Searching](https://github.com/aimacode/aima-java/blob/AIMA3e/notebooks/ClassicalSearch.ipynb)| In Progress| Not started|
|6| [Constraint Satisfaction Problems](https://github.com/aimacode/aima-java/blob/AIMA3e/notebooks/ProbabilisticReasoning.ipynb) |In Progress|---|
|12| [Knowledge Representation](https://github.com/aimacode/aima-java/blob/AIMA3e/notebooks/KnowledgeRepresentation.ipynb)|Done|---|
|13| [Quantifying Uncertainty](https://github.com/aimacode/aima-java/blob/AIMA3e/notebooks/QuantifyingUncertainty.ipynb) |Done | --- |
|14| [Probabilistic Reasoning](https://github.com/aimacode/aima-java/blob/AIMA3e/notebooks/ProbabilisticReasoning.ipynb)|In Progress| ---|
Before starting to work on a new notebook:
1. Open a new issue with the following heading: **Notebook: Chapter Name - Version **. Check that the issue is not assigned to anyone.
2. Mention a topics list of what you will be implementing in the notebook for that particular chapter. You can iteratively refine the list once you start working.
3. Start a discussion on what can go in that particular notebook.
### "---" indicates algorithms yet to be implemented.
### Index of data structures
Here is a table of the data structures yet to be implemented.
|Fig|Page|Name (in book)|Code|
| -------- |:--------:| :-----| :----- |
|9.8|341|Append|---|
|10.1|369|AIR-CARGO-TRANSPORT-PROBLEM|---|
|10.2|370|SPARE-TIRE-PROBLEM|---|
|10.3|371|BLOCKS-WORLD |---|
|10.7|380|HAVE-CAKE-AND-EAT-CAKE-TOO-PROBLEM|---|
|11.1|402|JOB-SHOP-SCHEDULING-PROBLEM|---|
|11.4|407|REFINEMENT-HIGH-LEVEL-ACTIONS|---|
|23.6|895|SENTENCE-TREE|---|
|29.1|1062|POWERS-OF-2|---|
| 0 |
rapidoid/rapidoid | Rapidoid - Extremely Fast, Simple and Powerful Java Web Framework and HTTP Server! | 2014-04-07T17:00:47Z | null | Rapidoid - Simple. Powerful. Secure. Fast!
========
Rapidoid is an extremely fast HTTP server and modern Java web framework / application container, with a strong focus on high productivity and high performance.
# Documentation, examples, community support
Please visit the official site:
[http://www.rapidoid.org/](http://www.rapidoid.org/)
# Apache License v2
Rapidoid is released under the liberal Apache Public License v2, so it is free to use for both commercial and non-commercial projects.
# Roadmap
* Better documentation (work in progress - as always)
* Swagger / OpenAPI support
# Contributing
1. Fork (and then `git clone https://github.com/<your-username-here>/rapidoid.git`).
2. Make your changes
3. Commit your changes (`git commit -am "Description of contribution"`).
4. Push to GitHub (`git push`).
5. Open a Pull Request.
6. Please sign the CLA.
7. Thank you for your contribution! Wait for a response...
| 0 |
gjiazhe/WaveSideBar | An Index Side Bar With Wave Effect | 2016-08-23T14:34:42Z | null | # WaveSideBar
You can use WaveSideBar in the contacts page of your application.
Refer to [AlexLiuSheng/AnimSideBar](https://github.com/AlexLiuSheng/AnimSideBar).
## Screenshot
![Screenshot](screenshot/gif.gif)
## Include the WaveSideBar to Your Project
With gradle:
```groovy
dependencies {
compile 'com.gjiazhe:wavesidebar:1.3'
}
```
## Use WaveSideBar in Layout File
```xml
<com.gjiazhe.wavesidebar.WaveSideBar
android:id="@+id/side_bar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingRight="8dp"
app:sidebar_position="right"
app:sidebar_max_offset="80dp"
app:sidebar_lazy_respond="false"
app:sidebar_text_color="#8D6E63"
app:sidebar_text_size="14sp"
app:sidebar_text_alignment="center"/>
```
## Description of Attributes
| Attributes | Format | Default | Description |
| :--------------------: | :------------------------: | :--------: | :--------------------------------------: |
| sidebar_text_color | color | Color.GRAY | Text color of side bar. |
| sidebar_text_size | dimension | 14sp | Text size of side bar. |
| sidebar_max_offset | dimension | 80dp | Offset of the selected item. |
| sidebar_position | enum {right, left} | right | Be placed on left or right in the view. |
| sidebar_text_alignment | enum {center, left, right} | center | Alignment of items. |
| sidebar_lazy_respond | boolean | false | If __true__, the listener will not be called until the finger __up__. If __false__, the listener will be called when the finger __down__, __move__ and __up__. |
You can set these attributes in the layout file, or in the java code:
```java
WaveSideBar sideBar = (WaveSideBar) findViewById(R.id.side_bar);
sideBar.setTextColor(Color.BLACK);
sideBar.setMaxOffset(100);
sideBar.setPosition(WaveSideBar.POSITION_LEFT);
sideBar.setTextAlign(WaveSideBar.TEXT_ALIGN_CENTER);
sideBar.setLazyRespond(true);
```
## Set the Listener to Observe WaveSideBar
```java
WaveSideBar sideBar = (WaveSideBar) findViewById(R.id.side_bar);
sideBar.setOnSelectIndexItemListener(new WaveSideBar.OnSelectIndexItemListener() {
@Override
public void onSelectIndexItem(String index) {
Log.d("WaveSideBar", index);
// Do something here ....
}
});
```
## Customize the indexes
Use **setIndexItems** to Customize the indexes.
```java
sideBar.setIndexItems("あ", "か", "さ", "た", "な", "は", "ま", "や", "ら", "わ");
```
<img src="screenshot/japanese1.png" width="400">
<img src="screenshot/japanese2.png" width="400">
## Use Left Hand?
Use **setPosition** to change the position of side bar.
```java
sideBar.setPosition(WaveSideBar.POSITION_LEFT);
```
<img src="screenshot/position_left.png" width="400">
## Lazy respond
use **setLazyRespond** to set whether the side bar should respond lazily to your touch events.
```java
sideBar.setLazyRespond(true);
```
![Screenshot](screenshot/lazy_respond.gif)
| 0 |
amaembo/streamex | Enhancing Java Stream API | 2015-04-10T17:02:32Z | null | # StreamEx 0.8.2
Enhancing Java Stream API.
[![Maven Central](https://img.shields.io/maven-central/v/one.util/streamex.svg)](https://maven-badges.herokuapp.com/maven-central/one.util/streamex/)
[![Javadocs](https://www.javadoc.io/badge/one.util/streamex.svg)](https://www.javadoc.io/doc/one.util/streamex)
[![Build Status](https://github.com/amaembo/streamex/actions/workflows/test.yml/badge.svg)](https://github.com/amaembo/streamex/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/amaembo/streamex/badge.svg?branch=master&service=github)](https://coveralls.io/github/amaembo/streamex?branch=master)
This library defines four classes: `StreamEx`, `IntStreamEx`, `LongStreamEx`, `DoubleStreamEx`
which are fully compatible with Java 8 stream classes and provide many additional useful methods.
Also `EntryStream` class is provided which represents the stream of map entries and provides
additional functionality for this case. Finally, there are some new useful collectors defined in `MoreCollectors`
class as well as primitive collectors concept.
Full API documentation is available [here](http://amaembo.github.io/streamex/javadoc/).
Take a look at the [Cheatsheet](wiki/CHEATSHEET.md) for brief introduction to the StreamEx!
Before updating StreamEx check the [migration notes](wiki/MIGRATION.md) and full list of [changes](wiki/CHANGES.md).
StreamEx library main points are following:
* Shorter and convenient ways to do the common tasks.
* Better interoperability with older code.
* 100% compatibility with original JDK streams.
* Friendliness for parallel processing: any new feature takes the advantage on parallel streams as much as possible.
* Performance and minimal overhead. If StreamEx allows to solve the task using less code compared to standard Stream, it
should not be significantly slower than the standard way (and sometimes it's even faster).
### Examples
Collector shortcut methods (toList, toSet, groupingBy, joining, etc.)
```java
List<String> userNames = StreamEx.of(users).map(User::getName).toList();
Map<Role, List<User>> role2users = StreamEx.of(users).groupingBy(User::getRole);
StreamEx.of(1,2,3).joining("; "); // "1; 2; 3"
```
Selecting stream elements of specific type
```java
public List<Element> elementsOf(NodeList nodeList) {
return IntStreamEx.range(nodeList.getLength())
.mapToObj(nodeList::item).select(Element.class).toList();
}
```
Adding elements to stream
```java
public List<String> getDropDownOptions() {
return StreamEx.of(users).map(User::getName).prepend("(none)").toList();
}
public int[] addValue(int[] arr, int value) {
return IntStreamEx.of(arr).append(value).toArray();
}
```
Removing unwanted elements and using the stream as Iterable:
```java
public void copyNonEmptyLines(Reader reader, Writer writer) throws IOException {
for(String line : StreamEx.ofLines(reader).remove(String::isEmpty)) {
writer.write(line);
writer.write(System.lineSeparator());
}
}
```
Selecting map keys by value predicate:
```java
Map<String, Role> nameToRole;
public Set<String> getEnabledRoleNames() {
return StreamEx.ofKeys(nameToRole, Role::isEnabled).toSet();
}
```
Operating on key-value pairs:
```java
public Map<String, List<String>> invert(Map<String, List<String>> map) {
return EntryStream.of(map).flatMapValues(List::stream).invert().grouping();
}
public Map<String, String> stringMap(Map<Object, Object> map) {
return EntryStream.of(map).mapKeys(String::valueOf)
.mapValues(String::valueOf).toMap();
}
Map<String, Group> nameToGroup;
public Map<String, List<User>> getGroupMembers(Collection<String> groupNames) {
return StreamEx.of(groupNames).mapToEntry(nameToGroup::get)
.nonNullValues().mapValues(Group::getMembers).toMap();
}
```
Pairwise differences:
```java
DoubleStreamEx.of(input).pairMap((a, b) -> b-a).toArray();
```
Support of byte/char/short/float types:
```java
short[] multiply(short[] src, short multiplier) {
return IntStreamEx.of(src).map(x -> x*multiplier).toShortArray();
}
```
Define custom lazy intermediate operation recursively:
```java
static <T> StreamEx<T> scanLeft(StreamEx<T> input, BinaryOperator<T> operator) {
return input.headTail((head, tail) -> scanLeft(tail.mapFirst(cur -> operator.apply(head, cur)), operator)
.prepend(head));
}
```
And more!
### License
This project is licensed under [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
### Installation
Releases are available in [Maven Central](https://repo1.maven.org/maven2/one/util/streamex/)
Before updating StreamEx check the [migration notes](wiki/MIGRATION.md) and full list of [changes](wiki/CHANGES.md).
#### Maven
Add this snippet to the pom.xml `dependencies` section:
```xml
<dependency>
<groupId>one.util</groupId>
<artifactId>streamex</artifactId>
<version>0.8.2</version>
</dependency>
```
#### Gradle
Add this snippet to the build.gradle `dependencies` section:
```groovy
implementation 'one.util:streamex:0.8.2'
```
Pull requests are welcome.
| 0 |
renrenio/renren-security | 采用Spring、MyBatis、Shiro框架,开发的一套权限系统,极低门槛,拿来即用。设计之初,就非常注重安全性,为企业系统保驾护航,让一切都变得如此简单。【QQ群:324780204、145799952】 | 2016-12-27T14:59:36Z | null | ### 项目说明
- renren-security是一个轻量级的,前后端分离的Java快速开发平台,能快速开发项目并交付【接私活利器】
- 采用SpringBoot、Shiro、MyBatis-Plus框架,开发的一套权限系统,极低门槛,拿来即用。设计之初,就非常注重安全性,为企业系统保驾护航,让一切都变得如此简单。
- 提供了代码生成器,只需编写30%左右代码,其余的代码交给系统自动生成,可快速完成开发任务
- 支持MySQL、Oracle、SQL Server、PostgreSQL等主流数据库
- 前端地址:https://gitee.com/renrenio/renren-ui
- 演示地址:http://demo.open.renren.io/renren-security (账号密码:admin/admin)
<br>
### 微信交流群
我们提供了微信交流群,扫码下面的二维码,关注【人人开源】公众号,回复【加群】,即可根据提示加入微信群!
<br><br>
![输入图片说明](renren-admin/src/main/resources/public/wechat.jpg)
<br>
### 具有如下特点
- 友好的代码结构及注释,便于阅读及二次开发
- 实现前后端分离,通过token进行数据交互,前端再也不用关注后端技术
- 灵活的权限控制,可控制到页面或按钮,满足绝大部分的权限需求
- 提供CrudService接口,对增删改查进行封装,代码更简洁
- 页面交互使用Vue2.x,极大的提高了开发效率
- 完善的部门管理及数据权限,通过注解实现数据权限的控制
- 完善的XSS防范及脚本过滤,彻底杜绝XSS攻击
- 完善的代码生成机制,可在线生成entity、xml、dao、service、vue、sql代码,减少70%以上的开发任务
- 引入quartz定时任务,可动态完成任务的添加、修改、删除、暂停、恢复及日志查看等功能
- 引入Hibernate Validator校验框架,轻松实现后端校验
- 引入云存储服务,已支持:七牛云、阿里云、腾讯云等
- 引入swagger文档支持,方便编写API接口文档
<br>
### 数据权限设计思想
- 用户管理、角色管理、部门管理,可操作本部门及子部门数据
- 菜单管理、定时任务、参数管理、字典管理、系统日志,没有数据权限
- 业务功能,按照用户数据权限,查询、操作数据【没有本部门数据权限,也能查询本人数据】
<br>
**项目结构**
```
renren-security
├─renren-common 公共模块
│
├─renren-admin 管理后台
│ ├─db 数据库SQL脚本
│ │
│ ├─modules 模块
│ │ ├─job 定时任务
│ │ ├─log 日志管理
│ │ ├─oss 文件存储
│ │ ├─security 安全模块
│ │ └─sys 系统管理(核心)
│ │
│ └─resources
│ ├─mapper MyBatis文件
│ ├─public 静态资源
│ └─application.yml 全局配置文件
│
│
├─renren-api API服务
│
├─renren-generator 代码生成器
│ └─resources
│ ├─mapper MyBatis文件
│ ├─template 代码生成器模板(可增加或修改相应模板)
│ ├─application.yml 全局配置文件
│ └─generator.properties 代码生成器,配置文件
│
```
<br>
**技术选型:**
- 核心框架:Spring Boot 2.6
- 安全框架:Apache Shiro 1.9
- 持久层框架:MyBatis 3.5
- 定时器:Quartz 2.3
- 数据库连接池:Druid 1.2
- 日志管理:Logback
- 页面交互:Vue2.x
<br>
**软件需求**
- JDK1.8
- Maven3.0+
- MySQL8.0
- Oracle 11g+
- SQL Server 2012+
- PostgreSQL 9.4+
<br>
**本地部署**
- 通过git下载源码
- idea、eclipse需安装lombok插件,不然会提示找不到entity的get set方法
- 创建数据库renren_security,数据库编码为UTF-8
- 执行db/mysql.sql文件,初始化数据
- 修改application-dev.yml文件,更新MySQL账号和密码
- 在renren-security目录下,执行mvn clean install
- Eclipse、IDEA运行AdminApplication.java,则可启动项目【renren-admin】
- renren-admin访问路径:http://localhost:8080/renren-admin
- swagger文档路径:http://localhost:8080/renren-admin/doc.html
- 再启动前端项目,前端地址:https://gitee.com/renrenio/renren-ui
- 账号密码:admin/admin
<br>
![输入图片说明](renren-admin/src/main/resources/public/1.png)
<br>
![输入图片说明](renren-admin/src/main/resources/public/2.png)
<br>
### 如何交流、反馈、参与贡献?
- 开发文档:https://www.renren.io/guide/security
- 官方社区:https://www.renren.io/community
- Gitee仓库:https://gitee.com/renrenio/renren-security
- [人人开源](https://www.renren.io):https://www.renren.io
- 如需关注项目最新动态,请Watch、Star项目,同时也是对项目最好的支持
- 技术讨论、二次开发等咨询、问题和建议,请移步到官方社区,我会在第一时间进行解答和回复!
<br>
| 0 |
MiguelCatalan/MaterialSearchView | Cute library to implement SearchView in a Material Design Approach | 2015-09-14T17:13:46Z | null | # MaterialSearchView
Cute library to implement SearchView in a Material Design Approach. *Works from Android API 14 (ICS) and above*.
![sample](https://raw.githubusercontent.com/MiguelCatalan/MaterialSearchView/master/art/voice.gif) ![sample](https://raw.githubusercontent.com/MiguelCatalan/MaterialSearchView/master/art/default.gif)
<a href="https://play.google.com/store/apps/details?id=com.miguelcatalan.materialsearchview.sample">
<img alt="Get it on Google Play"
src="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png" />
</a>
#Native version
Maybe it would be useful to take a look into the new official approach
http://www.materialdoc.com/search-filter/
# Usage
**Add the dependencies to your gradle file:**
```javascript
dependencies {
compile 'com.miguelcatalan:materialsearchview:1.4.0'
}
```
**Add MaterialSearchView to your layout file along with the Toolbar** *(Add this block at the bottom of your layout, in order to display it over the rest of the view)*:
```xml
<!— Must be last for right layering display —>
<FrameLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/theme_primary" />
<com.miguelcatalan.materialsearchview.MaterialSearchView
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</FrameLayout>
```
**Add the search item into the menu file:**
```xml
<item
android:id="@+id/action_search"
android:icon="@drawable/ic_action_action_search"
android:orderInCategory="100"
android:title="@string/abc_search_hint"
app:showAsAction="always" />
```
**Add define it in the *onCreateOptionsMenu*:**
```java
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
MenuItem item = menu.findItem(R.id.action_search);
searchView.setMenuItem(item);
return true;
}
```
**Set the listeners:**
```java
MaterialSearchView searchView = (MaterialSearchView) findViewById(R.id.search_view);
searchView.setOnQueryTextListener(new MaterialSearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
//Do some magic
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
//Do some magic
return false;
}
});
searchView.setOnSearchViewListener(new MaterialSearchView.SearchViewListener() {
@Override
public void onSearchViewShown() {
//Do some magic
}
@Override
public void onSearchViewClosed() {
//Do some magic
}
});
```
# Use VoiceSearch
**Allow/Disable it in the code:**
```java
searchView.setVoiceSearch(true); //or false
```
**Handle the response:**
```java
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == MaterialSearchView.REQUEST_VOICE && resultCode == RESULT_OK) {
ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
if (matches != null && matches.size() > 0) {
String searchWrd = matches.get(0);
if (!TextUtils.isEmpty(searchWrd)) {
searchView.setQuery(searchWrd, false);
}
}
return;
}
super.onActivityResult(requestCode, resultCode, data);
}
```
# Add suggestions
**Define them in the resources as a *string-array*:**
```xml
<string-array name="query_suggestions">
<item>Android</item>
<item>iOS</item>
<item>SCALA</item>
<item>Ruby</item>
<item>JavaScript</item>
</string-array>
```
**Add them to the object:**
```java
searchView.setSuggestions(getResources().getStringArray(R.array.query_suggestions));
```
# Style it!
```xml
<style name="MaterialSearchViewStyle">
<!-- Background for the search bar -->
<item name="searchBackground">@color/theme_primary</item>
<!-- Change voice icon -->
<item name="searchVoiceIcon">@drawable/ic_action_voice_search_inverted</item>
<!-- Change clear text icon -->
<item name="searchCloseIcon">@drawable/ic_action_navigation_close_inverted</item>
<!-- Change up icon -->
<item name="searchBackIcon">@drawable/ic_action_navigation_arrow_back_inverted</item>
<!-- Change icon for the suggestions -->
<item name="searchSuggestionIcon">@drawable/ic_suggestion</item>
<!-- Change background for the suggestions list view -->
<item name="searchSuggestionBackground">@android:color/white</item>
<!-- Change text color for edit text. This will also be the color of the cursor -->
<item name="android:textColor">@color/theme_primary_text_inverted</item>
<!-- Change hint text color for edit text -->
<item name="android:textColorHint">@color/theme_secondary_text_inverted</item>
<!-- Hint for edit text -->
<item name="android:hint">@string/search_hint</item>
</style>
```
#Custom cursor
**Create the drawable:**
```xml
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:width="2dp" />
<solid android:color="@color/theme_primary" />
</shape>
```
**And add it to the object:**
```java
searchView.setCursorDrawable(R.drawable.custom_cursor);
```
# Using AppBarLayout?
It is a little bit tricky but can be achieved using this:
```xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!— Irrelevant stuff —>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/appbarlayout"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<!— Must be last for right layering display —>
<android.support.design.widget.AppBarLayout
android:id="@+id/appbarlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/search_layover_bg">
<FrameLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/theme_primary" />
<com.miguelcatalan.materialsearchview.MaterialSearchView
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
</FrameLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/theme_primary"
app:tabGravity="fill"
app:tabMode="fixed" />
</android.support.design.widget.AppBarLayout>
</RelativeLayout>
```
# Bonus
**Close on backpressed:**
```java
@Override
public void onBackPressed() {
if (searchView.isSearchOpen()) {
searchView.closeSearch();
} else {
super.onBackPressed();
}
}
```
# Help me
Pull requests are more than welcome, help me and others improve this awesome library.
The code is based in the Krishnakapil original concept.
# License
Copyright 2015 Miguel Catalan Bañuls
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.
| 0 |
benfry/processing4 | Processing 4.x releases for Java 17 | 2019-10-03T23:45:54Z | null | This repository contains the source code for the [Processing](https://processing.org/) project for people who want to help improve the code.
If you're interested in *using* Processing, get started at the [download](https://processing.org/download) page, or read more about the project at the [home page](https://processing.org/). There are also several [tutorials](https://processing.org/tutorials) that provide a helpful introduction. They are complemented by hundreds of examples that are included with the software itself.
# Processing 4.0
Processing 4 has [important updates](https://github.com/processing/processing4/wiki/Changes-in-4.0) that prepare the platform for its future. Most significantly, this includes the move to Java 17 as well as major changes to the range of platforms we support (Apple Silicon! Raspberry Pi on 32- and 64-bit ARM!)
With any luck, many changes should be transparent to most users, in spite of how much is updated behind the scenes. More immediately visible changes include major work on the UI, including “themes” and the ability to change how sketches are named by default.
## Building the Code
[Instructions on how to build the code](https://github.com/processing/processing4/blob/master/build/README.md) are found in a README inside the `build` folder.
We've also moved to a new repository for this release so that we could cull a lot of the accumulated mess of the last 20 years, which makes `git clone` (and most other `git` operations) a lot faster.
The work on 4.0 was done by a [tiny number of people](https://github.com/processing/processing4/graphs/contributors?from=2019-10-01&to=2022-08-09&type=c) who continue working on it, unpaid, because they care about it. Please help!
## API and Internal Changes
As with all releases, we'll do [everything possible](https://twitter.com/ben_fry/status/1426282574683516928) to avoid breaking API. However, there will still be tweaks that have to be made. We'll try to keep them minor. Our goal is stability, and keeping everyone's code running.
The full list of changes can be seen in [the release notes for each version](https://github.com/processing/processing4/blob/master/build/shared/revisions.md). <b>The list below only covers changes for developers working on this repository, or that may have an impact on Library, Mode, or Tool development.</b>
### Beta 9
* Major changes to themes and some libraries too. Also changed the default branch. If you have an older checkout, do this:
git pull
git checkout main
ant clean
ant clean-libs
ant run
…or just do a fresh `git clone` and pull down the latest.
* Apple Silicon support should be complete, as far as we know. If you find otherwise, file an issue.
* Check out the long [revisions](https://github.com/processing/processing4/blob/master/build/shared/revisions.md) update for this one. Too much to cover here.
* Now using Java 17.0.4+8 from [Adoptium](https://adoptium.net/).
### Beta 8
* [Renamed](https://github.com/processing/processing4/commit/409163986ff2ff4d2dbf69c79c7eced45950d1d0) the Add Mode, Add Library, and Add Tool menu items to Manage Modes, Manage Libraries, and Manage Tools. This will require translation updates for the new text:
* `toolbar.add_mode = Add Mode...` has been replaced with `toolbar.manage_modes = Manage Modes…`
* `menu.library.add_library = Add Library...` → `menu.library.manage_libraries = Manage Libraries…`
* `menu.tools.add_tool = Add Tool...` → `menu.tools.manage_tools = Manage Tools…`
### Beta 6
* Major rewrite of `handleOpen()`, now possible to use something besides the folder name for the main sketch file (see `revisions.md` for details).
* Now using Java 17.0.2+8 from [Adoptium](https://adoptium.net/).
### Beta 3
* Now using JDK 17.0.1 and JavaFX 17.0.1.
* Major changes to `theme.txt` and theme handling in general. Now rendering toolbar icons from SVG images. More documentation later.
* Made `DrawListener` public in `PSurfaceJOGL`.
### Beta 2
* Added a workaround so that `color` can be part of package names, which gets some older code (i.e. toxiclibs) running again.
### Beta 1
* Now using JDK 11.0.12+7.
### Alpha 6
* `Editor.applyPreferences()` was `protected`, now it's `public`.
* Removed `Editor.repaintErrorBar()` and `Editor.showConsole()`. Does not appear to be in use anywhere, easy to add back if we hear otherwise.
* Renamed `TextAreaPainter.getCompositionTextpainter()` to `getCompositionTextPainter()`. This was an internal function and inconsistent with the rest of the function naming.
### Alpha 5
* ~~Known bug: code completion is currently broken. Any updates will be posted [here](https://github.com/processing/processing4/issues/177).~~ Fixed in alpha 6.
* Moved from the 11.0.2 LTS version of JavaFX to the in-progress version 16. This fixes a [garbled text](https://bugs.openjdk.java.net/browse/JDK-8234916) issue that was breaking Tools that used JavaFX.
* The minimum system version for macOS (for the PDE and exported applications) is now set to 10.14.6 (the last update of Mojave). 10.13 (High Sierra) is no longer supported by Apple as of September or December 2020 (depending on what you read), and for our sanity, we're dropping it as well.
* JavaFX has been moved out of core and into a separate library. After Java 8, it's no longer part of the JDK, so it requires additional files that were formerly included by default. The Processing version of that library comes in at 180 MB, which seems excessive to include with every project, regardless of whether it's used. (And that's not including the full Webkit implementation, which adds \~80 MB per platform.)
### Alpha 4
* `EditorState(List<Editor> editors)` changed to `EditorState.nextEditor(List<Editor> editors)`, reflecting its nature as closer to a factory method (that makes use of the Editor list) than a constructor that will also be storing information about the list of Editor objects in the created object.
### Alpha 3
* `export.embed_java.for` changed to `export.include_java` which also embeds a string for the platform for better localization support.
### Alpha 2
* ~~The minimum system version for macOS (for the PDE and exported applications) is now set to 10.13.6 (the last update of High Sierra). Apple will likely be dropping support for High Sierra in late 2020, so we may make the minimum 10.14.x by the time 4.x ships.~~
* ~~See `revisions.md` if you're using `surface.setResizable()` with this release on macOS and with P2D or P3D renderers.~~
* The `static` versions of `selectInput()`, `selectOutput()`, and `selectFolder()` in `PApplet` have been removed. These were not documented, hopefully they were not in use anyway.
* The `frame` object has been removed from `PApplet`. We've been warning folks to use `surface` since 2015, but maybe we can provide an [easy way](https://github.com/processing/processing4/issues/59) to update code from inside the PDE.
* `PImage.checkAlpha()` is now `public` instead of `protected`
* All AWT calls have been moved out of `PImage`, which may be a problem for anything that was relying on those internals
* ~~For instance, `new PImage(java.awt.Image)` is no longer available. It was an undocumented method that was `public` only because it was required by subclasses.~~ As of alpha 4, this is back, because it wasn't deprecated in 3.x, and is likely to break too many things.
* Removed `MouseEvent.getClickCount()` and `MouseEvent.getAmount()`. These had been deprecated, not clear they were used anywhere.
### Alpha 1
* `Base.defaultFileMenu` is now `protected` instead of `static public`
* Processing 4 is 64-bit only. This is the overwhelming majority of users, and we don't have the necessary help to maintain and support 32-bit systems.
| 0 |
luxiaoxun/NettyRpc | A simple RPC framework based on Netty, ZooKeeper and Spring | 2016-03-13T05:24:45Z | null | # NettyRpc
An RPC framework based on Netty, ZooKeeper and Spring
中文详情:[Chinese Details](http://www.cnblogs.com/luxiaoxun/p/5272384.html)
### Features:
* Simple code and framework
* Service registry/discovery support by ZooKeeper
* High availability, load balance and failover
* Support different load balance strategy
* Support asynchronous/synchronous call
* Support different versions of service
* Support different serializer/deserializer
* Dead TCP connection detecting with heartbeat
### Design:
![design](https://github.com/luxiaoxun/NettyRpc/blob/master/picture/NettyRpc-design.png)
### How to use (netty-rpc-test)
1. Define an interface:
```
public interface HelloService {
String hello(String name);
String hello(Person person);
}
```
2. Implement the interface with annotation @NettyRpcService:
```
@NettyRpcService(HelloService.class, version = "1.0")
public class HelloServiceImpl implements HelloService {
public HelloServiceImpl(){}
@Override
public String hello(String name) {
return "Hello " + name;
}
@Override
public String hello(Person person) {
return "Hello " + person.getFirstName() + " " + person.getLastName();
}
}
```
3. Run zookeeper
For example: zookeeper is running on 127.0.0.1:2181
4. Start server:
1. Start server with spring config: RpcServerBootstrap
2. Start server without spring config: RpcServerBootstrap2
5. Call the service:
1. Use the client:
```
final RpcClient rpcClient = new RpcClient("127.0.0.1:2181");
// Sync call
HelloService helloService = rpcClient.createService(HelloService.class, "1.0");
String result = helloService.hello("World");
// Async call
RpcService client = rpcClient.createAsyncService(HelloService.class, "2.0");
RPCFuture helloFuture = client.call("hello", "World");
String result = (String) helloFuture.get(3000, TimeUnit.MILLISECONDS);
```
2. Use annotation @RpcAutowired:
```
public class Baz implements Foo {
@RpcAutowired(version = "1.0")
private HelloService helloService1;
@RpcAutowired(version = "2.0")
private HelloService helloService2;
@Override
public String say(String s) {
return helloService1.hello(s);
}
}
``` | 0 |
spinnaker/kayenta | Automated Canary Service | 2017-01-27T17:30:07Z | null | Kayenta
====
[![Build Status](https://travis-ci.org/spinnaker/kayenta.svg?branch=master)](https://travis-ci.org/spinnaker/kayenta)
Kayenta is a platform for Automated Canary Analysis (ACA). It is used by Spinnaker to enable automated canary deployments. Please see the comprehensive [canary documentation](https://www.spinnaker.io/guides/user/canary/stage/) for more details.
### Canary Release
A canary release is a technique to reduce the risk from deploying a new version of software into production. A new version of software, referred to as the canary, is deployed to a small subset of users alongside the stable running version. Traffic is split between these two versions such that a portion of incoming requests are diverted to the canary. This approach can quickly uncover any problems with the new version without impacting the majority of users.
The quality of the canary version is assessed by comparing key metrics that describe the behavior of the old and new versions. If there is significant degradation in these metrics, the canary is aborted and all of the traffic is routed to the stable version in an effort to minimize the impact of unexpected behavior.
Canaries are usually run against deployments containing changes to code, but they
can also be used for operational changes, including changes to configuration.
### Frequently Asked Questions
See the [FAQ](docs/faq.md).
### Creating Canary Config
See the [Canary Config Object model](docs/canary-config.md) for how a canary config is defined in [Markdown Syntax for Object Notation (MSON)](https://github.com/apiaryio/mson).
### Debugging
To start the JVM in debug mode, set the Java system property `DEBUG=true`:
```
./gradlew -DDEBUG=true
```
The JVM will then listen for a debugger to be attached on port 8191. The JVM will _not_ wait for the debugger
to be attached before starting Kayenta; the relevant JVM arguments can be seen and modified as needed in `build.gradle`.
### Running Standalone Kayenta Locally
You can run a standalone kayenta instance locally with `docker-compose`.
```
# Copy and edit example config accordingly
cp kayenta-web/config/kayenta.yml ~/.spinnaker/kayenta.yml
# Build/Start Kayenta
docker-compose up
```
You should then be able to access your local kayenta instance at http://localhost:8090/swagger-ui/index.html.
| 0 |
zalando/problem-spring-web | A library for handling Problems in Spring Web MVC | 2015-08-18T21:41:40Z | null | # Problems for Spring MVC and Spring WebFlux
[![Stability: Sustained](https://masterminds.github.io/stability/sustained.svg)](https://masterminds.github.io/stability/sustained.html)
![Build Status](https://github.com/zalando/problem-spring-web/workflows/build/badge.svg)
[![Coverage Status](https://img.shields.io/coveralls/zalando/problem-spring-web/main.svg)](https://coveralls.io/r/zalando/problem-spring-web)
[![Code Quality](https://img.shields.io/codacy/grade/0236149bf46749b1a582f9fbbde2a4eb/main.svg)](https://www.codacy.com/app/whiskeysierra/problem-spring-web)
[![Release](https://img.shields.io/github/release/zalando/problem-spring-web.svg)](https://github.com/zalando/problem-spring-web/releases)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/zalando/problem-spring-web/main/LICENSE)
*Problem Spring Web* is a set of libraries that makes it easy to produce
[`application/problem+json`](https://datatracker.ietf.org/doc/html/rfc9457) responses from a Spring
application. It fills a niche, in that it connects the [Problem library](https://github.com/zalando/problem) and either
[Spring Web MVC's exception handling](https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc#using-controlleradvice-classes)
or [Spring WebFlux's exception handling](https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#webflux-ann-controller-exceptions)
so that they work seamlessly together, while requiring minimal additional developer effort. In doing so, it aims to
perform a small but repetitive task — once and for all.
The way this library works is based on what we call *advice traits*. An advice trait is a small, reusable
`@ExceptionHandler` implemented as a [default method](https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html)
placed in a single method interface. Those advice traits can be combined freely and don't require to use a common base
class for your [`@ControllerAdvice`](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/bind/annotation/ControllerAdvice.html).
:mag_right: Please check out [Baeldung: A Guide to the Problem Spring Web Library](https://www.baeldung.com/problem-spring-web) for a detailed introduction!
## Features
- lets you choose traits *à la carte*
- favors composition over inheritance
- ~20 useful advice traits built in
- Spring MVC and Spring WebFlux support
- Spring Security support
- customizable processing
## Dependencies
- Java 17
- Any build tool using Maven Central, or direct download
- Servlet Container for [problem-spring-web](problem-spring-web) or
- Reactive, non-blocking runtime for [problem-spring-webflux](problem-spring-webflux)
- Spring 6 (or Spring Boot 3) users may use version >= [0.28.0](https://github.com/zalando/problem-spring-web/releases/tag/0.28.0)
- Spring 5 (or Spring Boot 2) users may use version [0.27.0](https://github.com/zalando/problem-spring-web/releases/tag/0.27.0)
- Spring 4 (or Spring Boot 1.5) users may use version [0.23.0](https://github.com/zalando/problem-spring-web/releases/tag/0.23.0)
- Spring Security 5 (optional)
- Failsafe 2.3.3 (optional)
## Installation and Configuration
- [Spring Web MVC](problem-spring-web)
- [Spring WebFlux](problem-spring-webflux)
## Customization
The problem handling process provided by `AdviceTrait` is built in a way that allows for customization whenever the
need arises. All of the following aspects (and more) can be customized by implementing the appropriate advice trait interface:
| Aspect | Method(s) | Default |
|---------------------|-----------------------------|-------------------------------------------------------------------------------------------------------|
| Creation | `AdviceTrait.create(..)` | |
| Logging | `AdviceTrait.log(..)` | 4xx as `WARN`, 5xx as `ERROR` including stack trace |
| Content Negotiation | `AdviceTrait.negotiate(..)` | `application/json`, `application/*+json`, `application/problem+json` and `application/x.problem+json` |
| Fallback | `AdviceTrait.fallback(..)` | `application/problem+json` |
| Post-Processing | `AdviceTrait.process(..)` | n/a |
The following example customizes the `MissingServletRequestParameterAdviceTrait` by adding a `parameter` extension field to the `Problem`:
```java
@ControllerAdvice
public class MissingRequestParameterExceptionHandler implements MissingServletRequestParameterAdviceTrait {
@Override
public ProblemBuilder prepare(Throwable throwable, StatusType status, URI type) {
var exception = (MissingServletRequestParameterException) throwable;
return Problem.builder()
.withTitle(status.getReasonPhrase())
.withStatus(status)
.withDetail(exception.getMessage())
.with("parameter", exception.getParameterName());
}
}
```
## Usage
Assuming there is a controller like this:
```java
@RestController
@RequestMapping("/products")
class ProductsResource {
@RequestMapping(method = GET, value = "/{productId}", produces = APPLICATION_JSON_VALUE)
public Product getProduct(String productId) {
// TODO implement
return null;
}
@RequestMapping(method = PUT, value = "/{productId}", consumes = APPLICATION_JSON_VALUE)
public Product updateProduct(String productId, Product product) {
// TODO implement
throw new UnsupportedOperationException();
}
}
```
The following HTTP requests will produce the corresponding response respectively:
```http
GET /products/123 HTTP/1.1
Accept: application/xml
```
```http
HTTP/1.1 406 Not Acceptable
Content-Type: application/problem+json
{
"title": "Not Acceptable",
"status": 406,
"detail": "Could not find acceptable representation"
}
```
```http
POST /products/123 HTTP/1.1
Content-Type: application/json
{}
```
```http
HTTP/1.1 405 Method Not Allowed
Allow: GET
Content-Type: application/problem+json
{
"title": "Method Not Allowed",
"status": 405,
"detail": "POST not supported"
}
```
### Stack traces and causal chains
**Before you continue**, please read the section about
[*Stack traces and causal chains*](https://github.com/zalando/problem#stack-traces-and-causal-chains)
in [zalando/problem](https://github.com/zalando/problem).
In case you want to enable stack traces, please configure your `ProblemModule` as follows:
```java
ObjectMapper mapper = new ObjectMapper()
.registerModule(new ProblemModule().withStackTraces());
```
Causal chains of problems are **disabled by default**, but can be overridden if desired:
```java
@ControllerAdvice
class ExceptionHandling implements ProblemHandling {
@Override
public boolean isCausalChainsEnabled() {
return true;
}
}
```
**Note** Since you have full access to the application context at that point, you can externalize the
configuration to your `application.yml` and even decide to reuse Spring's `server.error.include-stacktrace` property.
Enabling both features, causal chains and stacktraces, will yield:
```yaml
{
"title": "Internal Server Error",
"status": 500,
"detail": "Illegal State",
"stacktrace": [
"org.example.ExampleRestController.newIllegalState(ExampleRestController.java:96)",
"org.example.ExampleRestController.nestedThrowable(ExampleRestController.java:91)"
],
"cause": {
"title": "Internal Server Error",
"status": 500,
"detail": "Illegal Argument",
"stacktrace": [
"org.example.ExampleRestController.newIllegalArgument(ExampleRestController.java:100)",
"org.example.ExampleRestController.nestedThrowable(ExampleRestController.java:88)"
],
"cause": {
"title": "Internal Server Error",
"status": 500,
"detail": "Null Pointer",
"stacktrace": [
"org.example.ExampleRestController.newNullPointer(ExampleRestController.java:104)",
"org.example.ExampleRestController.nestedThrowable(ExampleRestController.java:86)",
"sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
"sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
"java.lang.reflect.Method.invoke(Method.java:483)",
"org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)",
"org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)",
"org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)",
"org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)",
"org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)",
"org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)",
"org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)",
"org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)",
"org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)",
"org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)",
"org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)",
"org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)",
"org.junit.runners.ParentRunner.run(ParentRunner.java:363)",
"org.junit.runner.JUnitCore.run(JUnitCore.java:137)",
"com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)",
"com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)",
"com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)"
]
}
}
}
```
## Known Issues
Spring allows to restrict the scope of a `@ControllerAdvice` to a certain subset of controllers:
```java
@ControllerAdvice(assignableTypes = ExampleController.class)
public final class ExceptionHandling implements ProblemHandling
```
By doing this you'll loose the capability to handle certain types of exceptions namely:
- `HttpRequestMethodNotSupportedException`
- `HttpMediaTypeNotAcceptableException`
- `HttpMediaTypeNotSupportedException`
- `NoHandlerFoundException`
We inherit this restriction from Spring and therefore recommend to use an unrestricted `@ControllerAdvice`.
## Getting Help
If you have questions, concerns, bug reports, etc., please file an issue in this repository's [Issue Tracker](../../issues).
## Getting Involved/Contributing
To contribute, simply make a pull request and add a brief description (1-2 sentences) of your addition or change. For
more details, check the [contribution guidelines](.github/CONTRIBUTING.md).
## Credits and references
- [Baeldung: A Guide to the Problem Spring Web Library](https://www.baeldung.com/problem-spring-web)
- [Problem Details for HTTP APIs](http://tools.ietf.org/html/rfc7807)
- [Problem library](https://github.com/zalando/problem)
- [Exception Handling in Spring MVC](https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc#using-controlleradvice-classes)
| 0 |
geometer/FBReaderJ | Official FBReaderJ project repository | 2010-09-29T18:35:28Z | null | null | 0 |