full_name
stringlengths
7
104
description
stringlengths
4
725
topics
stringlengths
3
468
readme
stringlengths
13
565k
label
int64
0
1
ityouknow/spring-boot-examples
about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。
docker docker-composer fastdfs java mongodb mybatis rabbitmq scheduler spring spring-boot spring-boot-examples spring-boot-mail spring-boot-mongodb spring-boot-upload-file spring-cloud spring-data-jpa springboot springboot-shiro springcloud thymeleaf
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)
0
awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.
aws cpp documentation dotnet examples go java javascript php programming python ruby
[![Build Status](https://github.com/aws/aws-sdk-ruby/workflows/CI/badge.svg)](https://github.com/awsdocs/aws-doc-sdk-examples/actions) [![GitHub Super-Linter](https://github.com/awsdocs/aws-doc-sdk-examples/actions/workflows/super-linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter) ![[]](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue) # AWS SDK Code Examples This repository contains code examples that demonstrate how to use the [AWSK SDKs](https://aws.amazon.com/developer/tools/) to interact with [AWS services](https://aws.amazon.com/products). Many examples are injected into the [AWS Documentation](https://docs.aws.amazon.com). ## How this repository is organized Code examples for each language's SDK can be found within the following subdirectories. The examples here demonstrate the most common uses of the SDK for each language. | SDK | folder | SDK version | |:----------:|:-----------------:|:-----------:| | .NET | [dotnetv3/](dotnetv3) | 3.5+ | | .NET | [dotnet/](.dotnet) | <3.5 | | C++ | [cpp/](cpp) | 1 | | Go | [gov2/](gov2) | 2 | | Go | [go/](go) | 1 | | Java | [javav2/](javav2) | 2 | | Java | [java/](java) | 1 | | JavaScript | [javascriptv3/](javascriptv3) | 3 | | JavaScript | [javascript/](javascriptv) | 2 | | Kotlin | [kotlin/](kotlin) | 1 | | PHP | [php/](php) | 3 | | Python | [python/](python) | 3 | | Ruby | [ruby/](ruby) | 3 | | Rust | [rustv1/](rustv1) | 1 | | Swift | [swift/](swift) | preview | Within each directory, you will find SDK-specific instructions for understanding and invoking example code. ### NOTE In alignment with our SDKs and Tools Maintenance Policy, the AWS SDK for Java v1.x will enter maintenance mode on July 31, 2024, and reach end-of-support on December 31, 2025. For more information, see [Announcing end-of-support for AWS SDK for Java v1.x](https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-java-v1-x-on-december-31-2025/). ### Additional directories | directory | purpose | usage | |-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [/applications](applications) | Contains the non-language-specific components of example applications, which show how the SDKs can be used in the context of a production-like application. | To view the language-specific components for each example application, see the `cross-service` folder in the sub-directory for your desired language (such as `python/cross-service`). | | [/test](test) | Contains all components supporting the custom test automation framework used to routinely test the code in this repository. | Deploys to AWS as a polyglot container-based integration testing solution. WARNING: Still under active construction as of 2023. | | [/resources](resources) | Contains shared components used by many code examples across this repository. | Deploys as frontend ([/clients](/resources/clients)) or backend ([/cdk](/resources/cdk) or [/cfn](/resources/cfn)) components. ## Invoke example code To invoke this example code, you must have an AWS account. For more information about creating an account, see [AWS Free Tier](https://aws.amazon.com/free/). You must also have AWS credentials configured. For steps on using the AWS Command Line Interface (AWS CLI) to configure credentials, see [CLI Configuration basics](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html) ## ⚠️ Usage disclaimer These code examples interact with services that may incur charges to your AWS account. For more information, see [AWS Pricing](https://aws.amazon.com/pricing/). Additionally, example code might theoretically modify or delete existing AWS resources. As a matter of due diligence, do the following: - Be aware of the resources that these examples create or delete. - Be aware of the costs that might be charged to your account as a result. - Back up your important data. # Contributing This repository thrives on your contributions! ❤️ To get involved, see the [CONTRIBUTING.md](CONTRIBUTING.md). 🙏 # Copyright and license All content in this repository, unless otherwise stated, is Copyright © Amazon Web Services, Inc. or its affiliates. All rights reserved. Except where otherwise noted, all examples in this collection are licensed under the [Apache license, version 2.0](https://www.apache.org/licenses/LICENSE-2.0) (the "License"). The full license text is provided in the `LICENSE` file accompanying this repository.
0
spring-projects/spring-data-examples
Spring Data Example Projects
null
null
1
thombergs/code-examples
A collection of code examples from blog posts etc.
null
# Example Code Repository [![CI](https://github.com/thombergs/code-examples/workflows/CI/badge.svg)](https://github.com/thombergs/code-examples/actions?query=workflow%3ACI) This repo contains example projects which show how to use different (not only) Java technologies. The examples are usually accompanied by a blog post on [https://reflectoring.io](https://reflectoring.io). See the READMEs in each subdirectory of this repo for more information on each module.
0
vert-x3/vertx-examples
Vert.x examples
async examples http2 kotlin reactive vertx
null
0
in28minutes/spring-boot-examples
Code Examples for everything thats written on www.springboottutorial.com
null
# Spring Boot Code Examples All code examples for our website http://www.springboottutorial.com ## Keep Learning Every Day - **1:** [FOLLOW](https://links.in28minutes.com/lin) Ranga on LinkedIn ## Check Out Our Amazing ROADMAPS - **1:** [AWS Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#aws-roadmap) - **2:** [Azure Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#azure-roadmap) - **3:** [Google Cloud Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#google-cloud-roadmap) - **4:** [Cloud Beginner Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#cloud-beginner-roadmap) - **5:** [DevOps Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#devops-roadmap) - **6:** [Java Full Stack Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#java-full-stack-roadmap) - **7:** [Java Microservices Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#java-microservices-roadmap) [![Image](https://www.springboottutorial.com/images/Course-clean-code.png "Clean Code with Java: Learn Simple Design, Refactoring & TDD")](https://www.udemy.com/course/java-clean-code-with-refactoring-and-tdd/?referralCode=201A00544D2D754A688F) ### Installing Eclipse & Embedded Maven - Installation Video : https://www.youtube.com/playlist?list=PLBBog2r6uMCSmMVTW_QmDLyASBvovyAO3 - GIT Repository For Installation : https://github.com/in28minutes/getting-started-in-5-steps - PDF : https://github.com/in28minutes/SpringIn28Minutes/blob/master/InstallationGuide-JavaEclipseAndMaven_v2.pdf ### Running Examples - Download the zip or clone the Git repository. - Unzip the zip file (if you downloaded one) - Open Command Prompt and Change directory (cd) to folder containing pom.xml - Open Eclipse - File -> Import -> Existing Maven Project -> Navigate to the folder where you unzipped the zip - Select the right project - Choose the Spring Boot Application file (search for @SpringBootApplication) - Right Click on the file and Run as Java Application - You are all Set ### Troubleshooting - Refer our TroubleShooting Guide - http://www.in28minutes.com/spring-boot-maven-eclipse-troubleshooting-guide-and-faq ### Useful Links - Find out more about in28Minutes and our approach to creating great learning experience - The in28Minutes Way - http://www.in28minutes.com/the-in28minutes-way - Facebook : https://www.facebook.com/in28Minutes​ - Twitter : https://twitter.com/in28Minutes​ - YouTube : https://www.youtube.com/rithustutorials​ - Instagram : https://www.instagram.com/in28minutes/ in28Minutes is creating amazing solutions for you to learn Spring Boot, Full Stack and the Cloud - Docker, Kubernetes, AWS, React, Angular etc. - [Check out all our courses here](https://github.com/in28minutes/learn) ## Youtube Playlists - 500+ Videos [Click here - 30+ Playlists with 500+ Videos on Spring, Spring Boot, REST, Microservices and the Cloud](https://www.youtube.com/user/rithustutorials/playlists?view=1&sort=lad&flow=list)
0
nacos-group/nacos-examples
Nacos Examples
null
# nacos-examples Nacos Examples # Nacos-examples [中文](./README_CN.md) # This is examples of the nacos, you can use nacos-native-sdk/spring to opercate service/config. ## Start nacos You can start nacos by standalone on your computer https://nacos.io/en-us/docs/deployment.html You can start server from aliyun https://help.aliyun.com/document_detail/139460.html https://www.aliyun.com/product/aliware/mse?spm=nacos-website.topbar.0.0.0 ## Config your config ### Spring https://nacos.io/en-us/docs/quick-start-spring.html ### Spring-boot https://nacos.io/en-us/docs/quick-start-spring-boot.html ### Spring-cloud https://nacos.io/en-us/docs/quick-start-spring-cloud.html ### Dubbo https://nacos.io/en-us/docs/use-nacos-with-dubbo.html ## Run Demo Run Main
0
deeplearning4j/deeplearning4j-examples
Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)
artificial-intelligence deeplearning deeplearning4j dl4j intellij javafx python zeppelin-notebook
<pre> ######## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## **$** ## ## ## ## ## ## **$** ## ## ## ######### ## ## ## ## ## ## ## ## ######## ######## ## ###### . :::: : : : : : :::: : :::: ::::: :::: :::: ::::: . . : : : : : :: :: : : : : : : : : : : : . . : : : : : : : : : : : : : : : : : : : : . . ::: : : : : : : :::: : ::: ::::: ::: :::: : : . . : : : ::::: : : : : : : : : : : : . . : : : : : : : : : : : : : : : : . . :::: : : : : : : : ::::: :::: : : :::: : ::::: . </pre> For support, please go over to: https://community.konduit.ai We do not monitor the github issues of this repository very often. ## Introduction The **Eclipse Deeplearning4J** (DL4J) ecosystem is a set of projects intended to support all the needs of a JVM based deep learning application. This means starting with the raw data, loading and preprocessing it from wherever and whatever format it is in to building and tuning a wide variety of simple and complex deep learning networks. The DL4J stack comprises of: - **DL4J**: High level API to build MultiLayerNetworks and ComputationGraphs with a variety of layers, including custom ones. Supports importing Keras models from h5, including tf.keras models (as of 1.0.0-M2) and also supports distributed training on Apache Spark - **ND4J**: General purpose linear algebra library with over 500 mathematical, linear algebra and deep learning operations. ND4J is based on the highly-optimized C++ codebase LibND4J that provides CPU (AVX2/512) and GPU (CUDA) support and acceleration by libraries such as OpenBLAS, OneDNN (MKL-DNN), cuDNN, cuBLAS, etc - **SameDiff** : Part of the ND4J library, SameDiff is our automatic differentiation / deep learning framework. SameDiff uses a graph-based (define then run) approach, similar to TensorFlow graph mode. Eager graph (TensorFlow 2.x eager/PyTorch) graph execution is planned. SameDiff supports importing TensorFlow frozen model format .pb (protobuf) models. Import for ONNX, TensorFlow SavedModel and Keras models are planned. Deeplearning4j also has full SameDiff support for easily writing custom layers and loss functions. - **DataVec**: ETL for machine learning data in a wide variety of formats and files (HDFS, Spark, Images, Video, Audio, CSV, Excel etc) - **LibND4J** : C++ library that underpins everything. For more information on how the JVM accesses native arrays and operations refer to [JavaCPP](https://github.com/bytedeco/javacpp) All projects in the DL4J ecosystem support Windows, Linux and macOS. Hardware support includes CUDA GPUs (10.0, 10.1, 10.2 except OSX), x86 CPU (x86_64, avx2, avx512), ARM CPU (arm, arm64, armhf) and PowerPC (ppc64le). ## Prerequisites This example repo consists of several separate Maven Java projects, each with their own pom files. Maven is a popular build automation tool for Java Projects. The contents of a "pom.xml" file dictate the configurations. Read more about how to configure Maven [here](https://deeplearning4j.konduit.ai/config/maven). Users can also refer to the [simple sample project provided](./mvn-project-template/pom.xml) to get started with a clean project from scratch. Build tools are considered standard software engineering best practice. Besides this the complexities posed by the projects in the DL4J ecosystem make dependencies too difficult to manage manually. All the projects in the DL4J ecosystem can be used with other build tools like Gradle, SBT etc. More information on that can be found [here](https://deeplearning4j.konduit.ai/config/buildtools). ## Support For help with the examples, please go to our [support forum](https://community.konduit.ai/) Note for users of 1.0.0-beta7 and prior, some examples and modules have been removed to reflect changes in the framework's direction. Please see and comment on our post [here](https://community.konduit.ai/t/upcoming-removal-of-modules-and-roadmap-changes/1240) If you would like a workaround for something you may be missing, please feel free to post on the forums, and we will do what we can to help you. ## Example Content Projects are based on what functionality the included examples demonstrate to the user and not necessarily which library in the DL4J stack the functionality lives in. Examples in a project are in general separated into "quickstart" and "advanced". Each project README also lists all the examples it contains, with a recommended order to explore them in. - [dl4j-examples](dl4j-examples/README.md) This project contains a set of examples that demonstrate use of the high level DL4J API to build a variety of neural networks. Some of these examples are end to end, in the sense they start with raw data, process it and then build and train neural networks on it. - [tensorflow-keras-import-examples](tensorflow-keras-import-examples/README.md) This project contains a set of examples that demonstrate how to import Keras h5 models and TensorFlow frozen pb models into the DL4J ecosystem. Once imported into DL4J these models can be treated like any other DL4J model - meaning you can continue to run training on them or modify them with the transfer learning API or simply run inference on them. - [dl4j-distributed-training-examples](dl4j-distributed-training-examples/README.md) This project contains a set of examples that demonstrate how to do distributed training, inference and evaluation in DL4J on Apache Spark. DL4J distributed training employs a "hybrid" asynchronous SGD approach - further details can be found in the distributed deep learning documentation [here](https://deeplearning4j.konduit.ai/distributed-deep-learning/intro) - [cuda-specific-examples](cuda-specific-examples/README.md) This project contains a set of examples that demonstrate how to leverage multiple GPUs for data-parallel training of neural networks for increased performance. - [samediff-examples](samediff-examples/README.md) This project contains a set of examples that demonstrate the SameDiff API. SameDiff (which is part of the ND4J library) can be used to build lower level auto-differentiating computation graphs. An analogue to the SameDiff API vs the DL4J API is the low level TensorFlow API vs the higher level of abstraction Keras API. - [data-pipeline-examples](data-pipeline-examples/README.md) This project contains a set of examples that demonstrate how raw data in various formats can be loaded, split and preprocessed to build serializable (and hence reproducible) ETL pipelines. - [nd4j-ndarray-examples](nd4j-ndarray-examples/README.md) This project contains a set of examples that demonstrate how to manipulate NDArrays. The functionality of ND4J demonstrated here can be likened to NumPy. - [rl4j-examples](rl4j-examples/README.md) This project contains examples of using RL4J, the reinforcement learning library in DL4J. - [android-examples](android-examples/README.md) This project contains an Android example project, that shows DL4J being used in an Android application. ## Feedback & Contributions While these set of examples don't cover all the features available in DL4J the intent is to cover functionality required for most users - beginners and advanced. File an issue [here](https://github.com/eclipse/deeplearning4j-examples/issues) if you have feedback or feature requests that are not covered here. We are also available via our [community forum](https://community.konduit.ai/) for questions. We welcome contributions from the community. More information can be found [here](CONTRIBUTORS.md) We **love** hearing from you. Cheers!
0
confluentinc/kafka-streams-examples
Demo applications and code examples for Apache Kafka's Streams API.
null
# Kafka Streams Examples This project contains code examples that demonstrate how to implement real-time applications and event-driven microservices using the Streams API of [Apache Kafka](http://kafka.apache.org/) aka Kafka Streams. For more information take a look at the [**latest Confluent documentation on the Kafka Streams API**](http://docs.confluent.io/current/streams/), notably the [**Developer Guide**](https://docs.confluent.io/platform/current/streams/developer-guide/index.html) --- Table of Contents * [Available examples](#available-examples) * [Examples: Runnable Applications](#examples-apps) * [Examples: Unit Tests](#examples-unit-tests) * [Examples: Integration Tests](#examples-integration-tests) * [Docker Example: Kafka Music demo application](#examples-docker) * [Examples: Event Streaming Platform](#examples-event-streaming-platform) * [Requirements](#requirements) * [Apache Kafka](#requirements-kafka) * [Confluent Platform](#requirements-confluent-platform) * [Using IntelliJ or Eclipse](#requirements-ide) * [Java](#requirements-java) * [Scala](#requirements-scala) * [Packaging and running the examples](#packaging-and-running) * [Development](#development) * [Version Compatibility Matrix](#version-compatibility) * [Where to find help](#help) --- <a name="available-examples"/> # Available examples This repository has several branches to help you find the correct code examples for the version of Apache Kafka and/or Confluent Platform that you are using. See [Version Compatibility Matrix](#version-compatibility) below for details. There are three kinds of examples: * **Examples under [src/main/](src/main/)**: These examples are short and concise. Also, you can interactively test-drive these examples, e.g. against a local Kafka cluster. If you want to actually run these examples, then you must first install and run Apache Kafka and friends, which we describe in section [Packaging and running the examples](#packaging-and-running). Each example also states its exact requirements and instructions at the very top. * **Examples under [src/test/](src/test/)**: These examples should test applications under [src/main/](src/main/). Unit Tests with TopologyTestDriver test the stream logic without external system dependencies. The integration tests use an embedded Kafka clusters, feed input data to them (using the standard Kafka producer client), process the data using Kafka Streams, and finally read and verify the output results (using the standard Kafka consumer client). These examples are also a good starting point to learn how to implement your own end-to-end integration tests. * **Ready-to-run Docker Examples**: These examples are already built and containerized. <a name="examples-apps"/> ## Examples: Runnable Applications Additional examples may be found under [src/main/](src/main/java/io/confluent/examples/streams/). | Application Name | Concepts used | Java 8+ | Java 7+ | Scala | | --------------------------- | -------------------------------------------------------- | ------- | ------- | ----- | | WordCount | DSL, aggregation, stateful | [Java 8+ example](src/main/java/io/confluent/examples/streams/WordCountLambdaExample.java) | | [Scala Example](src/main/scala/io/confluent/examples/streams/WordCountScalaExample.scala) | | MapFunction | DSL, stateless transformations, `map()` | [Java 8+ example](src/main/java/io/confluent/examples/streams/MapFunctionLambdaExample.java) | | [Scala Example](src/main/scala/io/confluent/examples/streams/MapFunctionScalaExample.scala) | | SessionWindows | Sessionization of user events, user behavior analysis | | [Java 7+ example](src/main/java/io/confluent/examples/streams/SessionWindowsExample.java) | GlobalKTable | `join()` between `KStream` and `GlobalKTable` | [Java 8+ example](src/main/java/io/confluent/examples/streams/GlobalKTablesExample.java) | | | | GlobalStore | "join" between `KStream` and `GlobalStore` | [Java 8+ example](src/main/java/io/confluent/examples/streams/GlobalStoresExample.java) | | | | PageViewRegion | `join()` between `KStream` and `KTable` | [Java 8+ example](src/main/java/io/confluent/examples/streams/PageViewRegionLambdaExample.java) | [Java 7+ example](src/main/java/io/confluent/examples/streams/PageViewRegionExample.java) | | | PageViewRegionGenericAvro | Working with data in Generic Avro format | [Java 8+ example](src/main/java/io/confluent/examples/streams/PageViewRegionLambdaExample.java) | [Java 7+ example](src/main/java/io/confluent/examples/streams/PageViewRegionExample.java) | | | WikipediaFeedSpecificAvro | Working with data in Specific Avro format | [Java 8+ example](src/main/java/io/confluent/examples/streams/WikipediaFeedAvroLambdaExample.java) | [Java 7+ example](src/main/java/io/confluent/examples/streams/WikipediaFeedAvroExample.java) | | | SecureKafkaStreams | Secure, encryption, client authentication | | [Java 7+ example](src/main/java/io/confluent/examples/streams/SecureKafkaStreamsExample.java) | | | Sum | DSL, stateful transformations, `reduce()` | [Java 8+ example](src/main/java/io/confluent/examples/streams/SumLambdaExample.java) | | | | WordCountInteractiveQueries | Interactive Queries, REST, RPC | [Java 8+ example](src/main/java/io/confluent/examples/streams/interactivequeries/WordCountInteractiveQueriesExample.java) | | | | KafkaMusic | Interactive Queries, State Stores, REST API | [Java 8+ example](src/main/java/io/confluent/examples/streams/interactivequeries/kafkamusic/KafkaMusicExample.java) | | | | ApplicationReset | Application Reset Tool `kafka-streams-application-reset` | [Java 8+ example](src/main/java/io/confluent/examples/streams/ApplicationResetExample.java) | | | | Microservice | Microservice ecosystem, state stores, dynamic routing, joins, filtering, branching, stateful operations | [Java 8+ example](src/main/java/io/confluent/examples/streams/microservices) | | | <a name="examples-unit-tests"/> ## Examples: Unit Tests The stream processing of Kafka Streams can be **unit tested** with the `TopologyTestDriver` from the `org.apache.kafka:kafka-streams-test-utils` artifact. The test driver allows you to write sample input into your processing topology and validate its output. See the documentation at [Testing Streams Code](https://docs.confluent.io/current/streams/developer-guide/test-streams.html). <a name="examples-integration-tests"/> ## Examples: Integration Tests We also provide several **integration tests**, which demonstrate end-to-end data pipelines. Here, we spawn embedded Kafka clusters and the [Confluent Schema Registry](https://github.com/confluentinc/schema-registry), feed input data to them (using the standard Kafka producer client), process the data using Kafka Streams, and finally read and verify the output results (using the standard Kafka consumer client). Additional examples may be found under [src/test/](src/test/java/io/confluent/examples/streams/). > Tip: Run `mvn test` to launch the tests. | Integration Test Name | Concepts used | Java 8+ | Java 7+ | Scala | | ----------------------------------- | ------------------------------------------- | ------- | ------- | ----- | | WordCount | DSL, aggregation, stateful | [Java 8+ Example](src/test/java/io/confluent/examples/streams/WordCountLambdaIntegrationTest.java) | | [Scala Example](src/test/scala/io/confluent/examples/streams/WordCountScalaIntegrationTest.scala) | | WordCountInteractiveQueries | Interactive Queries, REST, RPC | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/interactivequeries/WordCountInteractiveQueriesExampleTest.java) | | | Aggregate | DSL, `groupBy()`, `aggregate()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/AggregateTest.java) | | [Scala Example](src/test/scala/io/confluent/examples/streams/AggregateScalaTest.scala) | | CustomStreamTableJoin | DSL, Processor API, Transformers | [Java 8+ Example](src/test/java/io/confluent/examples/streams/CustomStreamTableJoinIntegrationTest.java) | | | | EventDeduplication | DSL, Processor API, Transformers | [Java 8+ Example](src/test/java/io/confluent/examples/streams/EventDeduplicationLambdaIntegrationTest.java) | | | | GlobalKTable | DSL, global state | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/GlobalKTablesExampleTest.java) | | | GlobalStore | DSL, global state, Transformers | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/GlobalStoresExampleTest.java) | | | HandlingCorruptedInputRecords | DSL, `flatMap()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/HandlingCorruptedInputRecordsIntegrationTest.java) | | | | KafkaMusic (Interactive Queries) | Interactive Queries, State Stores, REST API | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/interactivequeries/kafkamusic/KafkaMusicExampleTest.java) | | | MapFunction | DSL, stateless transformations, `map()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/MapFunctionLambdaIntegrationTest.java) | | | | MixAndMatch DSL + Processor API | Integrating DSL and Processor API | [Java 8+ Example](src/test/java/io/confluent/examples/streams/MixAndMatchLambdaIntegrationTest.java) | | | | PassThrough | DSL, `stream()`, `to()` | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/PassThroughIntegrationTest.java) | | | PoisonPill | DSL, `flatMap()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/HandlingCorruptedInputRecordsIntegrationTest.java) | | | | ProbabilisticCounting\*\*\* | DSL, Processor API, custom state stores | | | [Scala Example](src/test/scala/io/confluent/examples/streams/ProbabilisticCountingScalaIntegrationTest.scala) | | Reduce (Concatenate) | DSL, `groupByKey()`, `reduce()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/ReduceTest.java) | | [Scala Example](src/test/scala/io/confluent/examples/streams/ReduceScalaTest.scala) | | SessionWindows | DSL, windowed aggregation, sessionization | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/SessionWindowsExampleTest.java) | | | StatesStoresDSL | DSL, Processor API, Transformers | [Java 8+ Example](src/test/java/io/confluent/examples/streams/StateStoresInTheDSLIntegrationTest.java) | | | | StreamToStreamJoin | DSL, `join()` between KStream and KStream | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/StreamToStreamJoinIntegrationTest.java) | | | StreamToTableJoin | DSL, `join()` between KStream and KTable | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/StreamToTableJoinIntegrationTest.java) | [Scala Example](src/test/scala/io/confluent/examples/streams/StreamToTableJoinScalaIntegrationTest.scala) | | Sum | DSL, aggregation, stateful, `reduce()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/SumLambdaIntegrationTest.java) | | | | TableToTableJoin | DSL, `join()` between KTable and KTable | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/TableToTableJoinIntegrationTest.java) | | | UserCountsPerRegion | DSL, aggregation, stateful, `count()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/UserCountsPerRegionLambdaIntegrationTest.java) | | | | ValidateStateWithInteractiveQueries | Interactive Queries for validating state | | [Java 8+ Example](src/test/java/io/confluent/examples/streams/ValidateStateWithInteractiveQueriesLambdaIntegrationTest.java) | | | | GenericAvro | Working with data in Generic Avro format | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/GenericAvroIntegrationTest.java) | [Scala Example](src/test/scala/io/confluent/examples/streams/GenericAvroScalaIntegrationTest.scala) | | SpecificAvro | Working with data in Specific Avro format | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/SpecificAvroIntegrationTest.java) | [Scala Example](src/test/scala/io/confluent/examples/streams/SpecificAvroScalaIntegrationTest.scala) | \*\*\*demonstrates how to probabilistically count items in an input stream by implementing a custom state store ([CMSStore](src/main/scala/io/confluent/examples/streams/algebird/CMSStore.scala)) that is backed by a [Count-Min Sketch](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch) data structure (with the CMS implementation of [Twitter Algebird](https://github.com/twitter/algebird)) <a name="examples-docker"/> # Docker Example: Kafka Music demo application This containerized example launches: * Confluent's Kafka Music demo application for the Kafka Streams API, which makes use of [Interactive Queries](http://docs.confluent.io/current/streams/developer-guide.html) * a single-node Apache Kafka cluster with a single-node ZooKeeper ensemble * a [Confluent Schema Registry](https://github.com/confluentinc/schema-registry) instance The Kafka Music application demonstrates how to build of a simple music charts application that continuously computes, in real-time, the latest charts such as latest Top 5 songs per music genre. It exposes its latest processing results -- the latest charts -- via Kafka’s [Interactive Queries](http://docs.confluent.io/current/streams/developer-guide.html#interactive-queries) feature via a REST API. The application's input data is in Avro format, hence the use of Confluent Schema Registry, and comes from two sources: a stream of play events (think: "song X was played") and a stream of song metadata ("song X was written by artist Y"). You can find detailed documentation at https://docs.confluent.io/current/streams/kafka-streams-examples/docs/index.html. <a name="event-streaming-platform"/> # Examples: Event Streaming Platform For additional examples that showcase Kafka Streams applications within an event streaming platform, please refer to the [examples GitHub repository](https://github.com/confluentinc/examples). <a name="requirements"/> # Requirements <a name="requirements-kafka"/> ## Apache Kafka The code in this repository requires Apache Kafka 0.10+ because from this point onwards Kafka includes its [Kafka Streams](https://github.com/apache/kafka/tree/trunk/streams) library. See [Version Compatibility Matrix](#version-compatibility) for further details, as different branches of this repository may have different Kafka requirements. > **For the `master` branch:** To build a development version, you typically need the latest `trunk` version of Apache Kafka > (cf. `kafka.version` in [pom.xml](pom.xml) for details). The following instructions will build and locally install > the latest `trunk` Kafka version: > > ```shell > $ git clone git@github.com:apache/kafka.git > $ cd kafka > $ git checkout trunk > > # Now build and install Kafka locally > $ ./gradlew clean && ./gradlewAll install > ``` <a name="requirements-confluent-platform"/> ## Confluent Platform The code in this repository requires [Confluent Schema Registry](https://github.com/confluentinc/schema-registry). See [Version Compatibility Matrix](#version-compatibility) for further details, as different branches of this repository have different Confluent Platform requirements. * [Confluent Platform Quickstart](http://docs.confluent.io/current/quickstart.html) (how to download and install) * [Confluent Platform documentation](http://docs.confluent.io/current/) > **For the `master` branch:** To build a development version, you typically need the latest `master` version of Confluent Platform's > Schema Registry (cf. `confluent.version` in [pom.xml](pom.xml), which is set by the upstream > [Confluent Common](https://github.com/confluentinc/common) project). > The following instructions will build and locally install the latest `master` Schema Registry version, which includes > building its dependencies such as [Confluent Common](https://github.com/confluentinc/common) and > [Confluent Rest Utils](https://github.com/confluentinc/rest-utils). > Please read the [Schema Registry README](https://github.com/confluentinc/schema-registry) for details. > > ```shell > $ git clone https://github.com/confluentinc/common.git > $ cd common > $ git checkout master > > # Build and install common locally > $ mvn -DskipTests=true clean install > > $ git clone https://github.com/confluentinc/rest-utils.git > $ cd rest-utils > $ git checkout master > > # Build and install rest-utils locally > $ mvn -DskipTests=true clean install > > $ git clone https://github.com/confluentinc/schema-registry.git > $ cd schema-registry > $ git checkout master > > # Now build and install schema-registry locally > $ mvn -DskipTests=true clean install > ``` Also, each example states its exact requirements at the very top. <a name="requirements-ide"/> ## Using IntelliJ or Eclipse If you are using an IDE and import the project you might end up with a "missing import / class not found" error. Some Avro classes are generated from schema files and IDEs sometimes do not generate these classes automatically. To resolve this error, manually run: ```shell $ mvn -Dskip.tests=true compile ``` If you are using Eclipse, you can also right-click on `pom.xml` file and choose _Run As > Maven generate-sources_. <a name="requirements-java"/> ## Java 8+ Some code examples require Java 8+, primarily because of the usage of [lambda expressions](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html). IntelliJ IDEA users: * Open _File > Project structure_ * Select "Project" on the left. * Set "Project SDK" to Java 1.8. * Set "Project language level" to "8 - Lambdas, type annotations, etc." <a name="requirements-scala"/> ## Scala > Scala is required only for the Scala examples in this repository. If you are a Java developer you can safely ignore > this section. If you want to experiment with the Scala examples in this repository, you need a version of Scala that supports Java 8 and SAM / Java lambda (e.g. Scala 2.11 with `-Xexperimental` compiler flag, or 2.12). If you are compiling with Java 9+, you'll need to have Scala version 2.12+ to be compatible with the Java version. <a name="packaging-and-running"/> # Packaging and running the Application Examples The instructions in this section are only needed if you want to interactively test-drive the [application examples](#examples-apps) under [src/main/](src/main/). > **Tip:** If you only want to run the integration tests (`mvn test`), then you do not need to package or install > anything -- just run `mvn test`. These tests launch embedded Kafka clusters. The first step is to install and run a Kafka cluster, which must consist of at least one Kafka broker as well as at least one ZooKeeper instance. Some examples may also require a running instance of Confluent schema registry. The [Confluent Platform Quickstart](http://docs.confluent.io/current/quickstart.html) guide provides the full details. In a nutshell: ```shell # Ensure you have downloaded and installed Confluent Platform as per the Quickstart instructions above. # Start ZooKeeper $ ./bin/zookeeper-server-start ./etc/kafka/zookeeper.properties # In a separate terminal, start Kafka broker $ ./bin/kafka-server-start ./etc/kafka/server.properties # In a separate terminal, start Confluent Schema Registry $ ./bin/schema-registry-start ./etc/schema-registry/schema-registry.properties # Again, please refer to the Confluent Platform Quickstart for details such as # how to download Confluent Platform, how to stop the above three services, etc. ``` The next step is to create a standalone jar ("fat jar") of the [application examples](#examples-apps): ```shell # Create a standalone jar ("fat jar") $ mvn clean package # >>> Creates target/kafka-streams-examples-7.8.0-0-standalone.jar ``` > Tip: If needed, you can disable the test suite during packaging, for example to speed up the packaging or to lower > JVM memory usage: > > ```shell > $ mvn -DskipTests=true clean package > ``` You can now run the application examples as follows: ```shell # Run an example application from the standalone jar. Here: `WordCountLambdaExample` $ java -cp target/kafka-streams-examples-7.8.0-0-standalone.jar \ io.confluent.examples.streams.WordCountLambdaExample ``` The application will try to read from the specified input topic (in the above example it is ``streams-plaintext-input``), execute the processing logic, and then try to write back to the specified output topic (in the above example it is ``streams-wordcount-output``). In order to observe the expected output stream, you will need to start a console producer to send messages into the input topic and start a console consumer to continuously read from the output topic. More details in how to run the examples can be found in the [java docs](src/main/java/io/confluent/examples/streams/WordCountLambdaExample.java#L31) of each example code. If you want to turn on log4j while running your example application, you can edit the [log4j.properties](src/main/resources/log4j.properties) file and then execute as follows: ```shell # Run an example application from the standalone jar. Here: `WordCountLambdaExample` $ java -cp target/kafka-streams-examples-7.8.0-0-standalone.jar \ -Dlog4j.configuration=file:src/main/resources/log4j.properties \ io.confluent.examples.streams.WordCountLambdaExample ``` Keep in mind that the machine on which you run the command above must have access to the Kafka/ZooKeeper clusters you configured in the code examples. By default, the code examples assume the Kafka cluster is accessible via `localhost:9092` (aka Kafka's ``bootstrap.servers`` parameter) and the ZooKeeper ensemble via `localhost:2181`. You can override the default ``bootstrap.servers`` parameter through a command line argument. <a name="development"/> # Development This project uses the standard maven lifecycle and commands such as: ```shell $ mvn compile # This also generates Java classes from the Avro schemas $ mvn test # Runs unit and integration tests $ mvn package # Packages the application examples into a standalone jar ``` <a name="version-compatibility"/> # Version Compatibility Matrix | Branch (this repo) | Confluent Platform | Apache Kafka | | ----------------------------------------|--------------------|-------------------| | [5.4.x](../../../tree/5.4.x/)\* | 5.4.0-SNAPSHOT | 2.4.0-SNAPSHOT | | [5.3.0-post](../../../tree/5.3.0-post/) | 5.3.0 | 2.3.0 | | [5.2.2-post](../../../tree/5.2.2-post/) | 5.2.2 | 2.2.1 | | [5.2.1-post](../../../tree/5.2.1-post/) | 5.2.1 | 2.2.1 | | [5.1.0-post](../../../tree/5.1.0-post/) | 5.1.0 | 2.1.0 | | [5.0.0-post](../../../tree/5.0.0-post/) | 5.0.0 | 2.0.0 | | [4.1.0-post](../../../tree/4.1.0-post/) | 4.1.0 | 1.1.0 | | [4.0.0-post](../../../tree/4.4.0-post/) | 4.0.0 | 1.0.0 | | [3.3.0-post](../../../tree/3.3.0-post/) | 3.3.0 | 0.11.0 | \*You must manually build the `2.3` version of Apache Kafka and the `5.3.x` version of Confluent Platform. See instructions above. The `master` branch of this repository represents active development, and may require additional steps on your side to make it compile. Check this README as well as [pom.xml](pom.xml) for any such information. <a name="help"/> # Where to find help * Looking for documentation on Apache Kafka's Streams API? * We recommend to read the [Kafka Streams chapter](https://docs.confluent.io/current/streams/) in the [Confluent Platform documentation](https://docs.confluent.io/current/). * Watch our talk [Rethinking Stream Processing with Apache Kafka](https://www.youtube.com/watch?v=ACwnrnVJXuE) * Running into problems to use the demos and examples in this project? * First, you should check our [FAQ wiki](https://github.com/confluentinc/kafka-streams-examples/wiki/FAQ) for an answer first. * If the FAQ doesn't help you, [create a new GitHub issue](https://github.com/confluentinc/kafka-streams-examples/issues). * Want to ask a question, report a bug in Kafka or its Kafka Streams API, request a new Kafka feature? * For general questions about Apache Kafka and Confluent Platform, please head over to the [Confluent mailing list](https://groups.google.com/forum/?pli=1#!forum/confluent-platform) or to the [Apache Kafka mailing lists](http://kafka.apache.org/contact). # License Usage of this image is subject to the license terms of the software contained within. Please refer to Confluent's Docker images documentation [reference](https://docs.confluent.io/platform/current/installation/docker/image-reference.html) for further information. The software to extend and build the custom Docker images is available under the Apache 2.0 License.
0
BruceEckel/OnJava8-Examples
Code Examples for the book On Java 8""
null
# Examples for *On Java 8* by Bruce Eckel If you want to experiment with the code examples from the book [On Java 8](https://www.onjava8.com/), you're in the right place. These examples are automatically extracted directly from the book. This repository includes tests to verify that the code in the book is correct. > NOTE: Do not attempt to use JDK 16 or greater with gradle. > This produces a `BUG!` message from Gradle, which is broken for those versions. ## Contents - [Building From the Command Line: Quick Version](#building-from-the-command-line-quick-version) - [Building From the Command Line: Detailed Instructions](#building-from-the-command-line-detailed-instructions) * [Install Java](#install-java) + [Windows](#windows) + [Macintosh](#macintosh) + [Linux](#linux) * [Verify Your Installation](#verify-your-installation) * [Installing and Running the Book Examples](#installing-and-running-the-book-examples) - [Appendix A: Command-Line Basics](#appendix-a-command-line-basics) * [Editors](#editors) * [The Shell](#the-shell) + [Starting a Shell](#starting-a-shell) + [Directories](#directories) + [Basic Shell Operations](#basic-shell-operations) + [Unpacking a Zip Archive](#unpacking-a-zip-archive) - [Appendix B: Testing](#appendix-b-testing) - [Appendix C: Troubleshooting](#appendix-c-troubleshooting) # Building From the Command Line: Quick Version Before you can run the examples from this repository, you must install [JDK8](http://www.oracle.com/technetwork/java/javase/downloads/index.html), the *Java Development Kit* for version 8 of the language. If you just want to download and check the code, [Download Here](https://github.com/BruceEckel/OnJava8-Examples/archive/refs/heads/master.zip) and [unzip it](#unpacking-a-zip-archive) into your destination directory. Open a [shell/command window](#appendix-a-command-line-basics) and move into the root of that directory. You'll know you are in the right directory if you see the files `gradlew` and `gradlew.bat`. You'll need an Internet connection the first time you compile the code, because Gradle needs to first install itself, then all the support libraries. Once these are installed you can perform additional compiling and running offline. On Mac/Linux, enter: ``` ./gradlew test ``` (If you get a *Permission denied* error, run `chmod +x ./gradlew`) On Windows, enter ``` gradlew test ``` If all goes well, the tests will run. Everything should complete without errors. All the book examples are in the subdirectory `Examples` in subdirectories corresponding to the atom names. # Building From the Command Line: Detailed Instructions If you are not familiar with the command line, first read [Command-Line Basics](#appendix-a-command-line-basics). ## Install Java You must first install the *Java Development Kit* (JDK). ### Windows 1. Follow the instructions to [install Chocolatey](https://chocolatey.org/). 2. At a [shell prompt](#appendix-a-command-line-basics), type: `choco install jdk8` (you may also select a more recent version, like `jdk11`). The installation process takes some time, but when it's finished Java is installed and the necessary environment variables are set. ### Macintosh The Mac comes with a much older version of Java that won't work for the examples in this book, so you'll need to update it to (at least) Java 8. 1. Follow the instructions at this link to [Install HomeBrew](http://brew.sh/) 2. At a [shell prompt](#appendix-a-command-line-basics), first type `brew update`. When that completes, enter `brew cask install java`. **NOTE:** Sometimes the default version of Java that you get with the above installation will be too recent and not validated by the Mac's security system. If this happens you'll either need to turn off the security by hand or install an earlier version of Java. For either choice, you'll need to Google for answers on how to solve the problem (often the easiest approach is to just search for the error message produced by the Mac). ### Linux Use the standard package installer with the following [shell commands](#appendix-a-command-line-basics): *Ubuntu/Debian*: 1. `sudo apt-get update` 2. `sudo apt-get install default-jdk` *Fedora/Redhat*: ``` su -c "yum install java-1.8.0-openjdk" ``` ## Verify Your Installation [Open a new shell](#appendix-a-command-line-basics) and type: ``` java -version ``` You should see something like the following (Version numbers and actual text will vary): ``` openjdk version "11" 2018-09-25 OpenJDK Runtime Environment 18.9 (build 11+28) OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode) ``` If you see a message that the command is not found or not recognized, review the installation instructions. If you still can't get it to work, check [StackOverflow](http://stackoverflow.com/search?q=installing+java). ## Installing and Running the Book Examples Once you have Java installed, the process to install and run the book examples is the same for all platforms: 1. Download the book examples from the [GitHub Repository](https://github.com/BruceEckel/OnJava8-Examples/archive/refs/heads/master.zip). 2. [Unzip](#unpacking-a-zip-archive) the downloaded file into the directory of your choice. 3. Use the Windows Explorer, the Mac Finder, or Nautilus or equivalent on Linux to browse to the directory where you uzipped `OnJava8-Examples`, and [open a shell](#appendix-a-command-line-basics) there. 4. If you're in the right directory, you should see files named `gradlew` and `gradlew.bat` in that directory, along with numerous other files and directories. The directories correspond to the chapters in the book. 5. At the shell prompt, type `gradlew test` (Windows) or `./gradlew test` (Mac/Linux). The first time you do this, Gradle will install itself and numerous other packages, so it will take some time. After everything is installed, subsequent builds and runs will be much faster. Note that you must be connected to the Internet the first time you run `gradlew` so that Gradle can download the necessary packages. # Appendix A: Command-Line Basics Because it is possible for a "dedicated beginner" to learn programming from this book, you may not have previously used your computer's command-line shell. If you have, you can go directly to the [installation instructions](#building-from-the-command-line-detailed-instructions). ## Editors To create and modify Java program files&mdash;the code listings shown in this book&mdash;you need a program called an *editor*. You'll also need the editor to make changes to your system configuration files, which is sometimes required during installation. Programming editors vary from heavyweight *Integrated Development Environments* (IDEs, like Eclipse, NetBeans and IntelliJ IDEA) to more basic text manipulation applications. If you already have an IDE and are comfortable with it, feel free to use that for this book. Numerous explanations in this book are specific to IntelliJ IDEA so if you don't already have an IDE you might as well start with IDEA. There are many other editors; these are a subculture unto themselves and people sometimes get into heated arguments about their merits. If you find one you like better, it's not too hard to change. The important thing is to choose one and get comfortable with it. ## The Shell If you haven't programmed before, you might be unfamiliar with your operating system *shell* (also called the *command prompt* in Windows). The shell harkens back to the early days of computing when everything happened by typing commands and the computer responded by displaying responses&mdash;everything was text-based. Although it can seem primitive in the age of graphical user interfaces, a shell provides a surprising number of valuable features. To learn more about your shell than we cover here, see [Bash Shell](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) for Mac/Linux or [Windows Shell](https://en.wikipedia.org/wiki/Windows_shell). ### Starting a Shell **Mac**: Click on the *Spotlight* (the magnifying-glass icon in the upper-right corner of the screen) and type "terminal." Click on the application that looks like a little TV screen (you might also be able to hit "Return"). This starts a shell in your home directory. **Windows**: First, start the Windows Explorer to navigate through your directories: - *Windows 7*: click the "Start" button in the lower left corner of the screen. In the Start Menu search box area type "explorer" and then press the "Enter" key. - *Windows 8*: click Windows+Q, type "explorer" and then press the "Enter" key. - *Windows 10*: click Windows+E. Once the Windows Explorer is running, move through the folders on your computer by double-clicking on them with the mouse. Navigate to the desired folder. Now click the file tab at the top left of the Explorer window and select "Open Windows Powershell." This opens a shell in the destination directory. **Linux**: To open a shell in your home directory: - *Debian*: Press Alt+F2. In the dialog that pops up, type 'gnome-terminal' - *Ubuntu*: Either right-click on the desktop and select 'Open Terminal', or press Ctrl+Alt+T - *Redhat*: Right-click on the desktop and select 'Open Terminal' - *Fedora*: Press Alt+F2. In the dialog that pops up, type 'gnome-terminal' ### Directories *Directories* are one of the fundamental elements of a shell. Directories hold files, as well as other directories. Think of a directory as a tree with branches. If `books` is a directory on your system and it has two other directories as branches, for example `math` and `art`, we say that you have a directory `books` with two *subdirectories* `math` and `art`. We refer to them as `books/math` and `books/art` since `books` is their *parent* directory. Note that Windows uses backslashes rather than forward slashes to separate the parts of a directory. ### Basic Shell Operations The shell operations shown here are approximately identical across operating systems. For the purposes of this book, here are the essential operations in a shell: - **Change directory**: Use `cd` followed by the name of the directory where you want to move, or `cd ..` if you want to move up a directory. If you want to move to a different directory while remembering where you came from, use `pushd` followed by the different directory name. Then, to return to the previous directory, just say `popd`. - **Directory listing**: `ls` (`dir` in Windows) displays all the files and subdirectory names in the current directory. Use the wildcard `*` (asterisk) to narrow your search. For example, if you want to list all the files ending in ".kt," you say `ls *.kt` (Windows: `dir *.kt`). If you want to list the files starting with "F" and ending in ".kt," you say `ls F*.kt` (Windows: `dir F*.kt`). - **Create a directory**: use the `mkdir` ("make directory") command (Windows: `md`), followed by the name of the directory you want to create. For example, `mkdir books` (Windows: `md books`). - **Remove a file**: Use `rm` ("remove") followed by the name of the file you wish to remove (Windows: `del`). For example, `rm somefile.kt` (Windows: `del somefile.kt`). - **Remove a directory**: use the `rm -r` command to remove the files in the directory and the directory itself (Windows: `deltree`). For example, `rm -r books` (Windows: `deltree books`). - **Repeat a command**: The "up arrow" on all three operating systems moves through previous commands so you can edit and repeat them. On Mac/Linux, `!!` repeats the last command and `!n` repeats the nth command. - **Command history**: Use `history` in Mac/Linux or press the F7 key in Windows. This gives you a list of all the commands you've entered. Mac/Linux provides numbers to refer to when you want to repeat a command. ### Unpacking a Zip Archive A file name ending with `.zip` is an archive containing other files in a compressed format. Both Linux and Mac have command-line `unzip` utilities, and it's possible to install a command-line `unzip` for Windows via the Internet. However, in all three systems the graphical file browser (Windows Explorer, the Mac Finder, or Nautilus or equivalent on Linux) will browse to the directory containing your zip file. Then right-mouse-click on the file and select "Open" on the Mac, "Extract Here" on Linux, or "Extract all ..." on Windows. # Appendix B: Testing The test system is built in so that we (the authors) can verify the correctness of what goes into the book. You don't need to run the tests, but if you want to, you can just run `gradlew test` (on Windows) or `./gradlew test` (Mac/Linux). To compile and run everything, the command is: `gradlew run` If you are on a Unix/Linux based system, you must select the local directory for all commands, for example: `./gradlew run` To only compile everything, the command is: `gradlew compileJava` To compile only a single chapter (including dependencies), use for example: `gradlew :strings:compileJava` To run only a single chapter, say: `gradlew :strings:run` Gradle can also be used to run a single program. Here, we run the **ReplacingStringTokenizer.java** program in the **strings** chapter subdirectory: `gradlew :strings:ReplacingStringTokenizer` However, if the file name is unique throughout the book (the majority are), you can just give the program name, like this: `gradlew ReplacingStringTokenizer` Note that all commands are run from the base directory where the example code is installed, and where you find the `gradlew` script. You can learn about other options by just typing `gradlew` with no arguments. # Appendix C: Troubleshooting If any terminology or processes described here remain unclear to you, you can usually find explanations or answers through [Google](https://www.google.com/). For more specific issues or problems, try [StackOverflow](http://stackoverflow.com/). Sometimes you can find installation instructions on [YouTube](https://www.youtube.com/). Sometimes a Gradle build will be unable to connect to the internet and download the necessary components, producing an error message containing: ``` javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty ``` Normally this means you have multiple Java installations on your machine (applications built with Java ordinarily install their own version of Java), and somehow the `cacerts` security file is interfering with the `cacerts` file for the Java you have installed. It can be difficult to know which `cacerts` file is interfering with yours. The brute-force approach is to search for all the `cacerts` files on your machine and begin uninstalling the associated applications---or in some cases, simply removing the directory containing the `cacerts` file---until the Gradle build begins to work. You might also need to adjust some environment variables and/or your path. Once you get the Gradle build working successfully, you should be able to reinstall any applications you removed in the process.
0
camunda/camunda-bpm-examples
A collection of usage examples for Camunda Platform intended to get you started quickly
null
Camunda Platform examples ==================== > Looking for the "invoice" example contained in the distribution? You can find it here: https://github.com/camunda/camunda-bpm-platform/tree/master/examples/invoice Camunda Platform examples is a collection of focused usage examples for the [Camunda Platform](https://github.com/camunda/camunda-bpm-platform), intended to get you started quickly. The sources on the master branch work with the current Camunda release. Follow the links below to browse the examples for the Camunda version you use: | Camunda Version | Link | Checkout command | |-----------------|-----------------------------------------------------------------------|-----------------------| | Latest | [Master branch](https://github.com/camunda/camunda-bpm-examples) | `git checkout master` | | 7.21 | [7.21 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.21) | `git checkout 7.21` | | 7.20 | [7.20 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.20) | `git checkout 7.20` | | 7.19 | [7.19 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.19) | `git checkout 7.19` | | 7.18 | [7.18 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.18) | `git checkout 7.18` | | 7.17 | [7.17 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.17) | `git checkout 7.17` | | 7.16 | [7.16 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.16) | `git checkout 7.16` | | 7.15 | [7.15 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.15) | `git checkout 7.15` | | 7.14 | [7.14 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.14) | `git checkout 7.14` | | 7.13 | [7.13 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.13) | `git checkout 7.13` | | 7.12 | [7.12 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.12) | `git checkout 7.12` | | 7.11 | [7.11 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.11) | `git checkout 7.11` | | 7.10 | [7.10 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.10) | `git checkout 7.10` | | 7.9 | [7.9 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.9) | `git checkout 7.9` | | 7.8 | [7.8 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.8) | `git checkout 7.8` | | 7.7 | [7.7 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.7) | `git checkout 7.7` | | 7.6 | [7.6 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.6) | `git checkout 7.6` | | 7.5 | [7.5 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.5) | `git checkout 7.5` | | 7.4 | [7.4 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.4) | `git checkout 7.4` | | 7.3 | [7.3 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.3) | `git checkout 7.3` | | 7.2 | [7.2 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.2) | `git checkout 7.2` | | 7.1 | [7.1 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.1) | `git checkout 7.1` | If you clone this repository, use the checkout commands to access the sources for the desired version. ## Overview * [Getting Started with Camunda Platform](#getting-started-with-camunda-platform) * [BPMN 2.0 & Process Implementation](#bpmn-20--process-implementation-examples) * [Deployment & Project Setup](#deployment--project-setup-examples) * [Process Engine Plugin](#process-engine-plugin-examples) * [Bpmn 2.0 Model API](#bpmn-20-model-api-examples) * [Cmmn 1.1 Model API Examples](#cmmn-11-model-api-examples) * [Cockpit](#cockpit-examples) * [Tasklist](#tasklist-examples) * [Multi-Tenancy](#multi-tenancy-examples) * [Spin](#spin-examples) * [DMN](#dmn-examples) * [Process Instance Migration](#process-instance-migration-examples) * [SDK-JS Examples](#sdk-js-examples) * [Authentication](#authentication) * [Spring Boot Starter examples](#spring-boot-starter-examples) * [Quarkus Extension Examples](#quarkus-extension-examples) * [External Task Client](#external-task-client) * [External Task Client Spring](#external-task-client-spring) * [External Task Client Spring Boot](#external-task-client-spring-boot) * [Testing](#testing) ### Getting Started with Camunda Platform | Name | Container | |------------------------------------------------------------------------------------------------|--------------------| | [Simple Process Applications](https://docs.camunda.org/get-started/bpmn20/) | All | | [Camunda Platform and the Spring Framework](https://docs.camunda.org/get-started/spring/) [^1] | Tomcat | | [Process Applications with JavaEE 6](https://docs.camunda.org/get-started/javaee6/) [^1] | JavaEE Containers | ### BPMN 2.0 & Process Implementation Examples | Name | Container | Keywords | |------------------------------------------------------------------------------------------------------------------|-------------------|---------------------------| | [Service Task REST HTTP](/servicetask/rest-service) | Unit Test | Rest Scripting, classless | | [Service Task SOAP HTTP](/servicetask/soap-service) [^1] | Unit Test | SOAP Scripting, classless | | [Service Task SOAP CXF HTTP](/servicetask/soap-cxf-service) [^1] | Unit Test | SOAP, CXF, Spring, Spin | | [Service Invocation Synchronous](/servicetask/service-invocation-synchronous) | Unit Test | Java Delegate, Sync | | [Service Invocation Asynchronous](/servicetask/service-invocation-asynchronous) | Unit Test | Signal, Async | | [User Task Assignment Email](/usertask/task-assignment-email) [^1][^2] | All | Email, Usertask | | [User Task Form Embedded](/usertask/task-form-embedded) [^2] | All | Html, Form, Usertask | | [User Task Form Embedded - Serialized Java Object](/usertask/task-form-embedded-serialized-java-object) [^1][^2] | All | Html, Form, Usertask | | [User Task Form Embedded - JSON](/usertask/task-form-embedded-json-variables) [^2] | All | Html, Form, Usertask | | [User Task Form Embedded - Bpmn Elements](/usertask/task-form-embedded-bpmn-events) [^2] | All | Html, Form, Usertask | | [User Task Form Embedded - React](/usertask/task-form-embedded-react) [^2] | All | Html, Form, Usertask | | [User Task Form - Camunda Forms](/usertask/task-camunda-forms) [^2] | All | Html, Form, Usertask | | [User Task Form Generated](/usertask/task-form-generated) [^1][^2] | All | Html, Form, Usertask | | [User Task Form JSF](/usertask/task-form-external-jsf) [^1][^2] | JavaEE Containers | JSF, Form, Usertask | | [Script Task XSLT](/scripttask/xslt-scripttask) | Unit Test | XSLT Scripttask | | [Script Task XQuery](/scripttask/xquery-scripttask) [^1] | Unit Test | XQuery Scripttask | | [Start Event - Message](/startevent/message-start) | Unit Test | Message Start Event | | [Start Process - SOAP CXF](/startevent/soap-cxf-server-start) [^1] | War | SOAP, CXF, Spring | ### Deployment & Project Setup Examples | Name | Container | Keywords | |-------------------------------------------------------------------------------------------------|-----------------------|---------------------------| | [Process Application - Servlet](deployment/servlet-pa) | All | War, Servlet | | [Process Application - EJB](deployment/ejb-pa) | JavaEE Containers | Ejb, War | | [Process Application - Jakarta EJB](deployment/ejb-pa-jakarta) | Jakarta EE Containers | Ejb, War | | [Process Application - Spring 5 Servlet - WildFly](deployment/spring-servlet-pa-wildfly) | WildFly | Spring, Servlet, War | | [Process Application - Spring 5 Servlet - Embedded Tomcat](deployment/spring-servlet-pa-tomcat) | Tomcat | Spring, Servlet, War | | [Embedded Spring 5 with embedded REST](deployment/embedded-spring-rest) | vanilla Apache Tomcat | Spring, Rest, Embedded | | [Plain Spring 5 Web application - WildFly](deployment/spring-wildfly-non-pa) | WildFly | Spring, Jndi, War | | [Process Application - Spring Boot](deployment/spring-boot) [^1] | Spring Boot | Spring | ### Process Engine Plugin Examples | Name | Container | Keywords | |-------------------------------------------------------------------------------------------------|----------------------|---------------------------------------------| | [BPMN Parse Listener](process-engine-plugin/bpmn-parse-listener) | Unit Test | Process Engine Plugin, Bpmn Parse Listener | | [BPMN Parse Listener on User Task](process-engine-plugin/bpmn-parse-listener-on-user-task) [^1] | Unit Test | Process Engine Plugin, Bpmn Parse Listener | | [Command Interceptor - Blocking](process-engine-plugin/command-interceptor-blocking) | Unit Test | Maintenance, Interceptor, Configuration | | [Custom History Level](process-engine-plugin/custom-history-level) | Unit Test | Process Engine Plugin, Custom History Level | | [Failed Job Retry Profile](process-engine-plugin/failed-job-retry-profile) | Unit Test | Process Engine Plugin, Failed Job Retry | ### Bpmn 2.0 Model API Examples | Name | Container | Keywords | |----------------------------------------------------------------------|----------------------|---------------------------| | [Generate JSF forms](/bpmn-model-api/generate-jsf-form) [^1] | JavaEE Containers | JSF, Usertask | | [Generate BPMN process](/bpmn-model-api/generate-process-fluent-api) | Unit Test | Fluent API | | [Parse BPMN model](/bpmn-model-api/parse-bpmn) | Unit Test | BPMN | ### Cmmn 1.1 Model API Examples | Name | Container | Keywords | |--------------------------------------------------------------------------------------------------|----------------------|---------------------------| | [Strongly-typed Access to Custom Extension Elements](/cmmn-model-api/typed-custom-elements) [^1] | Unit Test | CMMN, TransformListener | ### Cockpit Examples | Name | Keywords | |----------------------------------------------------------------------------------------------------------------|-------------------------------------------| | [Fullstack (ReactJS 16.x & Java) "Count Processes" Cockpit Plugin](/cockpit/cockpit-fullstack-count-processes) | Plugin, Custom Script, Fullstack, ReactJS | | [Angular "Open Usertasks" Cockpit Tab](/cockpit/cockpit-angular-open-usertasks) [^1] | Plugin, Custom Script, Angular | | [AngularJS 1.x "Search Processes" Cockpit Plugin](/cockpit/cockpit-angularjs-search-processes) [^1] | Plugin, Custom Script, AngularJS | | [ReactJS "Involved Users" Cockpit Plugin](/cockpit/cockpit-react-involved-users) | Plugin, Custom Script, ReactJS | | ["Cats" Cockpit Plugin](/cockpit/cockpit-cats) [^1] | Plugin, Custom Script | | ["Diagram interactions" Cockpit Plugin](/cockpit/cockpit-diagram-interactions) | Plugin, Custom Script | | ["Open Incidents" Cockpit Plugin](/cockpit/cockpit-open-incidents) [^1] | Plugin, Custom Script | | ["Request Interceptor" Cockpit Script](/cockpit/cockpit-request-interceptor) [^1] | Plugin, Custom Script | | [bpmn-js Cockpit module](/cockpit/cockpit-bpmn-js-module) [^1] | Plugin, Custom Script, bpmn-js | | [bpmn-js Cockpit module - bundled](/cockpit/cockpit-bpmn-js-module-bundled) | Plugin, Custom Script, bpmn-js, rollup | ### Tasklist Examples | Name | Keywords | |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------| | [Create Standalone Task - client side](https://github.com/camunda/camunda-bpm-platform/tree/master/webapps/frontend/ui/tasklist/plugins/standaloneTask/app) | Plugin | | [Create Standalone Task - server side](https://github.com/camunda/camunda-bpm-platform/blob/master/webapps/assembly/src/main/java/org/camunda/bpm/tasklist/impl/plugin) | Plugin | | [Javascript Only Plugin](/tasklist/cats-plugin) | Plugin, Custom Script | | [JQuery 3.4 Behavior Patch](/tasklist/jquery-34-behavior) [^1] | Plugin, Custom Script | ### SDK-JS Examples | Name | Environment | Keywords | |------------------------------------------------|-------------|-----------------------------| | [SDK JS forms](/sdk-js/browser-forms) [^1][^2] | Browser | HTML, task, form, SDK | ### Multi-Tenancy Examples | Name | Container | Keywords | |----------------------------------------------------------------------------------------------------------------------------|-----------|---------------| | [Multi-Tenancy with Database Schema Isolation](multi-tenancy/schema-isolation) | Wildfly | Multi-Tenancy | | [Multi-Tenancy with Tenant Identifiers for Embedded Process Engine](multi-tenancy/tenant-identifier-embedded) | Unit Test | Multi-Tenancy | | [Multi-Tenancy with Tenant Identifiers for Shared Process Engine](multi-tenancy/tenant-identifier-shared) | All | Multi-Tenancy | | [Multi-Tenancy with Tenant Identifiers and Shared Process Definitions](multi-tenancy/tenant-identifier-shared-definitions) | Unit Test | Multi-Tenancy | ### Spin Examples | Name | Container | Keywords | |------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|------------------------------------| | [Global Data Format Configuration to Customize JSON serialization](spin/dataformat-configuration-global) | Unit Test | Spin, Configuration | | [Process-Application-Specific Data Format Configuration to Customize JSON serialization](spin/dataformat-configuration-in-process-application) | Application Server | Spin, Configuration, Shared Engine | ### DMN Examples | Name | Container | Keywords | |---------------------------------------------------------------------------------------|-----------|-----------------| | [Embed Decision Engine - Dish Decision Maker](dmn-engine/dmn-engine-java-main-method) | Jar | DMN, Embed | | [Decision Requirements Graph(DRG) Example](dmn-engine/dmn-engine-drg) | Jar | DMN, DRG, Embed | ### Process Instance Migration Examples | Name | Container | Keywords | |-----------------------------------------------------------------------------------|---------------------------------------|-----------------| | [Migration on Deployment of New Process Version](migration/migrate-on-deployment) | Application Server with Shared Engine | BPMN, Migration | ### Authentication | Name | Container | Keywords | |---------------------------------------------------|----------------------------------------------------------------------------|-------------------------| | [Basic Authentication](authentication/basic) [^1] | Spring boot with embedded engine, REST API and Basic Authentication filter | Authentication | ### Spring Boot Starter examples | Name | Container | Keywords | |-------------------------------------------------------------------|--------------------------------------------------------|---------------------------------------| | [Plain Camunda Engine](spring-boot-starter/example-simple) | Jar | Spring Boot Starter | | [Webapps](spring-boot-starter/example-webapp) | Spring boot with embedded engine and Webapps | Spring Boot Starter, Webapps | | [Webapps EE](spring-boot-starter/example-webapp-ee) | Spring boot with embedded engine and Webapps | Spring Boot Starter, Webapps | | [REST API](spring-boot-starter/example-web) | Spring boot with embedded engine and Webapps | Spring Boot Starter, REST API | | [Twitter](spring-boot-starter/example-twitter) | Spring boot with embedded engine and Webapps | Spring Boot Starter, Webapps, Twitter | | [Camunda Invoice Example](spring-boot-starter/example-invoice) | Spring boot with embedded engine, Webapps and Rest API | Spring Boot Starter, REST API | | [Autodeployment](spring-boot-starter/example-autodeployment) [^1] | Spring boot with embedded engine and Webapps | Spring Boot Starter | | [REST API DMN](spring-boot-starter/example-dmn-rest) [^1] | Spring boot with embedded engine and Webapps | Spring Boot Starter, REST API | ### Quarkus Extension Examples | Name | Container | Keywords | |-------------------------------------------------------------------|----------------------------------------------------------------------------|-------------------------| | [Datasource Example](quarkus-extension/datasource-example) | Uber-Jar | Quarkus Extension | | [Spin Plugin Example](quarkus-extension/spin-plugin-example) | Uber-Jar | Quarkus Extension | | [Simple REST Example](quarkus-extension/simple-rest-example) [^1] | Uber-Jar | Quarkus Extension | ### External Task Client | Name | Environment | Keywords | |------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|-----------------------------------| | [Order Handling - Java](./clients/java/order-handling) | Java External Task Client | External Task Client, Servicetask | | [Loan Granting - Java](./clients/java/loan-granting) [^1] | Java External Task Client | External Task Client, Servicetask | | [Dataformat - Java](./clients/java/dataformat) [^1] | Java External Task Client | External Task Client, Servicetask | | [Loan Granting - JavaScript](https://github.com/camunda/camunda-external-task-client-js/tree/master/examples/granting-loans) | JavaScript External Task Client | External Task Client, Servicetask | | [Order Handling - JavaScript](https://github.com/camunda/camunda-external-task-client-js/tree/master/examples/order) | JavaScript External Task Client | External Task Client, Servicetask | ### External Task Client Spring | Name | Keywords | |------------------------------------------------------------------------------------------|-----------------------------------| | [Loan Granting Example](./spring-boot-starter/external-task-client/loan-granting-spring) | External Task Client, Servicetask | ### External Task Client Spring Boot | Name | Container | Keywords | |---------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|--------------------------------------------------------| | [Loan Granting w/ REST API & Webapp Example](./spring-boot-starter/external-task-client/loan-granting-spring-boot-webapp) | Spring Boot with embedded Client, REST API & Webapp | External Task Client, Servicetask, Spring Boot Starter | | [Order Handling Example](./spring-boot-starter/external-task-client/order-handling-spring-boot) [^1] | Spring Boot with embedded Client | External Task Client, Servicetask, Spring Boot Starter | | [Request Interceptor Example](./spring-boot-starter/external-task-client/request-interceptor-spring-boot) [^1] | Spring Boot with embedded Client | External Task Client, Servicetask, Spring Boot Starter | ### Container Specifics | Name | Container | Keywords | |-----------------------------------------------------------------------|-----------|--------------| | [Jackson Annotation Example for WildFly](wildfly/jackson-annotations) | Wildfly | War, Servlet | ### Testing | Name | Keywords | |------------------------------------------------------------------------------------------------------|--------------------------| | [Assert](testing/assert/job-announcement-publication-process) | Testing, Junit 4, Assert | | [Assert and JUnit 5](testing/junit5/camunda-bpm-junit-assert/) | Testing, Junit 5, Assert | | [Assert and Junit 5: configure a custom process engine](testing/junit5/camunda-bpm-junit-use-engine) | Testing, Junit 5, Assert | ## Contributing Have a look at our [contribution guide](https://github.com/camunda/camunda-bpm-platform/blob/master/CONTRIBUTING.md) for how to contribute to this repository. ## License The source files in this repository are made available under the [Apache License Version 2.0](./LICENSE). [^1]: _This example is not actively maintained anymore._ [^2]: _Complete demo applications_
0
oracle-samples/oracle-db-examples
Examples of applications and tool usage for Oracle Database
database java oracle oracle-11g oracle-12c oracle-19c oracle-autonomous-database oracle-database oracle-db sql
# oracle-db-examples This repository stores a variety of examples demonstrating how to use the Oracle Database. | Repo/Folder name | Description | | ------------- | ------------- | | [C](./C) | C examples | | [apex](./apex) | APEX examples | | [db-sample-schemas](https://github.com/oracle/db-sample-schemas) | Git submodule of the Oracle Database Sample Schemas | | [dotnet](https://github.com/oracle/dotnet-db-samples) | .NET based examples | | [exadata](./exadata) | Exadata examples | | [java](./java) | Java examples | | [javascript](./javascript) | JavaScript examples | | [machine-learning](./machine-learning) | Oracle Machine Learning examples | | [optimizer](./optimizer) | Oracle Optmizer and Optimizer Stats examples | | [plsql](./plsql) | PL/SQL examples | | [python](./python) | Python examples | | [ruby](./ruby) | Ruby examples | | [sagas](./sagas) | Saga examples | | [security](./security) | Security features examples | | [spatial](./spatial) | Spatial features examples | | [sql](./sql) | SQL examples | | [sqldeveloper](./sqldeveloper) | [SQL Developer](http://www.oracle.com/technetwork/developer-tools/sql-developer/) examples | | [txeventq](./txeventq) | TxEventQ examples | ## Documentation You can find the online documentation of the Oracle Database under [docs.oracle.com/en/database/](http://docs.oracle.com/en/database/) ## LiveSQL Some of the examples that you see within this repository can be executed in the free web-based tool: [LiveSQL.oracle.com](https://livesql.oracle.com). LiveSQL is also an excellent resource for getting started with Oracle Database. ## Dev Gym If you would like to challenge yourself, you can take quizzes, workouts and classes at [DevGym.oracle.com](https://devgym.oracle.com). ## 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 You may not use the identified files except in compliance with the Apache License, Version 2.0 (the "License.") You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is also reproduced in [LICENSE.md](./LICENSE.md) 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
anarsultanov/examples
Examples for my blog posts.
null
# examples ![CodeQL](https://github.com/anarsultanov/examples/workflows/CodeQL/badge.svg) This project is a collection of examples for articles on **[my blog](https://sultanov.dev/)**.
0
java9-modularity/examples
Contains all code examples from the Java 9 Modularity book, organized by chapter.
null
![Java 9 Modularity cover](java9modularity-flat-cover.png) This repository contains all the example code from the [Java 9 Modularity book](http://shop.oreilly.com/product/0636920049494.do). The examples are grouped by chapter in the book: 2. Modules and Modular JDK 3. Working with Modules 4. Services 5. Modularity Patterns 6. Advanced Modularity Patterns 7. Migration Without Modules 8. Migration to Modules 9. Migration Case Study: Spring and Hibernate 10. Library Migration 11. Build Tools and IDEs 12. Testing Modules Most examples contain a `run.sh` file to compile and run the example. The scripts are tested on Mac OS and Linux. Windows users can use the Linux Subsystem for Windows, or use Cygwin to run the scripts. Some examples demonstrate errors, which means that compiling or running them may fail on purpose. A README is available in each example directory to explain the example.
0
mapstruct/mapstruct-examples
Examples for using MapStruct
null
# MapStruct Examples This repository contains examples showing how to use [MapStruct](http://mapstruct.org/), a Java annotation processor for the generation of type-safe bean mapping classes. Currently, the following examples exist: * [_mapstruct-on-ant_](mapstruct-on-ant): Shows how to use MapStruct in Ant-based projects; to build this example, run `ant build` on the command line * [_mapstruct-on-gradle_](mapstruct-on-gradle): Shows how to use MapStruct in Gradle-based projects; to build the example project, run `./gradlew clean build` on the command line * [_mapstruct-on-bazel_](mapstruct-on-bazel): Shows how to use MapStruct in Bazel-based projects; to build the example project, run `bazel build //...` on the command line, to test the project, run `bazel test //...`. * [_mapstruct-lombok_](mapstruct-lombok): Shows how to use MapStruct together with Lombok (with both a Maven `pom.xml` and a Gradle `build.gradle`); to build the example project, run either `mvn clean install` or `./gradlew clean build` on the command line * [_mapstruct-iterable-non-iterable_](mapstruct-iterable-to-non-iterable): Shows how by means of a mapper util class conversions can be made from an iterable- to its non-iterable element * [_mapstruct-mapping-from-map_](mapstruct-mapping-from-map): Shows how by means of a mapper util class and qualifiers extracting value can be carried out on Maps. Watch [mapstruct/mapstruct#1075](https://github.com/mapstruct/mapstruct/issues/1075) for native support. * [_mapstruct-rounding_](mapstruct-rounding): Shows how by means of a mapper util class and qualifiers roundings can be carried out on Numbers * [_mapstruct-updatemethods_](mapstruct-updatemethods-1): Shows how to update an existing target object * [_mapstruct-field-mapping_](mapstruct-field-mapping): Shows how MapStruct can be used with "struct" like objects with public fields * [_mapstruct-nested-bean-mappings_](mapstruct-nested-bean-mappings): Shows how to map object graphs via a main root method * [_mapstruct-mapping-with-cycles_](mapstruct-nested-bean-mappings): Shows how to map object graphs that can contain cycles * [_mapstruct-spi-accessor-naming_](mapstruct-spi-accessor-naming): Example on how to use the Service Provider Interface (SPI) for a custom accessor naming strategy. * [_mapstruct-protobuf3_](mapstruct-protobuf3): Example on how to use protobuf3 with MapStruct * [_mapstruct-kotlin_](mapstruct-kotlin): Example on how to use MapStruct with Kotlin using KAPT (Kotlin Annotation Processing Tool) * [_mapstruct-kotlin-gradle_](mapstruct-kotlin-gradle): Example on how to use MapStruct with Kotlin and Gradle Kotlin DSL using KAPT * [_mapstruct-jpa-child-parent_](mapstruct-jpa-child-parent): Example on how to use @Context in relation to parent / child relations in JPA) * [_mapstruct-suppress-unmapped_](mapstruct-suppress-unmapped): Shows how mapping to target properties can be ignored without warning by default in a mixed scenario. However bean property mappings that have the same name will still be applied. * [_mapstruct-lookup-entity-with-id_](mapstruct-lookup-entity-with-id): Shows how an object with composite key can be read from the database in a mapping method. * [_mapstruct-clone_](mapstruct-clone): Shows how an object can be deeply cloned by defining all mapping methods. * [_mapstruct-metadata-annotations_](mapstruct-metadata-with-annotations): Demonstrates how to read annotations and use them as mapping instruction. * [_mapstruct-mappers-repo_](mapstruct-mapper-repo): Demonstrates how one can build a repo of mappers by means of code generation. ## License The examples in this project are licensed under the Apache License, Version 2.0.
0
nanchen2251/RxJava2Examples
:fire:RxJava2 Examples —— 这可能是从 RxJava1 跳到 RxJava2(学习 RxJava2 )最好的例子 Demo:https://github.com/nanchen2251/RxJava2Examples
null
# RxJava2Examples ### RxJava2 Examples——它可能是从RxJava1跳到RxJava2(学习RxJava2)最好的例子Demo > RxJava 1.x 到 RxJava 2.x 的无缝对接 无需学习 RxJava 1.x, 直接学习 RxJava 2.x 完备齐全的操作符示例 支持与 Retrofit 交互处理示例 Activity 基类封装处理 ### 文章链接: [这可能是最好的 RxJava 2.x 入门教程(完结版)](http://www.jianshu.com/p/0cd258eecf60)<br> [这可能是最好的 RxJava 2.x 入门教程(一)](http://www.jianshu.com/p/a93c79e9f689)<br> [这可能是最好的 RxJava 2.x 入门教程(二)](http://www.jianshu.com/p/b39afa92807e)<br> [这可能是最好的 RxJava 2.x 入门教程(三)](http://www.jianshu.com/p/e9c79eacc8e3)<br> [这可能是最好的 RxJava 2.x 入门教程(四)](http://www.jianshu.com/p/c08bfc58f4b6)<br> [这可能是最好的 RxJava 2.x 入门教程(五)](http://www.jianshu.com/p/81fac37430dd)<br> ### 关于作者    南尘<br>    四川成都<br>    [其它开源](https://github.com/nanchen2251/)<br>    [个人博客](https://nanchen2251.github.io/)<br>    [简书](http://www.jianshu.com/u/f690947ed5a6)<br>    [博客园](http://www.cnblogs.com/liushilin/)<br>    交流群:118116509 <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=e6ad4af66393684e1d0c9441403b049d2d5670ec0ce9f72150e694cbb7c16b0a"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="Android神技侧漏交流群" title="Android神技侧漏交流群"></a>( 点击图标即可加入 )<br>    欢迎投稿(关注)我的唯一公众号,公众号搜索 nanchen 或者扫描下方二维码:<br>    ![](https://github.com/nanchen2251/Blogs/blob/master/images/nanchen12.jpg) ### Just a gif ![](https://github.com/nanchen2251/RxJava2Examples/blob/master/GIF.gif) ### RxJava 1.x 到 RxJava 2.x 变化一览 RxJava 1.x -> RxJava 2.x * `onCompleted` -> `onComplete` - without the trailing d * `Func1` -> `Function` * `Func2` -> `BiFunction` * `CompositeSubscription` -> `CompositeDisposable` * `limit` operator has been removed - Use `take` in RxJava2 * and much more. ### 一些操作符的解释 * `Map` -> transform the items emitted by an Observable by applying a function to each item * `Zip` -> combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this function * `Filter` -> emit only those items from an Observable that pass a predicate test * `FlatMap` -> transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable * `Take` -> emit only the first n items emitted by an Observable * `Reduce` -> apply a function to each item emitted by an Observable, sequentially, and emit the final value * `Skip` -> suppress the first n items emitted by an Observable * `Buffer` -> periodically gather items emitted by an Observable into bundles and emit these bundles rather than emitting the items one at a time * `Concat` -> emit the emissions from two or more Observables without interleaving them * `Replay` -> ensure that all observers see the same sequence of emitted items, even if they subscribe after the Observable has begun emitting items * `Merge` -> combine multiple Observables into one by merging their emissions ### 尽情地下载运行,开始感受RxJava 2.x 的强大魅力吧~ ### 为这个例子pull你的伟大代码,加入分享这个大家庭,Just to do! ### 该例子借鉴了以下项目: * [https://github.com/amitshekhariitbhu/RxJava2-Android-Samples](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples)     #### 有码走遍天下 无码寸步难行(引自网络) > 1024 - 梦想,永不止步! 爱编程 不爱Bug 爱加班 不爱黑眼圈 固执 但不偏执 疯狂 但不疯癫 生活里的菜鸟 工作中的大神 身怀宝藏,一心憧憬星辰大海 追求极致,目标始于高山之巅 一群怀揣好奇,梦想改变世界的孩子 一群追日逐浪,正在改变世界的极客 你们用最美的语言,诠释着科技的力量 你们用极速的创新,引领着时代的变迁 ------至所有正在努力奋斗的程序猿们!加油!! ## Licenses ``` Copyright 2017 nanchen(刘世麟) 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
lokeshgupta1981/SpringExamples
Initial Commit
null
# Spring Boot Examples by HowToDoInJava.com This repository hosts the projects and their source codes written for various tutorials written in [howtodoinjava.com](https://howtodoinjava.com/).
0
apache/struts-examples
Mirror of Apache Struts
java struts web-framework
# Struts Examples [![Build Status @ ASF](https://ci-builds.apache.org/buildStatus/icon?job=Struts%2FStruts-examples-master)](https://ci-builds.apache.org/job/Struts/job/Struts-examples-master/) [![Build Status @ GH Actions](https://github.com/apache/struts-examples/actions/workflows/maven.yml/badge.svg)](https://github.com/apache/struts-examples/actions/workflows/maven.yml) [![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) This Maven multi-module project contains all the Struts 2 example applications that are part of the Getting Started Struts 2 tutorials at http://struts.apache.org. To build all the example applications run the Maven command: ``` mvn -e clean package ``` In the project's root folder, Maven will build each module and create a `.war` file in the target sub-folder of each module. You can then copy the `.war` files to your Servlet container (e.g. Tomcat, Jetty, GlassFish, etc). There is a README file in each module with instructions and the URL to view that application.
0
camunda-consulting/camunda-7-code-examples
Examples and demo applications built by the camunda consulting team
null
Camunda Consulting Examples =========================== This repository contains examples, code snippets and demo applications build by the Camunda Consulting Team or contributors. Note: All examples are only tested manually and there is no guarantee that they are actively maintained. If you search for officially maintained examples go to <a href="https://github.com/camunda/camunda-bpm-examples">https://github.com/camunda/camunda-bpm-examples</a>. <table> <tr> <th>Type of Example</th> <th>Description</th> </tr> <tr> <td><a href="https://github.com/camunda/camunda-consulting/tree/master/snippets">Snippets</a></td> <td>Code snippets for particular technical issues. <b>The code is not maintained and might be out-of-date.</b></td> </tr> <tr> <td><a href="https://github.com/camunda/camunda-consulting/tree/master/one-time-examples">One-time Examples</a></td> <td>Examples created once for a specific event (like a conference or a magazine article). <b>The code is not maintained and might be out-of-date.</b></td> </tr> </table> <b>Please add a README.md with a short project description and how to use it whenever you add a new snippet or example.</b>
0
rhwayfun/spring-boot-learning-examples
Spring Boot工程实践,快速上手Spring Boot开发必备。最全的Spring Boot使用案例!
springboot
# 最全的Spring Boot实践指南 ![travis](https://travis-ci.org/rhwayfun/spring-boot-learning-examples.svg?branch=develop) [![codecov](https://codecov.io/gh/rhwayfun/spring-boot-learning-examples/branch/develop/graph/badge.svg)](https://codecov.io/gh/rhwayfun/spring-boot-learning-examples) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/spring-boot-learning-examples/chat) [![license](https://img.shields.io/badge/license-EPL%201.0-green.svg)](https://choosealicense.com/licenses/epl-1.0/) Spring Boot知识点整理、工程实践,并结合工作案例进行深入 * 使用travis-ci持续集成 * 使用codecov进行代码覆盖率检查 * 学习案例以模块方式划分,每隔模块都是独立可执行项目,直接运行Application即可 ## 分享平台 > 博客:http://blog.csdn.net/u011116672 > Github:https://github.com/rhwayfun ## 项目模块 ``` └── 基础入门 └── Web开发 └── Weex └── Bootstrap └── thymeleaf └── 缓存使用 └── Ehcache └── Caffeine └── Guava Cache └── 数据库 └── Mybatis └── MySQL └── Spring其他功能 └── Spring Task └── Spring Retry └── Spring AOP └── 企业开发进阶 └── Dubbo(阿里开源的分布式服务治理框架) └── Kafka └── RocketMQ └── Sharding-JDBC └── Disconf └── Elsaticsearch └── Elsatic-job └── Redis └── MongoDB └── Mockito └── InfluxDB └── Ignite └── Geode └── ... ``` ### 基础入门 * spring-boot-quickstart(Spring Boot快速入门案例) * spring-boot-configuration(了解下Spring Boot配置管理) ### web开发 * spring-boot-web-jsp(使用JSP作为开发) * spring-boot-web-thymeleaf(使用模板引擎thymeleaf开发) * spring-boot-web-bootstrap(bootstrap入门demo) * spring-boot-security(权限控制项目实战) [spring security实战](http://blog.csdn.net/u011116672/article/details/77428049) * spring-boot-security-cas(集成CAS搭建自己的认证中心) ### 缓存使用 * spring-boot-cache-caffeine(高性能本地缓存框架caffeine实践) * spring-boot-cache-ehcache(Java应用最多的本地缓存Ehcache实践) * spring-boot-redis(分布式KV缓存redis实践) ### 数据库 * spring-boot-mybatis(mybatis使用快速入门) * spring-boot-mybatis-annotation(mybatis全注解使用示例) * spring-boot-mybatis-multidatasource(mybatis多数据库解决方案) * spring-boot-mybatis-sharding-jdbc(使用sharding-jdbc对数据库进行分库分表) [Sharding-JDBC分库分表使用实例](http://blog.csdn.net/u011116672/article/details/78374724) * spring-boot-mybatis-sharding-jdbc-masterslave(使用sharding-jdbc完成分库分表+读写分离) [Sharding-JDBC读写分离探秘](http://blog.csdn.net/u011116672/article/details/78576117) ### Spring其他功能 * spring-boot-task(定时任务) [Spring定时任务源码分析](http://blog.csdn.net/u011116672/article/details/77132205) [深入浅出Spring task定时任务](http://blog.csdn.net/u011116672/article/details/52517247) * spring-boot-retry(重试和熔断) [重试框架Spring retry实践](http://blog.csdn.net/u011116672/article/details/77823867) * spring-boot-aspect(aop相关,静态织入、动态织入) [AspectJ切面执行两次原因分析](http://blog.csdn.net/u011116672/article/details/63685340) ### 企业开发进阶 * spring-boot-dubbo(服务治理框架dubbo使用案例) * spring-boot-dubbo-annotation(服务治理框架dubbo案例,基于注解实现) [dubbo-spring-boot-project](https://github.com/apache/incubator-dubbo-spring-boot-project) * spring-boot-dubbo-extension(基于duboo扩展点实现自定义扩展) * spring-boot-disconf(分布式配置管理disconf使用案例) * spring-boot-elasticsearch(全文搜索引擎elasticsearch实践) * spring-boot-mongodb(NoSQL数据库mongodb实战) * spring-boot-kafka(消息中间件kafka实践) * spring-boot-rocketmq(阿里开源消息中间件RocketMQ实践) spring-boot-rocketmq-starter使用案例 * spring-boot-rocketmq-starter(阿里开源消息中间件RocketMQ Spring Boot Starter) [spring-boot-rocketmq-starter 使用指南](apache-rocketmq-starter-guide.md) [spring-boot-rocketmq-starter](https://github.com/rhwayfun/spring-boot-rocketmq-starter) * spring-boot-mockito(Java社区最火的测试框架Mockito使用实战) * spring-boot-hibernate-validation(Hibernate出品的校验框架使用实战) * spring-boot-geode(内存数据库geode实战,目前应用与内部地址位置距离的计算) * spring-boot-ignite(内存数据库ignite实战) * spring-boot-elastic-job(分布式任务调度框架elastic-job实战) * spring-boot-starter(自定义spring boot starter) * spring-boot-starter-rest(自定义spring boot starter) * spring-boot-logging-log4j2(使用log4j2) * spring-boot-influxdb(时序数据库influxDB实践) * spring-boot-mybatis-sharding-jdbc(分库分表Sharding-JDBC实践) ## 准备工作 > [数据库脚本](docs/sql/springboot/spring-boot-mybatis.sql) ### 安装MySQL ### 添加用户`travis` ``` create user travis@localhost; ``` ### 授权 ``` grant all privileges on *.* to travis@localhost;/* mac系统下localhost要改成127.0.0.1 */ ``` ### 查看权限 ``` /* 查看MySQL所有用户 */ SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user; /* 查看travis用户的权限 */ show grants for travis@localhost; ``` ### 编译运行 ``` mvn clean compile mvn clean package ``` ## 未完待续 更多案例不断补充中。。。如果您觉得对你有用,就给我点个赞吧\(^o^)/~
0
pkainulainen/spring-data-jpa-examples
null
null
# Test With Spring Course If you are struggling to write good automated tests for Spring web applications, you are not alone! [I have launched a video course](https://www.testwithspring.com/?utm_source=github&utm_medium=social&utm_content=spring-data-jpa&utm_campaign=test-with-spring-course-presales) that describes how you can write automated tests which embrace change and help you to save your time (and nerves). # Spring Data JPA Tutorial This repository contains the example applications of my [Spring Data JPA tutorial](http://www.petrikainulainen.net/spring-data-jpa-tutorial/). The READMEs of the examples provide more information about the application in question.
0
springframeworkguru/spring5webapp
Example Spring 5 Web Application
null
# Spring Framework 5: Beginner to Guru This repository is for an example application built in my [Spring Framework 5 - Beginner to Guru](https://www.udemy.com/testing-spring-boot-beginner-to-guru/?couponCode=GITHUB_REPO) online course The application is a simple Spring Boot 2 / Spring Framework 5 web application. It is used to help students learn how to use the Spring Framework. Step by step instructions and detailed explanations can be found within the course. As you work through the course, please feel free to fork this repository to your out GitHub repo. Most links contain links to source code changes. If you encounter a problem you can compare your code to the lesson code. [See this link for help with compares](https://github.com/springframeworkguru/spring5webapp/wiki#getting-an-error-but-cannot-find-what-is-different-from-lesson-source-code) ## Spring Framework 5: Beginner to Guru Course Wiki Got a question about your Spring Framework 5 course? [Checkout these FAQs!](https://github.com/springframeworkguru/spring5webapp/wiki) ## Getting Your Development Environment Setup ### Recommended Versions | Recommended | Reference | Notes | | ----------- | --------- | ----- | | Oracle Java 11 JDK | [Download]([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html](https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html)) | Java 8 or Java 17 may also be used. | | IntelliJ 2018 or Higher | [Download](https://www.jetbrains.com/idea/download/) | Ultimate Edition recommended. Students can get a free 120 trial license [here](https://github.com/springframeworkguru/spring5webapp/wiki/Which-IDE-to-Use%3F#how-do-i-get-the-free-120-day-trial-to-intellij-ultimate) | | Maven 3.6.0 or higher | [Download](https://maven.apache.org/download.cgi) | [Installation Instructions](https://maven.apache.org/install.html)| | Gradle 4.8 or higher | [Download](https://gradle.org/install/) | **Note:** Use Version 5 or higher if using Java 11 | | Git 2.15 or higher | [Download](https://git-scm.com/downloads) | | | Git GUI Clients | [Downloads](https://git-scm.com/downloads/guis) | Not required. But can be helpful if new to Git. SourceTree is a good option for Mac and Windows users. | | Spring Boot 2.1 or higher | [What's new](https://content.pivotal.io/springone-platform-2017/whats-new-in-spring-boot-2-0-phillip-webb-madhura-bhave) | | ## All Spring Framework Guru Courses ### Spring Framework 5 * [Spring Framework 5: Beginner to Guru](https://www.udemy.com/testing-spring-boot-beginner-to-guru/?couponCode=GITHUB_REPO) - Get the most modern and comprehensive course available for the Spring Framework! Join over 17,200 over Guru's in an Slack community exclusive to this course! More than 5,700 students have given this 53 hour course a 5 star review! * [Spring Boot Microservices with Spring Cloud Beginner to Guru](https://www.udemy.com/course/spring-boot-microservices-with-spring-cloud-beginner-to-guru/?referralCode=6142D427AE53031FEF38) - Master Microservice Architectures Using Spring Boot 2 and Cloud Based Deployments with Spring Cloud and Docker * [Reactive Programming with Spring Framework 5](https://www.udemy.com/reactive-programming-with-spring-framework-5/?couponCode=GITHUB_REPO_SF5B2G) - Keep your skills razor sharp and take a deep dive into Reactive Programming! * [Testing Spring Boot: Beginner to Guru](https://www.udemy.com/testing-spring-boot-beginner-to-guru/?couponCode=GITHUB_REPO_SF5B2G) - ** Best Selling Course** Become an expert in testing Java and Spring Applications with JUnit 5, Mockito and much more! ### SQL * [SQL Beginner to Guru: MySQL Edition](https://www.udemy.com/sql-beginner-to-guru-mysql-edition/?couponCode=GITHUB_REPO_SF5B2G) - SQL is a fundamental must have skill, which employers are looking for. Learn to master SQL on MySQL, the worlds most popular database! ### DevOps * [Apache Maven: Beginner to Guru](https://www.udemy.com/apache-maven-beginner-to-guru/?couponCode=GITHUB_REPO_SF5B2G) - **Best Selling Course** Take the mystery out of Apache Maven. Learn how to use Maven to build your Java and Spring Boot projects! * [OpenAPI: Beginner to Guru](https://www.udemy.com/course/openapi-beginner-to-guru/?referralCode=0E7F511C749013CA6AAD) - Master OpenAPI (formerly Swagger) to Create Specifications for Your APIs * [Docker for Java Developers](https://www.udemy.com/docker-for-java-developers/?couponCode=GITHUB_REPO_SF5B2G) - Best Selling Course on Udemy! Learn how you can supercharge your development by leveraging Docker. Collaborate with other students in a Slack community exclusive to the course! * [Spring Framework DevOps on AWS](https://www.udemy.com/spring-core-devops-on-aws/?couponCode=GITHUB_REPO_SF5B2G) - Learn how to build and deploy Spring applications on Amazon AWS! * [Ready for Production with Spring Boot Actuator](https://www.udemy.com/ready-for-production-with-spring-boot-actuator/?couponCode=GITHUB_REPO_SF5B2G) - Learn how to leverage Spring Boot Actuator to monitor your applications running in production. ### Web Development with Spring Framework * [Mastering Thymeleaf with Spring Boot](https://www.udemy.com/mastering-thymeleaf-with-spring/?couponCode=GITHUB_REPO_SF5B2G) - Once you learn Thymeleaf, you'll never want to go back to using JSPs for web development! ## Connect with Spring Framework Guru * Spring Framework Guru [Blog](https://springframework.guru/) * Subscribe to Spring Framework Guru on [YouTube](https://www.youtube.com/channel/UCrXb8NaMPQCQkT8yMP_hSkw) * Like Spring Framework Guru on [Facebook](https://www.facebook.com/springframeworkguru/) * Follow Spring Framework Guru on [Twitter](https://twitter.com/spring_guru) * Connect with John Thompson on [LinkedIn](http://www.linkedin.com/in/springguru)
1
marhan/effective-java-examples
Source code to the book Effective Java Second Edition" created by Joshua Bloch"
null
# Effective Java Examples This are the souces from the book "Effective Java Second Edition", written by Joshua Bloch. They are unmodifed, except the package names. The original source are downloaded from http://java.sun.com/docs/books/effective/index.html, but are no longer provided.
0
maxliaops/Java_Web_Examples
《实战突击:Java Web项目整合开发》源码
null
Java_Web_Examples ================= 《实战突击:Java Web项目整合开发》源码 01 - 都市供求信息网 02 - 物流配货网 03 - 编程爱好者博客地带 04 - 明日知道 05 - 天下陶网络商城 06 - 网络在线考试 07 - 物资管理系统 08 - 企业办公自动化系统 09 - 校园管理系统 10 - 高校学生选课系统 11 - MR网络购物中心 12 - 图书馆管理系统 13 - 讯友网络相册 14 - 企业门户网站 15 - 芝麻开门博客网 16 - 进销存管理系统 17 - 网上淘书吧 18 - 新奥家电连锁网络系统 19 - 大学生求职就业网 20 - 华奥汽车销售集团网 21 - 科研成果申报管理系统
0
apache/camel-examples
Apache Camel Examples
camel integration java
null
0
nicolasgramlich/AndEngineExamples
AndEngine - Examples
null
null
0
healthnlp/examples
Health NLP Examples
null
null
0
oktadev/java-microservices-examples
Java Microservices: Spring Boot, Spring Cloud, JHipster, Spring Cloud Config, and Spring Cloud Gateway
java jhipster jhipster-microservices kubernetes microservices microservices-architecture netflix-zuul oauth2 reactive-microservices spring-boot spring-cloud spring-cloud-config spring-cloud-gateway
# Java Microservices with Spring Boot & Spring Cloud 🍃☁️ This repository contains examples of how to build a Java microservices architecture with Spring Boot, Spring Cloud, and Netflix Eureka. This repository has five examples in it: 1. A bare-bones microservices architecture with Spring Boot, Spring Cloud, Eureka Server, and Zuul. 2. A microservices architecture that's generated with JHipster and configured centrally with Spring Cloud Config. 3. A microservices architecture that uses Spring Cloud Gateway and Spring WebFlux to show reactive microservices. 4. A JHipster-generated reactive microservices architecture with Spring Cloud Gateway and Spring WebFlux. 5. A JHipster 7 + Kubernetes example that deploys to Google Cloud with sealed secrets. We think you'll enjoy them all! 1. See [Java Microservices with Spring Boot and Spring Cloud][blog-spring-boot-spring-cloud] for an overview of the first example. 2. Read [Java Microservices with Spring Cloud Config and JHipster][blog-spring-cloud-config] to learn about microservices with JHipster. 3. Refer to [Secure Reactive Microservices with Spring Cloud Gateway][blog-spring-cloud-gateway] to learn about Spring Cloud Gateway and reactive microservices. 4. Refer to [Reactive Java Microservices with Spring Boot and JHipster][blog-reactive-jhipster] to see how JHipster makes reactive microservices a breeze. 5. Peruse [Kubernetes to the Cloud with Spring Boot and JHipster][blog-k8s] to see how JHipster simplifies Kubernetes deployments. **Prerequisites:** [Java 11](https://sdkman.io/sdks#java) and an internet connection. * [Spring Boot + Spring Cloud Example](#spring-boot--spring-cloud-example) * [JHipster + Spring Cloud Config Example](#jhipster--spring-cloud-config-example) * [Spring Cloud Gateway Example](#spring-cloud-gateway-example) * [Reactive Microservices with JHipster Example](#reactive-microservices-with-jhipster-example) * [Kubernetes to the Cloud Example](#kubernetes--reactive-java-with-jhipster-example) * [Links](#links) * [Help](#help) * [License](#license) ## Spring Boot + Spring Cloud Example To install this example, run the following commands: ```bash git clone https://github.com/oktadev/java-microservices-examples.git cd java-microservices-examples/spring-boot+cloud ``` The `api-gateway` and `car-service` projects are already pre-configured to be locked down with OAuth 2.0 and Okta. That means if you try to run them, you won't be able to login until you create an account, and an application in it. ### Create a Web Application in Okta Log in to your Okta Developer account (or [sign up](https://developer.okta.com/signup/) if you don't have an account). 1. From the **Applications** page, choose **Add Application**. 2. On the Create New Application page, select **Web**. 3. Give your app a memorable name, add `http://localhost:8080/login/oauth2/code/okta` as a Login redirect URI, select **Refresh Token** (in addition to **Authorization Code**), and click **Done**. Copy the issuer (found under **API** > **Authorization Servers**), client ID, and client secret into the `application.properties` of the `api-gateway` and `car-service` projects. ```properties okta.oauth2.issuer=https://{yourOktaDomain}/oauth2/default okta.oauth2.client-id=$clientId okta.oauth2.client-secret=$clientSecret ``` Then, run all the projects with `./mvnw` in separate terminal windows. You should be able to navigate to `http://localhost:8761` and see the apps have been registered with Eureka. Then, navigate to `http://localhost:8080/cool-cars` in your browser, log in with Okta, and see the resulting JSON. ## JHipster + Spring Cloud Config Example To install this example, run the following commands: ```bash git clone https://github.com/oktadev/java-microservices-examples.git cd java-microservices-examples/jhipster ``` Create Docker containers for all gateway and microservice applications: ```bash mvn -Pprod verify com.google.cloud.tools:jib-maven-plugin:dockerBuild ``` ### Create a Web Application in Okta Log in to your Okta Developer account (or [sign up](https://developer.okta.com/signup/) if you don't have an account). 1. From the **Applications** page, choose **Add Application**. 2. On the Create New Application page, select **Web**. 3. Give your app a memorable name, add `http://localhost:8080/login/oauth2/code/okta` as a Login redirect URI, select **Refresh Token** (in addition to **Authorization Code**), and click **Done**. 4. To configure Logout to work in JHipster, **Edit** your app, add `http://localhost:8080` as a Logout redirect URI, then click **Save**. Rather than modifying each of your apps for Okta, you can use Spring Cloud Config in JHipster Registry to do it. Open `docker-compose/central-server-config/application.yml` and add your Okta settings. The client ID and secret are available on your app settings page. You can find the issuer under **API** > **Authorization Servers**. ```yaml spring: security: oauth2: client: provider: oidc: issuer-uri: https://{yourOktaDomain}/oauth2/default registration: oidc: client-id: {yourClientId} client-secret: {yourClientSecret} ``` The registry, gateway, blog, and store applications are all configured to read this configuration on startup. Start all your containers from the `docker-compose` directory: ```bash docker-compose up -d ``` Before you can log in to the registry, you'll need to add redirect URIs for JHipster Registry, ensure your user is in a `ROLE_ADMIN` group and that groups are included in the ID token. Log in to your Okta dashboard, edit your OIDC app, and add the following Login redirect URI: * `http://localhost:8761/login/oauth2/code/oidc` You'll also need to add a Logout redirect URI: * `http://localhost:8761` Then, click **Save**. ### Create Groups and Add Them as Claims to the ID Token JHipster is configured by default to work with two types of users: administrators and users. Keycloak is configured with users and groups automatically, but you need to do some one-time configuration for your Okta organization. Create a `ROLE_ADMIN` group (**Users** > **Groups** > **Add Group**) and add your user to it. Navigate to **API** > **Authorization Servers**, and click on the the `default` server. Click the **Claims** tab and **Add Claim**. Name it `groups`, and include it in the ID Token. Set the value type to `Groups` and set the filter to be a Regex of `.*`. Click **Create**. Now when you hit `http://localhost:8761` or `http://localhost:8080`, you should be able to log in with Okta! ## Spring Cloud Gateway Example To install this example, run the following commands: ```bash git clone https://github.com/oktadev/java-microservices-examples.git cd java-microservices-examples/spring-cloud-gateway ``` The `api-gateway` and `car-service` projects are already pre-configured to be locked down with OAuth 2.0 and Okta. That means if you try to run them, you won't be able to login until you create an account, and an application in it. If you already have an Okta account, see the **Create a Web Application in Okta** section below. Otherwise, we created a Maven plugin that configures a free Okta developer account + an OIDC app (in under a minute!). To use it, run `./mvnw com.okta:okta-maven-plugin:setup` to create an account and configure the gateway to work with Okta. Copy the `okta.*` properties from the gateway's `src/main/resources/application.properties` to the same file in the `car-service` project. Then, run all the projects with `./mvnw` in separate terminal windows. You should be able to navigate to `http://localhost:8761` and see the apps have been registered with Eureka. Then, navigate to `http://localhost:8080/cars` in your browser, log in with Okta, and see the resulting JSON. ### Create a Web Application in Okta Log in to your Okta Developer account (or [sign up](https://developer.okta.com/signup/) if you don't have an account). 1. From the **Applications** page, choose **Add Application**. 2. On the Create New Application page, select **Web**. 3. Give your app a memorable name, add `http://localhost:8080/login/oauth2/code/okta` as a Login redirect URI and click **Done**. Copy the issuer (found under **API** > **Authorization Servers**), client ID, and client secret into the `application.properties` of the `api-gateway` and `car-service` projects. ```properties okta.oauth2.issuer=https://{yourOktaDomain}/oauth2/default okta.oauth2.client-id=$clientId okta.oauth2.client-secret=$clientSecret ``` ## Reactive Microservices with JHipster Example To install this example, run the following commands: ```bash git clone https://github.com/oktadev/java-microservices-examples.git cd java-microservices-examples/reactive-jhipster ``` The JHipster Registry and Spring Cloud Config are pre-configured to use Okta. That means if you try to run them, you won't be able to login until you create an account, and an application in it. Install the Okta CLI using the instructions on [cli.okta.com](https://cli.okta.com) and come back here when you're done. If you don't have an Okta developer account, run `okta register`. **NOTE**: You can also use your browser and Okta's developer console to register an app. See [JHipster's security documentation](https://www.jhipster.tech/security/#okta) for those instructions. From the gateway project's directory, run `okta apps create jhipster`. Accept the default redirect URIs. This process does several things: 1. Registers an OIDC app in Okta with JHipster's configured redirect URIs. 2. Creates `ROLE_ADMIN` and `ROLE_USER` groups and adds your user to both. 3. Creates a `groups` claim and adds it to ID tokens. 4. Creates a `.okta.env` file with the values you'll need to talk to Okta. Spring Cloud Config allows you to distribute Spring's configuration between apps. Update `gateway/src/main/docker/central-server-config/localhost-config/application.yml` to use your Okta app settings. You can find the values for each property in the `.okta.env` file. ```yaml spring: security: oauth2: client: provider: oidc: issuer-uri: https://<your-okta-domain>/oauth2/default registration: oidc: client-id: <client-id> client-secret: <client-secret> ``` Save your changes. These values will be distributed to the JHipster Registry, gateway, blog, and store apps. Start all the services and apps using the following commands: ```shell cd gateway docker-compose -f src/main/docker/keycloak.yml up -d #jhkeycloakup docker-compose -f src/main/docker/postgresql.yml up -d #jhpostgresqlup docker-compose -f src/main/docker/jhipster-registery up -d #jhregistryup ./gradlew ``` Open a new terminal window, start the blog app's Neo4j database, and then the app itself. ```shell cd ../blog docker-compose -f src/main/docker/neo4j.yml up -d #jhneo4jup ./gradlew ``` Then, open another terminal window, start the store app's MongoDB database, and the microservice. ```shell cd ../store docker-compose -f src/main/docker/mongodb.yml up -d #jhmongoup ./gradlew ``` Now, open a new incognito browser window, go to `http://localhost:8080`, and sign in. Rejoice that using Okta for authentication works! **TIP**: You can also run everything using Docker Compose. See the [blog post](https://developer.okta.com/blog/2021/01/20/reactive-java-microservices#run-your-microservices-stack-with-docker-compose) for how to do that. ## Kubernetes + Reactive Java with JHipster Example To install this example, run the following commands: ```bash git clone https://github.com/oktadev/java-microservices-examples.git cd java-microservices-examples/jhipster-k8s/k8s ``` If you don't have JHipster installed, install it. ```shell npm i -g generator-jhipster@7 ``` Run JHipster's [Kubernetes sub-generator](https://www.jhipster.tech/kubernetes/). ```shell jhipster k8s ``` You will be prompted with several questions. The answers will be pre-populated from choices I made when creating this app. Answer as follows, changing the Docker repository name to yours, or leaving it blank if you don't have one. - Type of application: **Microservice application** - Root directory: **../** - Which applications? `<select all>` - Set up monitoring? **No** - Which applications with clustered databases? select **store** - Admin password for JHipster Registry: `<generate one>` - Kubernetes namespace: **demo** - Docker repository name: `<your docker hub username>` - Command to push Docker image: `docker push` - Enable Istio? **No** - Kubernetes service type? **LoadBalancer** - Use dynamic storage provisioning? **Yes** - Use a specific storage class? `<leave empty>` ### Install Minikube to Run Kubernetes Locally If you have Docker installed, you can run Kubernetes locally with Minikube. Run `minikube start` to begin. ```shell minikube --memory 8g --cpus 8 start ``` Build Docker images for each app. In the {`gateway`, `blog`, `store` } directories, run the following Gradle command (where `<image-name>` is `gateway`, `store`, or `blog`). ```shell ./gradlew bootJar -Pprod jib -Djib.to.image=<docker-repo-name>/<image-name> ``` > You can also build your images locally and publish them to your Docker daemon. This is the default if you didn't specify a base Docker repository name. > > ```shell > # this command exposes Docker images to minikube > eval $(minikube docker-env) > ./gradlew -Pprod bootJar jibDockerBuild > ``` > > Because this publishes your images locally to Docker, you'll need to make modifications to your Kubernetes deployment files to use `imagePullPolicy: IfNotPresent`. > > ```yaml > - name: gateway-app > image: gateway > imagePullPolicy: IfNotPresent > ``` > > Make sure to add this `imagePullPolicy` to the following files: > > - `k8s/gateway-k8s/gateway-deployment.yml` > - `k8s/blog-k8s/blog-deployment.yml` > - `k8s/store-k8s/store-deployment.yml` ### Register an OIDC App for Auth Install the Okta CLI using the instructions on [cli.okta.com](https://cli.okta.com) and come back here when you're done. If you don't have an Okta developer account, run `okta register`. **NOTE**: You can also use your browser and Okta's developer console to register an app. See [JHipster's security documentation](https://www.jhipster.tech/security/#okta) for those instructions. From the gateway project's directory, run `okta apps create jhipster`. Accept the default redirect URIs. This process does several things: 1. Registers an OIDC app in Okta with JHipster's configured redirect URIs. 2. Creates `ROLE_ADMIN` and `ROLE_USER` groups and adds your user to both. 3. Creates a `groups` claim and adds it to ID tokens. 4. Creates a `.okta.env` file with the values you'll need to talk to Okta. Update `k8s/registry-k8s/application-configmap.yml` to contain your OIDC settings from the `.okta.env` file the Okta CLI just created. The Spring Cloud Config server reads from this file and shares the values with the gateway and microservices. ```yaml data: application.yml: |- ... spring: security: oauth2: client: provider: oidc: issuer-uri: https://<your-okta-domain>/oauth2/default registration: oidc: client-id: <client-id> client-secret: <client-secret> ``` To configure the JHipster Registry to use OIDC for authentication, modify `k8s/registry-k8s/jhipster-registry.yml` to enable the `oauth2` profile. ```yaml - name: SPRING_PROFILES_ACTIVE value: prod,k8s,oauth2 ``` Then, in the `k8s` directory, start your engines! ```shell ./kubectl-apply.sh -f ``` You can see if everything starts up using the following command. ```shell kubectl get pods -n default ``` You can use the name of a pod with `kubectl logs` to tail its logs. ```shell kubectl logs <pod-name> --tail=-1 -n default ``` You can use port-forwarding to see the JHipster Registry. ```shell kubectl port-forward svc/jhipster-registry -n default 8761 ``` Open a browser and navigate to `http://localhost:8761`. You'll need to sign in with your Okta credentials. Once all is green, use port-forwarding to see the gateway app. ```shell kubectl port-forward svc/gateway -n default 8080 ``` Then, go to `http://localhost:8080`, and you should be able to add blogs, posts, tags, and products. Please read the [Kubernetes to the Cloud with Spring Boot and JHipster][blog-k8s] for more information. ## Links These examples use the following open source libraries: * [Okta Spring Boot Starter](https://github.com/okta/okta-spring-boot) * [Spring Boot](https://spring.io/projects/spring-boot) * [Spring Cloud](https://spring.io/projects/spring-cloud) * [Spring Cloud Gateway](https://spring.io/projects/spring-cloud-gateway) * [Spring Security](https://spring.io/projects/spring-security) * [JHipster](https://www.jhipster.tech) * [OpenJDK](https://openjdk.java.net/) * [K9s](https://k9scli.io/) ## Help Please post any questions as comments on the example's blog post, or on the [Okta Developer Forums](https://devforum.okta.com/). ## License Apache 2.0, see [LICENSE](LICENSE). [blog-spring-boot-spring-cloud]: https://developer.okta.com/blog/2019/05/22/java-microservices-spring-boot-spring-cloud [blog-spring-cloud-config]: https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config [blog-spring-cloud-gateway]: https://developer.okta.com/blog/2019/08/28/reactive-microservices-spring-cloud-gateway [blog-reactive-jhipster]: https://developer.okta.com/blog/2021/01/20/reactive-java-microservices [blog-k8s]: https://developer.okta.com/blog/2021/06/01/kubernetes-spring-boot-jhipster
0
osate/examples
Examples and case-study that use OSATE
null
null
0
pkainulainen/Examples
A repository for the code examples of my blog
null
null
0
attacomsian/code-examples
Example projects for my personal blog.
java javascript mongodb mongoose nodejs nodejs-tutorials rest-api spring-boot spring-boot-tutorial spring-data-jpa thymeleaf
# Example Projects Example projects for https://attacomsian.com/blog/ website. All codes are released under [MIT](https://github.com/attacomsian/code-examples/blob/master/LICENSE) license unless otherwise specified.
1
pkainulainen/spring-mvc-test-examples
null
null
# Test With Spring Course If you are struggling to write good automated tests for Spring web applications, you are not alone! [I have launched a video course](https://www.testwithspring.com/?utm_source=github&utm_medium=social&utm_content=spring-mvc-test&utm_campaign=test-with-spring-course-presales) that describes how you can write automated tests which embrace change and help you to save your time (and nerves). # Spring MVC Test Tutorial This repository contains the example applications of my [Spring MVC Test tutorial](http://www.petrikainulainen.net/spring-mvc-test-tutorial/).
0
structurizr/examples
Structurizr examples
null
# Examples This repo contains some Structurizr examples in the following formats: - [Structurizr DSL](https://github.com/structurizr/examples/tree/main/dsl) - [Structurizr for Java](https://github.com/structurizr/examples/tree/main/java) There are also some examples of how to use Structurizr for enterprise-wide modelling: - [Example 1: Enterprise modelling with the Structurizr DSL, with on-premises installation](https://github.com/structurizr/examples/tree/main/enterprise#example-1) - [Example 2: Enterprise modelling with the Structurizr DSL, without on-premises installation](https://github.com/structurizr/examples/tree/main/enterprise#example-2) - [Example 3: Backstage as a system catalog + system modelling with the Structurizr DSL](https://github.com/structurizr/examples/tree/main/enterprise#example-3) - [Example 4: Import Backstage to Structurizr](https://github.com/structurizr/examples/tree/main/enterprise#example-4)
0
fyhertz/libstreaming-examples
Some examples of how to use libstreaming
null
# Some examples of how to use libstreaming This repository contains three simple examples of how to use libstreaming. ### Libstreaming ? You can find out more about libstreaming [here](https://github.com/fyhertz/libstreaming). ### Example 1 Shows how to use the RTSP server. ### Example 2 Shows how to start a stream and obtain a SDP that you will then want to hand to the receiver. ### Example 3 **This example shows how you can use libstreaming with a Wowza Media Server.** [Read this tutorial to find out of to use it](https://github.com/fyhertz/libstreaming/wiki/Using-libstreaming-with-Wowza-Media-Server) ### Build instructions 1. Clone the repository 2. libstreaming is referenced as git submodule in this repo, so you will need to run the two following commands: ```sh git submodule init git submodule update ``` 3. Run the **android project update** command in the libstreaming directory and in the directory of the example you wish to compile: ```sh cd libstreaming android update project --path . --target android-21 cd ../example3/app android update project --path . --target android-21 ``` 4. Run ant ```sh ant debug ``` **Note: you will need to run 'ant clean' before compiling another example!**
0
mjpt777/examples
Code Examples
null
examples ======== Code Examples
0
aws-samples/aws-dynamodb-examples
DynamoDB Examples
null
# Various Examples and AWS SDK code examples for Amazon DynamoDB An Amazon Web Services and DynamoDB community-led repository containing code and examples for developing with and using [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.html). We have [IAM policies for DynamoDB](https://github.com/aws-samples/aws-dynamodb-examples/tree/master/DynamoDBIAMPolicies), [a script to load an existing table](https://github.com/aws-samples/aws-dynamodb-examples/tree/master/nosqlworkbenchscript) into NoSQL Workbench, [CloudFormation examples](https://github.com/aws-samples/aws-dynamodb-examples/tree/master/cloudformation), and [a CDK to track table size and item count histories to CloudWatch](https://github.com/aws-samples/aws-dynamodb-examples/tree/master/DynamoDBCustomMetrics). We also have AWS SDK [code examples for DynamoDB in various languages](https://github.com/aws-samples/aws-dynamodb-examples/tree/master/DynamoDB-SDK-Examples). You can find each language examples here: * [Node.js](./DynamoDB-SDK-Examples/node.js) * [Java](./DynamoDB-SDK-Examples/java) * [Python](./DynamoDB-SDK-Examples/python) * [.Net](./DynamoDB-SDK-Examples/dotnet) * [Golang](./DynamoDB-SDK-Examples/golang) * [Rust](./DynamoDB-SDK-Examples/rust) * [Ruby](./DynamoDB-SDK-Examples/ruby) PS. If you are up for contributing, we welcome community pull requests. All code in this repository is provided as is, where is. There are no guarantees, either expressed or implied. It is up to you to check what they do and utilize the code responsibly. Special thanks to other contributors to this repo before it was moved over to this current location. Here are their GitHub users: * @jprivillaso * @tywalch * @normj * @jasonwadsworth * @johanrin * @DejanBelic * @TLaue
0
assertj/assertj-examples
Examples illustrating AssertJ assertions
assertj assertj-assertions java
## AssertJ examples AssertJ examples is divided in two : assertions-examples (core, guava and joda assertions) and AssertJ swing modules. The **main** branch contains examples with the latest released version of AssertJ modules (for Java 8). There are several branches that contain examples for the ongoing development versions of AssertJ modules. That means you have to build the according AssertJ modules by your own before new features compile. The following table contains these special branches that are merged into the main each time the module is released. | Branch | Modules | | ----------------------------- | ------------------------------------------ | | with-latest-snapshot-versions | Core 3.x for Java 8 | | with-latest-swing-snapshot | Swing | ### AssertJ assertions examples **assertj-examples/assertions-examples** contains executable AssertJ assertions examples that you can run as JUnit tests. Please have a look at **[assertions examples sources](assertions-examples/src/test/java/org/assertj/examples)**. The **main** branch contains examples with the latest released version of AssertJ modules for Java 8, similarly the **java-7** branch contains examples of AssertJ modules for Java 7. You should be able to build those two branches with `mvn clean install` command. In your IDE, add `src/test/generated-assertions` to the project java test sources otherwise you will have errors/missing classes. This is the folder where custom assertions classes are generated by default by the maven assertions generator plugin. Note that Intellij Idea wrongly adds `src/test/generated-assertions` to the production sources when it should be added the **test sources**, you will have to fix that in your module/project settings. Building **with-latest-snapshot-versions** is a little more complicated : - you need to build the needed SNAPSHOT dependencies before - most probably assertj-core and maybe other modules. - run `mvn clean install` in `assertj-examples/assertions-examples`. - In your IDE, add `src/test/generated-assertions` to the project java sources if you IDE shows errors/missing classes. ### AssertJ-Swing examples The **main** branch contains examples with the latest released version of AssertJ modules => you should be able to build it with mvn clean install command. **assertj-swing-aut** contains the AUT (application under test) that is tested by the examples. **assertj-swing-junit-examples** contains executable AssertJ-Swing examples that you can inspect and run as JUnit tests. Please have a look at **[swing-junit-examples sources](assertj-swing-junit-examples/src/test/java/org/assertj/swing/junit/examples)**. **assertj-swing-testng-examples** contains executable AssertJ-Swing examples that you can inspect and run as TestNG tests. Please have a look at **[swing-testng-examples sources](assertj-swing-testng-examples/src/test/java/org/assertj/swing/testng/examples)**. ## Contributing Contributing is easy, only two rules to follow : * Checkout the snapshot branch corresponding to your examples, it should be `with-latest-snapshot-versions` most of the time (not main!) * Use **[AssertJ code Eclipse formatting preferences](https://github.com/joel-costigliola/assertj-core/blob/main/src/ide-support/assertj-eclipse-formatter.xml)** (for Idea users, it is possible to import it) * Add FUN examples ! ;-) Thanks !
0
holdenk/learning-spark-examples
Examples for learning spark
null
[![buildstatus](https://travis-ci.org/holdenk/learning-spark-examples.svg?branch=master)](https://travis-ci.org/holdenk/learning-spark-examples) Examples for Learning Spark =============== Examples for the Learning Spark book. These examples require a number of libraries and as such have long build files. We have also added a stand alone example with minimal dependencies and a small build file in the mini-complete-example directory. These examples have been updated to run against Spark 1.3 so they may be slightly different than the versions in your copy of "Learning Spark". Requirements == * JDK 1.7 or higher * Scala 2.10.3 - scala-lang.org * Spark 1.3 * Protobuf compiler - On debian you can install with sudo apt-get install protobuf-compiler * R & the CRAN package Imap are required for the ChapterSixExample * The Python examples require urllib3 Python examples === From spark just run ./bin/pyspark ./src/python/[example] Spark Submit === You can also create an assembly jar with all of the dependencies for running either the java or scala versions of the code and run the job with the spark-submit script `./sbt/sbt assembly` OR `mvn package` `cd $SPARK_HOME; ./bin/spark-submit --class com.oreilly.learningsparkexamples.[lang].[example] ../learning-spark-examples/target/scala-2.10/learning-spark-examples-assembly-0.0.1.jar` [![Learning Spark](http://akamaicovers.oreilly.com/images/0636920028512/cat.gif)](http://www.jdoqocy.com/click-7645222-11260198?url=http%3A%2F%2Fshop.oreilly.com%2Fproduct%2F0636920028512.do%3Fcmp%3Daf-strata-books-videos-product_cj_9781449358600_%2525zp&cjsku=0636920028512)
0
flowable/flowable-examples
Repository with example Flowable projects
null
null
1
amehlhase316/ser321examples
null
null
# ser321examples All examples in this repository are for you to play with and to learn about the different concepts in this class. This repo is still a "living" thing. As we progress we might add more examples or make changes. You can use these samples to develop your solutions but you need to reference things if you copy parts of the repo into your solution and it is NOT ok to use any of the examples here and submit them as your own. Each assignment that you submit has to have a significant own contribution to show you understand the concepts and can develop a solution on your own. ## Advise It is advised that you fork this repository so that you have your own version and can also make changes to your own repo to test different scenarios. Then clone that repo to your main machine and your second machine. If we make changes to the repository we will notify you in the Slack #example_repo channel. See here about forking and keeping your version up to date <https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo?> ## Development All examples are developed by the teaching team: Many examples are used and adapted from Dr. Lindquist and Dr. Gary. Others were developed by Dr. Mehlhase, David Clements and Aman Kaushik. ## Running the examples The examples should all have Gradle files. The separate folders have a Gradle project but the "inner" folders also have separate Gradle files. Please check the comments and files so you know how to run the examples. ## Suggestions If you find any issues or have suggestions on how to improve the repo, the Gradle files etc. feel free to let us know. We are happy to accept Pull Requests if you think you come up with something good. ## Have fun Feel free to play with these examples, the better you understand these small examples the easier your coding assignments will be. Best Dr. Mehlhase
0
SonarSource/sonar-custom-rules-examples
Shows how to bootstrap a project to write custom rules for PHP, Python, Cobol, RPG
language-team
Sonar Custom Rules Examples [![Build Status](https://travis-ci.org/SonarSource/sonar-custom-rules-examples.svg?branch=master)](https://travis-ci.org/SonarSource/sonar-custom-rules-examples) ========== This repository contains project examples you can directly clone to bootstrap your own project to write custom rules for COBOL, PHP, Python, and RPG. Related documentation is there: https://docs.sonarqube.org/latest/extend/adding-coding-rules/ Sonar's [Clean Code solutions](https://www.sonarsource.com/solutions/clean-code/?utm_medium=referral&utm_source=github&utm_campaign=clean-code&utm_content=sonar-custom-rules-examples) help developers deliver high-quality, efficient code standards that benefit the entire team or organization. Have questions or feedback? --------------------------- Note that GitHub issues have been disabled. To provide feedback or ask for help, please use the [Sonar Community Forum](https://community.sonarsource.com/). ### License Copyright 2016-2022 SonarSource. Licensed under the [GNU Lesser General Public License, Version 3.0](http://www.gnu.org/licenses/lgpl.txt)
0
j256/ormlite-examples
Various example programs
null
null
1
Vedenin/useful-java-links
A list of useful Java frameworks, libraries, software and hello worlds examples
awesome awesome-list java-api java-applications java-frameworks java-libraries java-links lists machine-learning resources
null
0
apache/incubator-kie-kogito-examples
Kogito examples - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
bpm bpmn cloud-native cmmn dmn hacktoberfest java knative kogito quarkus rules-engine serverless-workflow spring-boot workflow workflow-engine
# Kogito Examples This module contains a number of examples that you can take a look at and try out yourself. Please take a look at the readme of each individual example for more details on how the example works and how to run it yourself (either locally or on Kubernetes). Since Kogito aims at supporting both Quarkus and Spring Boot each example usually provides both type of projects. - Default branch is `stable`, pointing to the latest released version. - **[You can also check all versions by looking at releases.](https://github.com/kiegroup/kogito-examples/releases/latest)** ## Use alternative Quarkus platforms The Quarkus quickstarts by default currently use the Quarkus core BOM. If you want to use an alternative BOM when building the Quarkus quickstarts you can override the `quarkus.platform.*` properties. The following example shows how to set `quarkus.platform.artifact-id` to use the quarkus-universe-bom. ``` mvn -Dquarkus.platform.artifact-id=quarkus-universe-bom clean install ``` Because the Kogito project is part of the Quarkus Platform, the same applies also to Kogito BOM being used. By default `org.kie.kogito:kogito-bom` is used, but, when needed, this can be overridden using Maven properties: * `kogito.bom.*` for Kogito BOM overrides The properties defined in each of the modules and can be overridden as follows: * Kogito BOM ``` mvn -Dkogito.bom.group-id=io.quarkus.platform -Dkogito.bom.artifact-id=quarkus-kogito-bom -Dkogito.bom.version=2.2.3.Final ``` > Note: It's important to keep BOM versions aligned when overriding. In case of Quarkus Platform this means using a single > version value for all two (`quarkus.platform.version`, `kogito.bom.version`) properties. ## Contribution Everyone is encouraged to contribute to these examples by * trying it out and providing feedback and ideas for improvement * create new examples -- **in this case, make sure your PR is against the `main` branch!** * blogging about it * using it on conferences and workshops ## Process hello world with scripts shows most basic use of processes to build up a hello world example * [on Quarkus](kogito-quarkus-examples/process-scripts-quarkus) * [on Spring Boot](kogito-springboot-examples/process-scripts-springboot) ## Process with business rules shows integration between processes and rules. * [on Quarkus](kogito-quarkus-examples/process-business-rules-quarkus) * [on Spring Boot](kogito-springboot-examples/process-business-rules-springboot) ## Process with Kafka shows how message start and end events can be easily used to integrate with Apache Kafka to consume where message name is the Kafka topic and the payload is mapped to process variable. Uses custom types that are serialized into JSON. * [on Quarkus](kogito-quarkus-examples/process-kafka-quickstart-quarkus) * [on Spring Boot](kogito-springboot-examples/process-kafka-quickstart-springboot) ## Process with Infinispan persistence shows long running processes with Infinispan persistence so the state of process instances can be preserved across service restarts. * [on Quarkus](kogito-quarkus-examples/process-infinispan-persistence-quarkus) * [on Spring Boot](kogito-springboot-examples/process-infinispan-persistence-springboot) ## Process with service invocation shows how easy it is to use local services to be invoked from within process. Allows easy and readable service invocation use cases to be covered. * [on Quarkus](kogito-quarkus-examples/process-service-calls-quarkus) * [on Spring Boot](kogito-springboot-examples/process-service-calls-springboot) ## Process with REST call shows REST service invocation and parsing data back to an object instance used as process variable. * [on Quarkus](kogito-quarkus-examples/process-rest-service-call-quarkus) * [on Spring Boot](kogito-springboot-examples/process-rest-service-call-springboot) ## Process with user tasks shows user task interactions with four eye principle applied * [on Quarkus](kogito-quarkus-examples/process-usertasks-quarkus) * [on Spring Boot](kogito-springboot-examples/process-usertasks-springboot) ## Process with user tasks based on custom life cycle shows user task interactions with four eye principle applied that supports custom life cycle that allows to add additional phases to user tasks to indicate other states. * [on Quarkus](kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus) * [on Spring Boot](kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot) ## Process with user tasks with security on REST api shows user task interactions with four eye principle applied with security restrictions on REST api. * [on Quarkus](kogito-quarkus-examples/process-usertasks-with-security-quarkus) * [on Spring Boot](kogito-springboot-examples/process-usertasks-with-security-springboot) ## Process with timers shows timers (intermediate and boundary) that allows to introduce delays in process execution * [on Quarkus](kogito-quarkus-examples/process-timer-quarkus) * [on Spring Boot](kogito-springboot-examples/process-timer-springboot) ## Serverless Workflow Getting Started A Serverless Workflow greeting service with both JSON and YAML workflow definitions * [on Quarkus](serverless-workflow-examples/serverless-workflow-greeting-quarkus) ## Serverless Workflow with events A Serverless Workflow service for processing job applicant approvals and that showcases event-driven services. * [on Quarkus](serverless-workflow-examples/serverless-workflow-events-quarkus) ## Serverless Workflow with service calls A Serverless Workflow service for returning country information * [on Quarkus](serverless-workflow-examples/serverless-workflow-service-calls-quarkus) ## Serverless Workflow GitHub showcase A Serverless Workflow service that works as a Github bot application, which reacts upon a new PR being opened in a given GitHub project. * [on Quarkus](serverless-workflow-examples/serverless-workflow-github-showcase) ## Other Misc Examples - Onboarding example combining 1 process and two decision services: see [README.md](kogito-quarkus-examples/onboarding-example/README.md) - Rules on Quarkus: see [README.md](kogito-quarkus-examples/rules-quarkus-helloworld/README.md) - Rules on Quarkus with Unit: see [README.md](kogito-quarkus-examples/ruleunit-quarkus-example/README.md) - Process on Quarkus: see [README.md](kogito-quarkus-examples/process-quarkus-example/README.md) - Process on Spring Boot: see [README.md](kogito-springboot-examples/process-springboot-example/README.md) - Trusty on Quarkus: see [README.md](kogito-quarkus-examples/trusty-demonstration/README.md) - Trusty on Quarkus (DevUI integration): see [README.md](kogito-quarkus-examples/trusty-tracing-devservices/README.md) ## Trying the examples with the Kogito Operator Most examples have a directory named `operator` including the YAML files to deploy it using the Kogito Operator in an OpenShift cluster. Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) of how to install the operator to your environment in order to try it there. ## Getting Help ### Issues - Do you have a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) for your issue? - If so, please open a Jira for it in the [Kogito project](https://issues.redhat.com/projects/KOGITO/summary) with the details of your issue and example. - Are you encountering an issue but unsure of what is going on? - Start a new conversation in the Kogito [Google Group](https://groups.google.com/g/kogito-development), or open a new thread in the [Kogito stream](https://kie.zulipchat.com/#narrow/stream/232676-kogito) of the KIE Zulip chat. - Please provide as much relevant information as you can as to what could be causing the issue, and our developers will help you figure out what's going wrong. ### Requests - Do you have a feature/enhancement request? - Please open a new thread in the [Kogito stream](https://kie.zulipchat.com/#narrow/stream/232676-kogito) of the KIE Zulip chat to start a discussion there.
0
kaiwaehner/kafka-streams-machine-learning-examples
This project contains examples which demonstrate how to deploy analytic models to mission-critical, scalable production environments leveraging Apache Kafka and its Streams API. Models are built with Python, H2O, TensorFlow, Keras, DeepLearning4 and other technologies.
deep-learning deeplearning4j dl4j h2o h2oai java kafka kafka-client kafka-streams keras keras-tensorflow ksql machine-learning open-source python tensorflow
null
0
pkainulainen/spring-batch-examples
null
null
# Test With Spring Course If you are struggling to write good automated tests for Spring web applications, you are not alone! [I have launched a video course](https://www.testwithspring.com/?utm_source=github&utm_medium=social&utm_content=spring-batch&utm_campaign=test-with-spring-course-presales) that describes how you can write automated tests which embrace change and help you to save your time (and nerves). # Spring Batch Tutorial This repository contains the example ammplications of my Spring Batch tutorial. This repository contains two examples that are described in the following: * The _spring_ directory contains an example application that uses Spring Framework. * The _spring-boot_ directory contains an example application that uses Spring Boot.
0
pajikos/java-examples
For more info, check my blog:
null
# Java examples Working project examples
0
arquillian/arquillian-examples
This repository hosts the example projects that are covered in the Arquillian Guides as well as several additional examples.
null
# Arquillian Examples This repository hosts the example projects that are covered in the [Arquillian Guides](http://arquillian.org/guides/). These projects can be identified by the word "tutorial" in the name. There are several additional examples that demonstrate other functionality in Arquillian. All the projects in this repository are self-contained (they do not use parent projects). To see an even more comprehensive set of example tests, browse the [Arquillian Showcase](https://github.com/arquillian/arquillian-showcase) repository. ## What is Arquillian? Arquillian is an innovative and highly extensible testing platform for the JVM that enables developers to easily create automated integration, functional and acceptance tests for Java middleware. Find at more at http://arquillian.org ## Project Index Below is an index of the projects in this repository paired with a brief description. ### [arquillian-tutorial](https://github.com/arquillian/arquillian-examples/tree/master/arquillian-tutorial) This project is a starting point for using Arquillian. It has a simple CDI test case that runs against Weld EE Embedded (default), Embedded GlassFish 3.1 (default) and Managed JBoss AS 7.1. ### [arquillian-tutorial-rinse-repeat](https://github.com/arquillian/arquillian-examples/tree/master/arquillian-tutorial-rinse-repeat) This project is a follow-up to the arquillian-tutorial project. It demonstrates the integration of CDI and EJB with a test case that runs against GlassFish Embedded 3.1 (default), Remote JBoss AS 7.1, Remote GlassFish 3.1 and Managed JBoss AS 7.1. ### [arquillian-persistence-tutorial](https://github.com/arquillian/arquillian-examples/tree/master/arquillian-persistence-tutorial) This project contains a JPA 2 integration test that runs against Embedded GlassFish 3.1 (default), Remote GlassFish 3.1, Managed JBoss AS 7.1 and Remote JBoss AS 7.1. ### [arquillian-drone-tutorial](https://github.com/arquillian/arquillian-examples/tree/master/arquillian-drone-tutorial) This project demonstrates the use of Arquillian Drone to drive a Selenium test. It runs against Embedded GlassFish 3.1 (default), Managed JBoss AS 7.1 and Remote JBoss AS 7.1. ### ejb31-gfembedded This project contains EJB3.1 integration test and runs against Glassfish Embedded 3 container. The projects target is to provide simplest possible setup for this test combination. ### ejb31-jbembedded This project contains EJB3.1 integration test and runs against JBoss AS 6 Embedded container. The projects target is to provide simplest possible setup for this test combination. ### ejb3-openejb This project contains EJB3 integration test and runs against Apache OpenEJB 3.1 Embedded container. The projects target is to provide simplest possible setup for this test combination. ### quickstart This is a simple startup project with contains both tests for POJO and EJB running against a variety of containers. ### jpalab This project is a JPA 1.x lab that experiments with functionality and boundaries of transaction-scoped and extended persistence contexts. It can be run on the OpenEJB 3.1 Embedded container with either OpenJPA, Hibernate or EclipseLink as the JPA provider. ### jsfunit-servlet This project demonstrates how to use JSFUnit with a Servlet container. ### xa This project demonstrates the use of XA DataSources that enlist in a distributed transaction within an Arquillian test.
1
apache/camel-spring-boot-examples
Apache Camel Spring Boot Examples
camel integration java spring-boot
null
0
pkainulainen/spring-social-examples
null
null
# Test With Spring Course If you are struggling to write good automated tests for Spring web applications, you are not alone! [I have launched a video course](https://www.testwithspring.com/?utm_source=github&utm_medium=social&utm_content=spring-social&utm_campaign=test-with-spring-course-presales) that describes how you can write automated tests which embrace change and help you to save your time (and nerves). # Spring Social Tutorial This repository contains the example applications of my [Spring Social tutorial](http://www.petrikainulainen.net/spring-social-tutorial/).
0
FabricMC/fabric-example-mod
Example Fabric mod
fabric
# Fabric Example Mod ## Setup For setup instructions please see the [fabric wiki page](https://fabricmc.net/wiki/tutorial:setup) that relates to the IDE that you are using. ## License This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.
1
spring-framework-guru/sfg-blog-posts
Source code examples for blog posts
java spring springframework
[![CircleCI](https://circleci.com/gh/spring-framework-guru/sfg-blog-posts.svg?style=svg)](https://circleci.com/gh/spring-framework-guru/sfg-blog-posts) # SFG Blog Posts This repository contains source code examples from various blog posts from [Spring Framework Guru](https://springframework.guru) Are you interested in writing for Spring Framework Guru? Checkout the [wiki](https://github.com/spring-framework-guru/sfg-blog-posts/wiki) for how to get started! The blog posts for the examples in this repo are: - [Service Locator Pattern in Spring](https://springframework.guru/service-locator-pattern-in-spring/) - [Using GraphQL in a Spring Boot Application](https://springframework.guru/using-graphql-in-a-spring-boot-application/) - [Spring JdbcTemplate CRUD Operations](https://springframework.guru/spring-jdbctemplate-crud-operations/) - [Using Spring Aware Interfaces](https://springframework.guru/using-spring-aware-interfaces/) - [Working with Resources in Spring](https://springframework.guru/working-with-resources-in-spring/) - [Using RestTemplate in Spring](https://springframework.guru/using-resttemplate-in-spring/) - [Using RestTemplate with Apaches HttpClient](https://springframework.guru/using-resttemplate-with-apaches-httpclient/) - [How to Configure Multiple Data Sources in a Spring Boot Application](https://springframework.guru/how-to-configure-multiple-data-sources-in-a-spring-boot-application/) - [Why you should be using Spring Boot Docker Layers](https://springframework.guru/why-you-should-be-using-spring-boot-docker-layers/) - [Autowiring In Spring](https://springframework.guru/autowiring-in-spring/) - [Spring Bean Definition Inheritance](https://springframework.guru/spring-bean-definition-inheritance/) - [Best Practices for Dependency Injection with Spring](https://springframework.guru/best-practices-for-dependency-injection-with-spring/) - [Using Project Lombok with Gradle](https://springframework.guru/using-project-lombok-with-gradle/) - [Spring JdbcTemplate CRUD Operations](https://springframework.guru/spring-jdbctemplate-crud-operations/) - [How to Configure Multiple Data Sources in a Spring Boot Application](https://springframework.guru/how-to-configure-multiple-data-sources-in-a-spring-boot-application/) - [Working with Resources in Spring](https://springframework.guru/working-with-resources-in-spring/) - [Spring Bean Scopes](https://springframework.guru/spring-bean-scopes/) - [Using Ehcache 3 in Spring Boot](https://springframework.guru/using-ehcache-3-in-spring-boot/) - [Spring Profiles](https://springframework.guru/spring-profiles/) - [Using Spring Aware Interfaces](https://springframework.guru/using-spring-aware-interfaces/) - [Spring Bean Lifecycle](https://springframework.guru/spring-bean-lifecycle/) - [Spring Boot with Lombok: Part 1](https://springframework.guru/spring-boot-with-lombok-part-1/) - [Consul Miniseries: Spring Boot Application and Consul Integration Part 1](https://springframework.guru/consul-miniseries-spring-boot-application-and-consul-integration-part-1/) - [Consul Miniseries: Spring Boot Application and Consul Integration Part 2](https://springframework.guru/consul-miniseries-spring-boot-application-and-consul-integration-part-2/) - [Consul Miniseries: Spring Boot Application and Consul Integration Part 3](https://springframework.guru/consul-miniseries-spring-boot-application-and-consul-integration-part-3/) - [Debug your Code in IntelliJ IDEA](https://springframework.guru/debug-your-code-in-intellij-idea/) - [Java 14 records](https://springframework.guru/java-14-records/) - [Run Spring Boot on Docker](https://springframework.guru/run-spring-boot-on-docker/) - [Manage Docker Containers with Docker Compose](https://springframework.guru/manage-docker-containers-with-docker-compose/) - [Feign REST Client for Spring Application](https://springframework.guru/feign-rest-client-for-spring-application/) - [Using MapStruct with Project Lombok](https://springframework.guru/using-mapstruct-with-project-lombok/) - [Writing Parametrized Tests]() - [Spring REST Docs]() - [Calling Stored Procedure from Spring Data JPA Repository]() - [Spring Boot Pagination]() - [Convert OffsetDateTime to SQLTimeStamp]() - [Error Handling in Spring REST]() - [Spring State Machine]() - [Java Bean Validation]() - [Stored Procedures with Spring Boot]() - [BeanFactory vs ApplicationContext]() - [Multi Module Spring Boot Project]() - [One to One Association]() - [One to Many Association]() - [Actuator in Spring Boot]() - [Spring Boot CLI]() - [Spring Boot Internationalization]() - [Spring Retry]() - [EnumSet in Java]() - [Scheduling in Spring Boot]() - [Spring Boot Kafka]() - [Bootstrapping Data in Spring Boot]() - [Using Eureka Service Registry]()
0
asciidoctor/asciidoctor-maven-examples
A collection of example projects that demonstrates how to use the Asciidoctor Maven plugin.
null
null
1
bintray/bintray-examples
Examples of resolving and deploying to Bintray.com
null
bintray-examples ================ Examples of resolving and deploying to Bintray.com For comments, issues and questions please use the feeback form on Bintray.com
0
spring-projects/spring-hateoas-examples
Collection of examples on how (and why) to build hypermedia-driven apps with Spring HATEOAS
hateoas rest spring
null
0
GoogleCloudPlatform/cloud-bigtable-examples
Examples of how to use Cloud Bigtable both with GCE map/reduce as well as stand alone applications.
samples
# Google Cloud Bigtable examples [![Travis CI status][travis-shield]][travis-link] [![Stack Overflow][stackoverflow-shield]][stackoverflow-link] Bigger than a data warehouse, fast enough for real-time access, and less expensive than running virtual machines. The world-renowned database that powers Google is now available to you worldwide. ## Overview [Google Cloud Bigtable](https://cloud.google.com/bigtable/) offers you a fast, fully managed, almost infinitely scalable NoSQL database service that's ideal for web, mobile, and IoT applications requiring terabytes to petabytes of data. Unlike comparable market offerings, Cloud Bigtable doesn't require you to sacrifice speed, scale, or cost efficiency when your applications grow. The Bigtable service that Cloud Bigtable relies upon has been battle-tested at Google for more than 10 years—it's the database driving major applications such as Search, Analytics, Maps and Gmail. ## Quickstart [Quickstart/HBase](quickstart) - Create a Cloud Bigtable Cluster and the hbase shell from within a docker container on your local machine ## Java * [Hello World](java/hello-world) - This sample has been migrated to: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/bigtable/hbase/snippets/src/main/java/com/example/bigtable/HelloWorld.java * [Import HBase Sequence files](java/dataflow-import-examples) Import HBase sequence files directly to Cloud Bigtable using Dataflow. * [Dataproc Wordcount using Map/Reduce](java/dataproc-wordcount) - How to load data to Cloud Bigtable using Dataproc on GCE * [GAE J8 Std-Hello World](https://github.com/googlecloudplatform/java-docs-samples/tree/master/appengine-java8/bigtable) - Accessing Cloud Bigtable from App Engine standard ## Dataflow * [Connector-Examples](java/dataflow-connector-examples) - Using the cloud dataflow connector for Bigtable, do write Hello World to two rows, Use Cloud Pub / Sub to count Shakespeare, count the number of rows in a Table, and copy records from BigQuery to BigTable. * [Pardo-HelloWorld](java/dataflow-pardo-helloworld) - example of using Cloud Dataflow without the connector. ## Go * [cbt](https://github.com/GoogleCloudPlatform/gcloud-golang/tree/master/bigtable/cmd/cbt) [doc](https://godoc.org/google.golang.org/cloud/bigtable/cmd/cbt) Basic command line interactions with Cloud Bigtable - A really great place to start learning the Go Client. * [helloworld](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigtable/helloworld) - Basic Hello world example application demonstrating how to read and write to a Cloud Bigtable instance. * [usercounter](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigtable/usercounter) - Accessing Cloud Bigtable from App Engine Flexible * [search](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigtable/search) - Create and search a Cloud Bigtable. ## Python * [Hello World](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/bigtable/hello) A minimal application that demonstrates using the Googe Cloud Client libraries to create a temporary table, write some rows, read them back and clean up. * [Hello World (Happybase)](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/bigtable/hello_happybase) A minimal application that demonstrates using the Happybase API create a temporary table, write some rows, read them back and clean up. ## Questions and discussions If you have questions or run into issues with Google Cloud Bigtable or the client libraries, you can use any of the following forums: * Stack Overflow: tag questions with [`google-cloud-bigtable`][stackoverflow-link] * Mailing list: [google-cloud-bigtable-discuss@][google-cloud-bigtable-discuss] You can also subscribe to [google-cloud-bigtable-announce@][google-cloud-bigtable-announce] list to receive infrequent product and client library announcements. ## Contributing changes See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to contribute to this project. ## More examples More Google Cloud Bigtable examples are available in the following languages: * [Java](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/bigtable) * [Python](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/bigtable) * [Node](https://github.com/googleapis/nodejs-bigtable/tree/master/samples) * [Go](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigtable) * [Dotnet](https://github.com/GoogleCloudPlatform/dotnet-docs-samples/tree/master/bigtable/api) * [C++](https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/bigtable/examples) * [Ruby](https://github.com/GoogleCloudPlatform/ruby-docs-samples/tree/master/bigtable) * [PHP](https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/bigtable) ## License Apache 2.0; see [LICENSE](LICENSE) for details. <!-- references --> [travis-shield]: https://travis-ci.org/GoogleCloudPlatform/cloud-bigtable-examples.svg [travis-link]: https://travis-ci.org/GoogleCloudPlatform/cloud-bigtable-examples/builds [stackoverflow-shield]: https://img.shields.io/badge/stackoverflow-google--cloud--bigtable-blue.svg [nodejs-bigtable]: https://github.com/googleapis/nodejs-bigtable [stackoverflow-link]: http://stackoverflow.com/search?q=[google-cloud-bigtable] [google-cloud-bigtable-discuss]: https://groups.google.com/group/google-cloud-bigtable-discuss [google-cloud-bigtable-announce]: https://groups.google.com/group/google-cloud-bigtable-announce
0
zpng/spring-cloud-microservice-examples
spring-cloud-microservice-examples
angularjs cloud eureka-server finagle hystrix java spring-cloud-microservice springboot thrift zipkin
# spring-cloud-microservice-examples spring-cloud-microservice-examples ## 说明 目前该项目实现了 zuul(路由模块), config-server(配置管理), eureka server(服务注册和发现), zipkin(服务调用追踪),hystrix, turbine stream (熔断分析) simple-service,simple-serviceB两个待发现的服务 simple-ui (一个用angular写的前端页面) 路由功能实现在 cloud-api-gateway 模块,注册到eureka server上面,所有的请求访问 http://localhost:5555, 然后根据路由规则 ``` zuul.routes.api-a.path: /cloud-simple-service/** zuul.routes.api-a.serviceId: cloud-simple-service zuul.routes.api-b.path: /cloud-simple-serviceB/** zuul.routes.api-b.serviceId: cloud-simple-serviceB zuul.routes.api-ui.path: /cloud-simple-ui/** zuul.routes.api-ui.serviceId: cloud-simple-ui ``` 分别请求到 注册到eureka server的cloud-simple-service 和 cloud-simple-serviceB服务。 服务的架构图: ![流程图](https://docs.google.com/drawings/d/1kb_2cLW-KcwhWfmu-iburNTCKKuH7HGUEdQCKCZMgZE/pub?w=960&h=720) --- ## 使用指南 * 先决条件 本机安装rabbitmq,并启动 ``` rabbitmq-server ``` 本机安装mysql,并启动且创建dev和test数据库,并分别创建表 ``` mysql.server start mysql -uroot CREATE TABLE `user` ( `id` int(11) NOT NULL, `username` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 dev数据库的user表中插入数据 INSERT INTO `user` VALUES (1,'dev1'),(2,'dev2'),(3,'dev3'); test数据库的user表中插入数据 INSERT INTO `user` VALUES (1,'test1'),(2,'test2'),(3,'test3'); ``` * 运行各模块 ``` cd cloud-api-gateway mvn spring-boot:run #端口5555 cd cloud-config-server mvn spring-boot:run #端口8888 cd cloud-eureka-server mvn spring-boot:run #端口8761 cd cloud-simple-service mvn spring-boot:run #端口8081 cd cloud-simple-service mvn spring-boot:run --server.port=8082 # cloud-simple-service 以8082端口再次启动服务 cd cloud-simple-ui mvn spring-boot:run #端口8090 cd cloud-zipkin mvn spring-boot:run #端口9966 ``` * 打开浏览器输入网址并浏览效果 ``` 查看Eureka Server http://localhost:8761 #查看eureka ``` ![Eureka Server](https://drive.google.com/uc?id=0BxyRSlBgU-ShX1dEdG5YSi10OEE) --- ``` 请求simple service, simple service2, simple serviceB http://localhost:8081/user #simple service 结果: [ { id: 1, username: "dev1" }, { id: 2, username: "dev2" }, { id: 3, username: "dev3" } ] http://localhost:8082/user #simple service2 结果: [ { id: 1, username: "dev1" }, { id: 2, username: "dev1" }, { id: 3, username: "dev1" } ] http://localhost:8091/user #simple serviceB 结果: Result from simpleserviceB ``` 本项目实现了通过spring-cloud-bus, 传播config-server中config的变化.下面动手验证之. 1. 下载配置git repository ``` git clone git@github.com:zpng/spring-cloud-config-demo.git ``` 根目录下有个cloud-config-repo目录,该目录下有两个文件: cloud-simple-service-dev.properties cloud-simple-service-test.properties 分别是cloud-simple-service在 dev和test环境下的配置信息 cloud-simple-service-dev.properties内容: ``` mysqldb.datasource.url=jdbc\:mysql\://localhost\:3306/dev?useUnicode\=true&characterEncoding\=utf-8 mysqldb.datasource.username=root mysqldb.datasource.password= logging.level.org.springframework.web:DEBUG ``` cloud-simple-service-test.properties内容: ``` mysqldb.datasource.url=jdbc\:mysql\://localhost\:3306/test?useUnicode\=true&characterEncoding\=utf-8 mysqldb.datasource.username=root mysqldb.datasource.password= logging.level.org.springframework.web:DEBUG ``` 1. 修改 cloud-simple-service-dev.properties 内容, ``` mysql url中使用的dev数据库变为test数据库 mysqldb.datasource.url=jdbc\:mysql\://localhost\:3306/dev?useUnicode\=true&characterEncoding\=utf-8 -> mysqldb.datasource.url=jdbc\:mysql\://localhost\:3306/test?useUnicode\=true&characterEncoding\=utf-8 git add -A git commit -m "MOD: update config" git push origin master #将修改push到git repositoy ``` 1. 此时并需要重启config-server或者simple-service,只需要发送一个POST请求到config-server,并通过bus传播到使用该配置文件的服务中. ``` curl -X POST http://localhost:8888/bus/refresh #(config-server启动在8888端口) ``` 此时刷新前端页面 ``` http://localhost:8081/user #simple service http://localhost:8082/user #simple service2 ``` 发现数据都已变成: ``` [ { id: 1, username: "test1" }, { id: 2, username: "test2" }, { id: 3, username: "test3" } ] ``` --- 1. 验证路由逻辑 cloud-api-gateway服务使用了zuul进行请求转发,转发规则如下: ``` # routes to serviceId zuul.routes.api-a.path: /cloud-simple-service/** zuul.routes.api-a.serviceId: cloud-simple-service zuul.routes.api-b.path: /cloud-simple-serviceB/** zuul.routes.api-b.serviceId: cloud-simple-serviceB zuul.routes.api-ui.path: /cloud-simple-ui/** zuul.routes.api-ui.serviceId: cloud-simple-ui ``` 并且zuul服务中进行了token验证,需要请求参数中包含accessToken,accessToken可以为任意值,如果不包含该参数则请求不能 转发过去. ``` http://localhost:5555/cloud-simple-ui/users?accessToken=test 结果: [ { id: 1, username: "test1" }, { id: 2, username: "test2" }, { id: 3, username: "test3" } ] http://localhost:5555/cloud-simple-serviceB/user?accessToken=tbbsxxxxd 结果: Result from simpleserviceB http://localhost:5555/cloud-simple-service/user?accessToken=xxxdaew 结果: [ { id: 1, username: "test1" }, { id: 2, username: "test2" }, { id: 3, username: "test3" } ] ``` 可见zuul已经完全发挥了它的路由作用. 1. Hystrix Hystrix是熔断器, Hystrx Dashboard实现了监控单个Hystrix stream的功能. ``` http://localhost:8022/hystrix/ ``` 打开后页面如下: ![hystrix stream页面](https://drive.google.com/uc?id=0BxyRSlBgU-ShTG1QZUpSc1hCV2c) 在其中输入 ``` http://localhost:8090/hystrix.stream ``` (cloud-simple-ui服务),即可监控该服务的stream,如下图 ![simple-ui-hystrix-stream](https://drive.google.com/uc?id=0BxyRSlBgU-ShUmRwNzluRWhxNmM) 注意需要请求几次cloud-simple-ui服务,该图上才会有结果. 1. Turbine 本示例使用了turbine-amqp, 然后各个需要统计hystrix stream的微服务,包含依赖 ``` <!--for turbine stream--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-hystrix-stream</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-stream-rabbit</artifactId> </dependency> ``` 即可将stream 发送到rabbitmq队列,然后turbine stream项目获取这些stream, 然后显示在图示上,这样跟之前的区别是可以监控所有 的微服务,而不是单个主机的stream. 同样打开 ``` http://localhost:8022/hystrix/ ``` 在其中输入 ``` http://localhost:8989/turbine.stream ``` 则可以看到如下图所示 ![turbine stream](https://drive.google.com/uc?id=0BxyRSlBgU-ShSmFsdzY1ZWIxdGc) 如图所示可以看到 cloud-simple-service, cloud-simple-serviceB, cloud-simple-ui 共3个服务的Hystrix Stream. 1. Zipkin zipkin可以跟踪微服务的调用以及,各个路径上面的时间,进而分析瓶颈. 打开 ``` http://localhost:9966 ``` trace如下图: ![zipkin-simple-ui-trace](https://drive.google.com/uc?id=0BxyRSlBgU-Shb3Bab2sxN1lUSE0) dependencies如下图: ![zipkin-dependencies](https://drive.google.com/uc?id=0BxyRSlBgU-ShLWJDRGd1VUhMWHc)
0
joshlong-attic/boot-examples
a repository for convenient Spring Boot examples
null
boot-examples ============= a repository for convenient Spring Boot examples
0
RefactoringGuru/design-patterns-java
Design Pattern Examples in Java
design-patterns java
# Design Patterns in Java This repository is part of the [Refactoring.Guru](https://refactoring.guru/design-patterns) project. It contains Java examples for all classic GoF design patterns. ## Requirements The examples were written in Java 8, but also tested in Java 9. For the best experience, we recommend working with examples in IntelliJ IDEA. The Community Edition of IDE is available for free (https://www.jetbrains.com/idea/download/). After downloading or cloning this repository to your computer, import its root directory into a New project: - Either through start dialog: Select "Import Project" option and skip through the rest of the steps. - Or via the main menu: File > New > Project from Existing Sources... After importing the project, you will be able to run examples by right-clicking "Demo" files inside every example and selecting the "Run" command from the context menu. ## Roadmap - [ ] Add detailed comments all classes. - [ ] Add structure-only examples. ## Contributor's Guide We appreciate any help, whether it's a simple fix of a typo or a whole new example. Just [make a fork](https://help.github.com/articles/fork-a-repo/), do your change and submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). Here's a style guide which might help you to keep your changes consistent with our code: 1. All code should meet the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) 2. Try to hard wrap the code at 80th's character. It helps to list the code on the website without scrollbars. 3. Examples should match following package convention: refactoring_guru.{pattern}.{example_name}. Example: ```java package refactoring_guru.factory_method.ui_example.buttons; class Button { ... ``` 4. Places classes into separate files. 5. Group classes into sub-packages. It helps people to understand dependencies of a class by glancing over its imports. Example: ```java package refactoring_guru.factory_method.example.buttons; class Button { ... ``` ```java package refactoring_guru.factory_method.example.factories; import Button; class Factory { ... ``` 6. Comments may or may not have language tags in them, such as this: ```java /** * EN: All products families have the same varieties (MacOS/Windows). * * This is a MacOS variant of a button. * * RU: Все семейства продуктов имеют одни и те же вариации (MacOS/Windows). * * Это вариант кнопки под MacOS. */ ``` Don't be scared and ignore the non-English part of such comments. If you want to change something in a comment like this, then do it. Even if you do it wrong, we'll tell you how to fix it during the Pull Request. ## License This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/80x15.png" /></a> ## Credits Authors: Bohdan Herashchenko ([@b1ger](https://github.com/b1ger)) and Alexander Shvets ([@neochief](https://github.com/neochief))
0
RameshMF/spring-boot-tutorial
100+ Spring Boot Articles, Tutorials, Video tutorials, Projects, Guides, Source code examples etc
annotations spring-application spring-boot spring-data spring-security tutorial xml-configuration
<h1>YouTube Channel - Spring Boot Tutorial</h1> <p>Subscribe for future video and updates</p> <a href="https://www.youtube.com/playlist?list=PLGRDMO4rOGcNSBOJOlrgQqGpIgo6_VZgR" target="_blank">Spring Boot Tutorial on YouTube </a> # Newly published spring boot tutorials (2020) <ul style="text-align: left;"> <li><a href="https://www.javaguides.net/2021/07/react-js-react-hooks-spring-boot.html" target="_blank">React JS ( React Hooks) + Spring Boot Tutorial</a><br></li><li><a href="https://www.javaguides.net/2021/07/spring-boot-tutorial-for-beginners.html" target="_blank">Spring Boot Tutorial for Beginners Step by Step</a><br></li><li><a href="https://www.javaguides.net/2021/07/spring-boot-tutorial-build-employee-management-project.html" target="_blank">Spring Boot Tutorial - Build Employee Management Project from Scratch using Spring Boot + Spring Security + Thymeleaf and MySQL Database</a><br></li><li><a href="https://www.javaguides.net/2021/06/configure-jwt-with-spring-boot-and-swagger.html" target="_blank">Configure JWT with Spring Boot and Swagger UI</a><br></li><li><a href="https://www.javaguides.net/2021/06/spring-boot-rest-api-documentation-with-swagger.html" target="_blank">Spring Boot REST API Documentation with Swagger</a><br></li><li><a href="https://www.javaguides.net/2021/05/spring-boot-crud-tutorial.html" target="_blank">Spring Boot CRUD Tutorial with Spring MVC, Spring Data JPA, Thymeleaf, Hibernate, MySQL</a><br></li><li><a href="https://www.javaguides.net/2021/04/spring-boot-project-employee-management.html" target="_blank">Spring Boot Project - Employee Management System | Project for Final Year Students</a><br></li><li><a href="https://www.javaguides.net/2021/04/deploy-spring-boot-mysql-crud-rest-api-Application-on-aws.html" target="_blank">Deploy Spring Boot MySQL CRUD REST API Application on AWS | Elastic Beanstalk | AWS RDS</a><br></li><li><a href="https://www.javaguides.net/2021/04/spring-boot-dto-validation-example.html" target="_blank">Spring Boot DTO Validation Example</a><br></li><li><a href="https://www.javaguides.net/2021/04/deploy-spring-boot-application-on-aws.html" target="_blank">Deploy a Spring Boot Application on AWS | Elastic Beanstalk</a><br></li><li><a href="https://www.javaguides.net/2021/04/deploy-spring-boot-mvc-application-on-aws.html" target="_blank">Deploy Spring Boot MVC Application on AWS | Elastic Beanstalk</a><br></li><li><a href="https://www.javaguides.net/2021/04/deploy-spring-boot-war-file-on-tomcat-in-aws.html" target="_blank">Deploy Spring Boot WAR file on Tomcat in AWS | Elastic Beanstalk</a></li><li><a href="https://www.javaguides.net/2021/03/validation-in-spring-boot-rest-api-with-hibernate-validator.html" target="_blank">Validation in Spring Boot REST API with Hibernate Validator (Java Bean Validation Annotations)</a><br></li><li><a href="Spring Boot DTO Example - Entity To DTO Conversion" target="_blank">Spring Boot DTO Example - Entity To DTO Conversion</a><br></li><li><a href="https://www.javaguides.net/2021/01/prerequisites-to-learn-spring-boot.html" target="_blank">Prerequisites to Learn Spring Boot</a><br></li><li><a href="https://www.javaguides.net/2021/01/angular-spring-boot-rest-api-example.html" target="_blank">Angular + Spring Boot REST API Example Tutorial</a><br></li><li><a href="https://www.javaguides.net/2020/11/jsp-vs-thymeleaf-support-in-spring-boot.html" target="_blank">JSP vs Thymeleaf Support in Spring Boot</a><br></li><li><a href="https://www.javaguides.net/2020/11/spring-professional-certification-topics-and-questions.html" target="_blank">Spring Professional Certification Topics and Questions</a><br></li><li><a href="https://www.javaguides.net/2020/07/spring-boot-react-js-crud-example-tutorial.html" target="_blank">Spring Boot + React JS CRUD Example Tutorial</a></li> <li><a href="https://www.javaguides.net/2020/07/spring-boot-angular-10-crud-example-tutorial.html" target="_blank">Spring Boot + Angular 10 CRUD Example Tutorial</a></li> <li><a href="https://www.javaguides.net/2020/07/react-js-spring-boot-rest-api-example-tutorial.html" target="_blank">React JS + Spring Boot REST API Example Tutorial</a></li> <li><a href="https://www.javaguides.net/2020/07/spring-boot-project-architecture.html" target="_blank">Spring Boot Project Architecture</a></li> <li><a href="https://www.javaguides.net/2020/07/how-spring-mvc-works-internally.html" target="_blank">How Spring MVC Works Internally</a></li> <li><a href="https://www.javaguides.net/2020/07/three-tier-three-layer-architecture-in-spring-mvc-web-application.html" target="_blank">Three Tier (Three Layer) Architecture in Spring MVC Web Application</a></li> <li><a href="https://www.javaguides.net/2020/06/best-practice-to-develop-persistence-or-dao-layer.html" target="_blank">Best Practice to Develop Persistence or DAO Layer</a></li> <li><a href="https://www.javaguides.net/2020/06/best-youtube-channels-to-learn-spring-boot.html" target="_blank">Best YouTube Channels to learn Spring Boot</a></li> <li><a href="https://www.javaguides.net/2020/06/pagination-and-sorting-with-spring-boot-thymeleaf-spring-data-jpa-hibernate-mysql.html" target="_blank">Pagination and Sorting with Spring Boot, ThymeLeaf, Spring Data JPA, Hibernate, MySQL</a></li> <li><a href="https://www.javaguides.net/2020/06/free-spring-boot-microservices-open-source-projects-github.html" target="_blank">Free Spring Boot Microservices Open Source Projects | GitHub | Download</a></li> <li><a href="https://www.javaguides.net/2020/06/spring-security-tutorial-with-spring-boot-spring-data-jpa-thymeleaf-and-mysql-database.html" target="_blank">Spring Security Tutorial with Spring Boot, Spring Data JPA, Thymeleaf and MySQL Database</a></li> <li><a href="https://www.javaguides.net/2020/06/free-spring-boot-angular-open-source-projects-github.html" target="_blank">Free Spring Boot Angular Open Source Projects | GitHub</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-crud-web-application-with-thymeleaf.html" target="_blank">Spring Boot CRUD Web Application with Thymeleaf, Spring MVC, Spring Data JPA, Hibernate, MySQL</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part1.html" target="_blank"></a><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part1.html" target="_blank">Spring Boot Thymeleaf CRUD Database Real-Time Project - PART 1</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part2.html" target="_blank">Spring Boot Thymeleaf CRUD Database Real-Time Project - PART 2</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part3.html" target="_blank">Spring Boot Thymeleaf CRUD Database Real-Time Project - PART 3</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part4.html" target="_blank">Spring Boot Thymeleaf CRUD Database Real-Time Project - PART 4</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part5.html" target="_blank">Spring Boot Thymeleaf CRUD Database Real-Time Project - PART 5</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part6.html" target="_blank">Spring Boot Thymeleaf CRUD Database Real-Time Project - PART 6</a>&nbsp;</li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-crud-database-real-time-project-part7.html" target="_blank">Spring Boot Thymeleaf CRUD Database Real-Time Project - PART 7</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-jsp-example-tutorial.html" target="_blank">Spring Boot JSP Example Tutorial</a></li> <li><a href="https://www.javaguides.net/2020/05/spring-boot-thymeleaf-example-tutorial.html" target="_blank">Spring Boot Thymeleaf Example Tutorial</a></li> <li><a href="https://www.javaguides.net/2020/04/jpa-hibernate-one-to-many-mapping-example-with-spring-boot.html" target="_blank">JPA, Hibernate One to Many Mapping Example with Spring Boot and MySQL Database</a></li> <li><a href="https://www.javaguides.net/2020/04/deploying-spring-boot-war-file-with-jsp-to-tomcat.html" target="_blank">Deploying Spring Boot WAR file with JSP to Tomcat</a></li> <li><a href="https://www.javaguides.net/2020/04/jpa-and-hibernate-many-to-many-mapping-spring-boot.html" target="_blank">JPA and Hibernate Many to Many Mapping with Spring Boot - @ManyToMany and @JoinTable</a></li> <li><a href="https://www.javaguides.net/2020/04/spring-boot-file-upload-download-rest-api-example.html" target="_blank">Spring Boot File Upload / Download Rest API Example</a></li> <li><a href="https://www.javaguides.net/2020/04/spring-boot-mysql-jpa-hibernate-restful-crud-api-tutorial.html" target="_blank">Spring Boot, MySQL, JPA, Hibernate Restful CRUD API Tutorial</a></li> <li><a href="https://www.javaguides.net/2020/04/spring-boot-h2-jpa-hibernate-restful-crud-api-tutorial.html" target="_blank">Spring Boot, H2, JPA, Hibernate Restful CRUD API Tutorial</a></li> </ul> <h1> Spring Boot Tutorials/Articles/Guides </h1> <div dir="ltr" style="text-align: left;" trbidi="on"> <h2 style="text-align: left;"> Spring Boot Basics</h2> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/getting-started-with-spring-boot.html">Getting Started with Spring Boot</a></li> <li><a href="http://www.javaguides.net/2018/09/installing-spring-boot-with-maven-and-gradle.html">Installing Spring Boot with Maven and Gradle</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-building-restful-web-service.html">Spring Boot 2 Hello World Application</a></li> <li><a href="http://www.javaguides.net/2018/09/overview-of-spring-boot-starter-parent.html">Overview of Spring Boot Starter Parent</a></li> <li><a href="http://www.javaguides.net/2018/09/important-spring-boot-starters-with-examples.html">Important Spring Boot Starters with Examples</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-how-to-change-port-and-context-path.html">Spring Boot How to Change Port and Context Path</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-deploy-war-file-to-external-tomcat.html">Spring Boot 2 Deploy WAR file to External Tomcat</a></li> <li><a href="http://www.javaguides.net/2018/09/different-ways-of-running-spring-boot-appilcation.html">Different Ways of Running Spring Boot Application</a></li> <li><a href="https://www.baeldung.com/spring-boot-migration">Migrating from Spring to Spring Boot</a></li> <li><a href="http://www.javaguides.net/2018/10/spring-boot-annotations.html">Spring Boot Annotations</a></li> </ul> <h2 style="text-align: left;"> Spring Boot REST API Development</h2> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/spring-boot-2-hibernate-5-mysql-crud-rest-api-tutorial.html">Spring Boot 2 Hibernate 5 MySQL CRUD REST API Tutorial</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-2-jpa-mysql-crud-example.html">Spring Boot 2 JPA MySQL CRUD Example</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-building-restful-web-service.html">Spring Boot 2 Hello World Application</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-crud-rest-apis-validation-example.html">Spring Boot 2 CRUD REST APIs Validation Example</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-data-jpa-auditing-with-spring-boot2-and-mysql-example.html">Spring Data JPA Auditing with Spring Boot 2 and MySQL Example</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-2-exception-handling-for-rest-apis.html">Spring Boot 2 Exception Handling for REST APIs</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-2-logging-slf4j-logback-and-log4j-example.html">Spring Boot 2 Logging SLF4j Logback and LOG4j2 Example</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-2-jersey-rest-jpa-hibernate-5-crud-rest-apis-example.html">Spring Boot 2 + Jersey REST + JPA + Hibernate 5 CRUD REST APIs Example</a></li> <li><a href="http://www.javaguides.net/2018/10/spring-boot-2-scheduling-tasks.html">Spring Boot 2 - Scheduling Tasks</a></li> <li><a href="http://www.javaguides.net/2018/10/spring-boot-2-restful-api-documentation-with-swagger2-tutorial.html">Spring Boot 2 RESTful API Documentation with Swagger 2 Tutorial</a></li> <li><a href="http://www.javaguides.net/2018/11/spring-boot-2-file-upload-and-download-rest-api-tutorial.html">Spring Boot 2 - File Upload and Download Rest API Tutorial</a> // LATEST</li> </ul> <h2 style="text-align: left;"> Spring Boot Web Application Development</h2> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/spring-mvc-using-spring-boot2-jsp-jpa-hibernate5-mysql-example.html">Spring MVC + Spring Boot2 + JSP + JPA + Hibernate 5 + MySQL Example</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot2-mvc-web-application-thymeleaf-jpa-mysql-example.html">Spring Boot 2 MVC Web Application Thymeleaf JPA MySQL Example</a></li> <li><a href="http://www.javaguides.net/2018/10/spring-boot-spring-mvc-validating-form.html">Spring Boot 2 - Spring MVC + Thymeleaf Input Form Validation</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-jpa-multiple-data-sources-example.html">Spring Boot JPA Multiple Data Sources Example</a></li> </ul> <h2 style="text-align: left;"> Spring Boot with Spring Security</h2> <div> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/spring-boot-spring-mvc-role-based-spring-security-jpa-thymeleaf-mysql-tutorial.html">Spring Boot 2 + Spring MVC + Role Based Spring Security + JPA + Thymeleaf + MySQL Tutorial</a></li> <li><a href="https://spring.io/guides/gs/authenticating-ldap/">Authenticating a User with LDAP using Spring Boot and Spring Security</a></li> <li><a href="http://www.javaguides.net/2018/10/user-registration-module-using-springboot-springmvc-springsecurity-hibernate5-thymeleaf-mysql.html">User Registration Module using Spring Boot 2 + Spring MVC + Spring Security + Hibernate 5 + Thymeleaf + MySQL</a></li> </ul> <h2 style="text-align: left;"> Spring Boot Configuration</h2> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/spring-boot-java-based-configuration-example.html">Spring Boot 2 Java Based Configuration Example</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-xml-configuration-example.html">Spring Boot 2 XML Configuration Example</a></li> <li><a href="https://www.baeldung.com/spring-boot-migration">Migrating from Spring to Spring Boot</a></li> </ul> <h2 style="text-align: left;"> Spring Boot Testing</h2> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/spring-data-jpa-repository-testing-using-spring-boot-datajpatest.html">Spring Data JPA Repository Testing using Spring Boot @DataJpaTest</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-2-rest-apis-integration-testing.html">Spring Boot 2 REST APIs Integration Testing</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-2-with-junit-5-testing.html">Spring Boot 2 with JUnit 5 Testing Example</a></li> </ul> <h2 style="text-align: left;"> Spring Boot Annotations</h2> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/spring-boot-enableautoconfiguration-annotation-with-example.html">Spring Boot @EnableAutoConfiguration Annotation with Example</a></li> <li><a href="http://www.javaguides.net/2018/09/spring-boot-springbootapplication-annotation-with-example.html">Spring Boot @SpringBootApplication Annotation with Example</a></li> <li><a href="http://www.javaguides.net/2018/10/spring-boot-annotations.html">Spring Boot Annotations</a></li> <li><a href="http://www.javaguides.net/2018/10/spring-boot-creating-asynchronous-methods-using-async-annotation.html">Spring Boot - Creating Asynchronous Methods using @Async Annotation</a></li> </ul> <h2 style="text-align: left;"> Configure Spring Boot with PostgreSQL</h2> </div> <div> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2019/01/springboot-postgresql-jpa-hibernate-crud-restful-api-tutorial.html">Spring Boot + PostgreSQL + JPA/Hibernate CRUD Restful API Tutorial</a></li> </ul> <h2 style="text-align: left;"> Spring Boot Mini Projects</h2> <ul style="text-align: left;"> <li><a href="http://www.javaguides.net/2018/09/mini-todo-management-project-using-spring-boot-springmvc-springsecurity-jsp-hibernate-mysql.html">Mini Todo Management Project using Spring Boot + Spring MVC + Spring Security + JSP + Hibernate + MySQL</a></li> <li><a href="http://www.javaguides.net/2018/10/user-registration-module-using-springboot-springmvc-springsecurity-hibernate5-thymeleaf-mysql.html">User Registration Module using Spring Boot + Spring MVC + Spring Security + Hibernate 5 + Thymeleaf + MySQL</a></li> </ul> </div> </div> <h1>Spring Boot + Angular 9 Tutorials // Latest </h1> <ul style="text-align: left;"><a href="https://www.javaguides.net/2020/01/spring-boot-angular-9-crud-example-tutorial.html"></a> <li><a href="https://www.javaguides.net/2020/01/spring-boot-angular-9-crud-example-tutorial.html"></a><a href="https://www.javaguides.net/2020/01/spring-boot-angular-9-crud-example-tutorial.html">Spring Boot + Angular 9 CRUD Example Tutorial</a> - Main Tutorial</li> <li><a href="https://www.javaguides.net/2020/01/spring-boot-angular-9-crud-part-1-develop-springboot-crud-rest-apis.html">Spring Boot + Angular 9 CRUD Tutorial - Part 1 - Develop Spring Boot CRUD Rest APIs</a></li> <li><a href="https://www.javaguides.net/2020/01/spring-boot-angular-9-crud-part-2-create-angular-9-app.html">Spring Boot + Angular 9 CRUD - Part 2 - Create an Angular 9 App</a></li> <li><a href="https://www.javaguides.net/2020/01/spring-boot-angular-9-crud-part-3-develop-angular-9-crud-operations.html">Spring Boot + Angular 9 CRUD - Part 3 - Develop Angular 9 CRUD Operations</a></li> <li><a href="https://www.javaguides.net/2020/01/spring-boot-angular-9-crud-part-4-angular-9-crud-app-configuration.html">Spring Boot + Angular 9 CRUD, Part 4 - Angular 9 CRUD App Configuration</a></li> <li><a href="https://www.javaguides.net/2020/01/spring-boot-angular-8-crud-part-5-running-angular-9-crud-app.html">Spring Boot 2 + Angular 9 CRUD, Part 5 - Running Angular 9 CRUD App</a></li> </ul> <h1> Spring Boot + MongoDB </h1> <ul style="text-align: left;"><b><a href="https://www.javaguides.net/2019/12/spring-boot-angular-mongodb-crud-example-tutorial.html"></a> <li><a href="https://www.javaguides.net/2019/12/spring-boot-angular-mongodb-crud-example-tutorial.html"><b></b></a><b><a href="https://www.javaguides.net/2019/12/spring-boot-angular-mongodb-crud-example-tutorial.html">Spring Boot + Angular + MongoDB CRUD Example Tutorial</a></b></li> <li><b><a href="https://www.javaguides.net/2019/12/spring-boot-mongodb-crud-example-tutorial.html">Spring Boot + MongoDB CRUD Tutorial</a></b></li> </b></ul>
0
payara/Payara-Examples
Repository for Example Code to demonstrate Payara specific features
null
// // Copyright (c) 2016-2022 Payara Foundation and/or its affiliates. // # Payara Platform Examples Repository for Example Code to demonstrate Payara specific features ### [Administration Samples](administration-examples) This module contains some example asadmin scripts for managing Payara ### [Java EE](javaee) Some simple Java EE example applications Payara Clustered Singleton example application ### [MicroProfile](microprofile) Some simple MicroProfile example applications ### [Payara Micro](payara-micro) Example applications showing features of Payara Micro ### [Payara Services Examples](payara-services) Some examples of additional Payara services, including: * Request Tracing Service * Notification Service * EclipseLink Cache Coordination / Invalidation MDB examples ### [OSGi Examples](osgi) Some simple examples of OSGi bundles that can be deployed on Payara Server ### [Ecosystem](ecosystem) Examples of using development and integration tools and plugins like Maven and Gradle plugins. ### [Cloud Providers Examples](cloud-providers) Some examples specific for cloud providers like AWS, Google, Azure, ... ### [Polyglot](polyglot) Some examples using other JVM languages with Payara, including examples with GraalVM.
1
CamelCookbook/camel-cookbook-examples
Example source code for Apache Camel Developer's Cookbook
apache-camel examples integration packtpub
Apache Camel Developer's Cookbook, 2nd Edition Samples ====================================================== [![Build Status](https://travis-ci.org/CamelCookbook/camel-cookbook-examples.png?branch=master)](https://travis-ci.org/CamelCookbook/camel-cookbook-examples) [![Stories in Ready](https://badge.waffle.io/CamelCookbook/camel-cookbook-examples.png?label=ready&title=Ready)](https://waffle.io/CamelCookbook/camel-cookbook-examples?utm_source=badge) This project contains the sample code for the [_Apache Camel Developer's Cookbook, 2nd Edition_](http://www.packtpub.com/apache-camel-developers-cookbook/book) (Packt Publishing, TBD 2017) by [Scott Cranton](https://github.com/scranton), [Jakub Korab](https://github.com/jkorab), and [Christian Posta](https://github.com/christian-posta). The latest version of this code is available on [GitHub](http://github.com/CamelCookbook/camel-cookbook-examples). *This project is up to date with [Apache Camel 2.20.0](http://camel.apache.org/camel-2200-release.html).* All of the examples are driven through JUnit tests, and are collectively structured as a set of Apache Maven projects. To execute them, you will need a copy of the [Java 8 JDK](http://openjdk.java.net/install/) and an [Apache Maven 3](http://maven.apache.org/) installation. Maven will download all of the appropriate project dependencies. In order to execute all the tests, all you need to do is run: $ mvn clean install
1
databricks/learning-spark
Example code from Learning Spark book
null
[![buildstatus](https://travis-ci.org/holdenk/learning-spark-examples.svg?branch=master)](https://travis-ci.org/holdenk/learning-spark-examples) Examples for Learning Spark =============== Examples for the Learning Spark book. These examples require a number of libraries and as such have long build files. We have also added a stand alone example with minimal dependencies and a small build file in the mini-complete-example directory. These examples have been updated to run against Spark 1.3 so they may be slightly different than the versions in your copy of "Learning Spark". Requirements == * JDK 1.7 or higher * Scala 2.10.3 - scala-lang.org * Spark 1.3 * Protobuf compiler - On debian you can install with sudo apt-get install protobuf-compiler * R & the CRAN package Imap are required for the ChapterSixExample * The Python examples require urllib3 Python examples === From spark just run ./bin/pyspark ./src/python/[example] Spark Submit === You can also create an assembly jar with all of the dependencies for running either the java or scala versions of the code and run the job with the spark-submit script ./sbt/sbt assembly OR mvn package cd $SPARK_HOME; ./bin/spark-submit --class com.oreilly.learningsparkexamples.[lang].[example] ../learning-spark-examples/target/scala-2.10/learning-spark-examples-assembly-0.0.1.jar [![Learning Spark](http://akamaicovers.oreilly.com/images/0636920028512/cat.gif)](http://www.jdoqocy.com/click-7645222-11260198?url=http%3A%2F%2Fshop.oreilly.com%2Fproduct%2F0636920028512.do%3Fcmp%3Daf-strata-books-videos-product_cj_9781449358600_%2525zp&cjsku=0636920028512)
1
castagna/jena-examples
A collection of ready to use, small and self contained examples on how to use Apache Jena
null
null
0
zhangjun0x01/bigdata-examples
分享一些在工作中的大数据实战案例,包括flink、kafka、hadoop、presto等等。欢迎大家关注我的公众号【大数据技术与应用实战】,一起成长。
null
分享自己平时工作和学习中遇到的一些大数据相关的知识点,如hadoop、flink、presto、hive、iceberg等等,更多精彩内容欢迎大家关注我的微信公众号: ![欢迎关注我的公众号:大数据技术与应用实战](https://img-blog.csdnimg.cn/20200727095900191.png)
0
haoxiaoyong1014/springboot-examples
spring boot 集成各技术案例
spring-boot springboot-netty springboot-oauth2 springboot-redis
# springboot-examples spring boot 集成各技术案例 <img src="https://camo.githubusercontent.com/95c3d7ef0b5da8445087e462514063675f79321d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4372656174697665253230436f6d6d6f6e732d4443334432342e737667" alt="知识共享协议(CC协议)" data-canonical-src="https://img.shields.io/badge/License-Creative%20Commons-DC3D24.svg" style="max-width:100%;"> [![Stargazers over time](https://starchart.cc/haoxiaoyong1014/springboot-examples.svg)](https://starchart.cc/haoxiaoyong1014/springboot-examples) 2018/5/24 添加 springboot-rabbitMQ(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-rabbitmq">消息队列</a>) 2018/6/12 添加 springboot-redis-docker(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-redis-docker">Docker 部署 SpringBoot 项目整合 Redis 镜像做访问计数Demo</a>) 2018/6/13 添加 springboot-web-thymeleaf (<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-web-thymeleaf">springboot整合thymeleaf</a>) 2018/6/20 添加 springboot2-oauth2(springBoot版本:2.0.1.RELEASE) **springboot2-oauth2 包括:** * springboot-oauth2-authorization-server(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-oauth2-authorization-server">springboot整合OAuth2.0认证服务</a>), * springboot-oauth2-resource-server(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-oauth2-resource-server">资源服务</a>) 2018/6/30 添加 springboot-mybatis-ehcache (<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-mybatis-myehcache">使用EhcacheCache做二级缓存,使用pageHelper做分页插件</a>) 2018/7/14 添加 springboot-websocket (<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-websocket">在线人数统计,消息发送,一对一,一对多发送消息<a>) 2018/8/10 添加 springboot-shrio(<a href="https://github.com/haoxiaoyong1014/springboot-shiro">基础版<a>) 2018/8/13 添加 springboot-shiro-v1.2.0(<a href="https://github.com/haoxiaoyong1014/springboot-shiro-v1.2.0">加强版<a>) 2018/9/28 添加 springboot-quartz(<a href="https://github.com/haoxiaoyong1014/springboot-quartz">任务调度,持久化任务<a>) 2018/10/15 添加 springboot-SpringDataJpa(<a href="https://github.com/haoxiaoyong1014/springboot-SpringDataJpa">Spring Data JPA 使用<a>) 2018/10/20 添加 springboot-netty(<a href="https://github.com/haoxiaoyong1014/springboot-netty">springboot整合netty做心跳检测<a>) 2018/11/29 添加 springboot2-redis(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot2-redis">springboot2x系列整合Redis(Lettuce版)<a>) 2019/2/20 添加 springboot-fastDFS(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-fastDFS">springboot-fastDFS</a>) 2019/3/12 添加 global-exception(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/global-exception">global-exception(Spring全局异常处理)</a>) 2019/5/11 添加 springboot-mongodb(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-mongodb">springboot-mongodb(springboot整合mongodb)</a>) 2019/5/31 添加 springboot-login-Interceptor(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-login-Interceptor">springboot拦截器整合JWT做验证token,以及token过期解决方案</a>) 2019/6/24 添加 springboot-druid(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-druid">使用阿里巴巴提供的springboot整合druid包管理连接池</a>) 2019/7/30 添加 springboot-easyexcel-encapsulation(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-easyexcel-encapsulation">对阿里巴巴easyexcel导入导出excel文件进行封装</a>) 2019/9/08 添加 strategy-aop(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/strategy-aop">AOP+自定义注解+策略模式 记录操作日志,避免过多的 if else</a>) 2019/10/15 添加 chat-software(<a href="https://github.com/haoxiaoyong1014/chat-software"> 基于Netty Spring Boot仿微信聊天项目</a>) 2020/1/11 添加 distributed-job(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/distributed-job">spring-boot整合xxl-job,手动触发定时任务</a>) 2020/2/29 添加 mybatis-plus-example(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/mybatis-plus-example">springboot整合mybatis-plus</a>) 2020/3/20 添加 okay-spring-boot-starter(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/okay-spring-boot-starter">从SpringBoot源码到自己封装一个Starter</a>) 2020/5/08 添加 springboot-threadpool(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-threadpool">SpringBoot 使用线程池-线程池隔离</a>) 2020/5/14 添加 springboot-swagger-enhance(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-swagger-enhance">SpringBoot集成第三方swagger美化文档样式</a>) 2020/8/14 添加 springboot-admin-monitor(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-admin-monitor">springBoot-admin 日志,系统监控</a>) 2020/9/10 添加 springboot-elk(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-elk">springboot集成ELK,包含安装步骤</a>) # springboot-redis-example(<a href="https://github.com/haoxiaoyong1014/springboot-redis-examples">redis系列</a>) 2018/6/12 添加 springboot-redis-docker(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-redis-docker">Docker 部署 SpringBoot 项目整合 Redis 镜像做访问计数(PV)Demo</a>) 2018/07/27 添加springboot-redis-ranking (<a href="https://github.com/haoxiaoyong1014/springboot-redis-examples/tree/master/springboot-redis-ranking">基于Redis实现商品排行榜</a>) 2018/08/01 添加 springboot-redis-fridends (<a href="https://github.com/haoxiaoyong1014/springboot-redis-examples/tree/master/springboot-redis-friends">基于Redis实现查询共同好友</a>, 结合前端vue.js,前端项目地址: <a href="https://github.com/haoxiaoyong1014/common-friends">common-friends</a>) 2018/11/16 添加 redis-manage(<a href="https://github.com/haoxiaoyong1014/redis-manage">Redis的后台管理</a>,结合前端项目<a href="https://github.com/haoxiaoyong1014/redis-manage-view">redis-manage-view</a>) 2019/8/16 添加 springboot-idempotent(<a href="https://github.com/haoxiaoyong1014/springboot-examples/tree/master/springboot-idempotent">springboot + redis + 注解 + 拦截器 实现接口幂等性校验</a>) 2019/9/14 添加 springboot-mybatis-redis-cache(<a href="https://github.com/haoxiaoyong1014/springboot-redis-examples/tree/master/springboot-mybatis-redis-cache">使用redis做二级缓存</a>) 2019/10/29添加 [Redis专题(七)--基于Sentinel(哨兵)搭建实现Redis高可用集群](https://haoxiaoyong.cn/2019/10/29/2019/2019-12-03-redis-master-slave/) 2020/09/18添加 springboot-redis-range( [SpringBoot 使用 Redis Geo 实现查找附近的位置](https://github.com/haoxiaoyong1014/springboot-redis-examples/tree/master/springboot-redis-range)) 持续更新中....
0
leeowenowen/rxjava-examples
全面,完整,图文并茂的RxJavaAPI使用示例。
null
#RxJava 示例工程 #理解RxJava API的一个关键是明白API需要Observable的Case是异步使用场景,而返回普通对象类型的是同步使用场景, 比如flatmap与map, buffer中的多个重载等。 讲解RxJava如何使用的示例工程,你可以将它安装在android手机上,然后就可以随手学习RxJava的api了. 点击API名称,可以看到源码,源码输出以及对应的marble-diagram. >API描述目前支持中文和英文两种语言, 如果你的Android设备使用的是中文,那么你看到的API描述会跟我如下的截图有所不同. # rxjava-examples rxjava-example android project Show how to use RxJava API, you can install the [Demo APK](https://raw.githubusercontent.com/wiki/leeowenowen/rxjava-examples/apk/app-debug.apk) on your android phone, and then you can learn RxJava API everywhere! click the api name, and you can see the source code, output and relevant marble diagram at the same time. all the source codes show on the sample gui are generated from my project source, and all the marble diagram is loaded from load. [Download APK](https://raw.githubusercontent.com/wiki/leeowenowen/rxjava-examples/apk/app-debug.apk) ![Barcode/二维码](https://raw.githubusercontent.com/wiki/leeowenowen/rxjava-examples/res/barcode.png) ![Demo Screenshot1](https://raw.githubusercontent.com/wiki/leeowenowen/rxjava-examples/res/rxjava-1.png) ![Demo Screenshot2](https://raw.githubusercontent.com/wiki/leeowenowen/rxjava-examples/res/rxjava-2.png)
0
mattdesl/lwjgl-basics
:wrench: LibGDX/LWJGL tutorials and examples
null
null
0
spring-projects/spring-integration-samples
You are looking for examples, code snippets, sample applications for Spring Integration? This is the place.
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
eventuate-tram/eventuate-tram-examples-customers-and-orders
An example of Choreography-based sagas in Spring Boot/JPA microservices
eventual-consistency java microservice-architecture microservices sagas spring-boot
null
1
jjenkov/javafx-examples
A large collection of JavaFX examples demonstrating basic + advanced features of JavaFX.
null
# JavaFX Examples This repository contains a growing collection of JavaFX examples. So far this GitHub repository contains 76 examples. I have plans to add lots more examples in the future, so make sure you star this repository for future reference ;-) The lists of examples is found here: - [JavaFX Basic Examples](#javafx-basic-examples) - [JavaFX Advanced Examples](#javafx-advanced-examples) ## JavaFX Tutorial The examples come from my JavaFX tutorial series: [JavaFX Tutorial](http://tutorials.jenkov.com). ## Java + JavaFX Version Used In general the examples in this repository will attempt to use the latest version of Java and JavaFX. For now the examples are tested with Java 14 and JavaFX 14 (yes, 15 + 15 are latest - will update soon!). ## Running the Examples There are 3 options to run the examples. - Using your IDE (IntelliJ IDEA / Eclipse / Netbeans) - Using Maven - passing main class to run on the command line - Using gradle - passing main class to run on the command line - Using Maven - configuring the main class inside the pom.xml Some of these are covered in more detail below. ### Run the Examples in IntelliJ Idea(needs pre-downloaded javafx modules) To run the examples from within IntelliJ IDEA you must first create a new project in IntelliJ, and set the root directory to the directory into which you have cloned this Git repository. Second, you must download JavaFX and unzip the distribution to some directory. Third, you must add all the JAR files found in the "lib" directory to your project's classpath. Fourth, you must create a run configuration for the example class you want to run. Add the following JVM args to that run configuration: --module-path C:\data\downloads\javafx\javafx-sdk-14\lib --add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web Make sure that the --module-path points to the directory you unzipped your downloaded JavaFX distribution to (meaning the "lib" dir within that JavaFX distribution dir - as shown above). ### Run in IDE - alternative Instead of creating run configuration for each example class you can create a run configuration for the ExampleRunner class(based on maven or gradle nature. Both are supported using wrappers so you don't need to have any of them on you system and you can choose to use the one you prefer), and then from inside the ExampleRunner class, call the example class you want to run - by changing the main() method inside the ExampleRunner class. For instance, add the following line to the ExampleRunner class main() method and then run ExampleRunner main ButtonExample.main(args); ### Run via Maven - Passing Main Class as Argument to Maven You can use maven and pass the example class you want to add. for example to run WebViewExample you can run ./mvnw compile exec:java -Dexec.args="com.jenkov.javafx.webview.WebViewExample" ### Run via Gradle - Passing Main Class as Argument to Gradle You can use gradle and pass the example class you want to add. for example to run WebViewExample you can run ./gradlew run --args="com.jenkov.javafx.webview.WebViewExample" ### Run via Maven You can use Maven and edit the pom.xml file and change "mainClass" of openjfx plugin configuration and select the example you want then run ./mvnw clean javafx:run ## Suggestions If you have any suggestions for missing examples, create a GitHub issue in this repo, and / or ping me on Twitter (@jjenkov) or LinkedIn (Jakob Jenkov). <a name="javafx-basic-examples"></a> # JavaFX Basic Examples - [Accordion Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/accordion/AccordionExample.java) - [Animation Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/animation/AnimationExample.java) - Button Examples - [Button Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/button/ButtonExample.java) - [Button Font Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/button/ButtonFontExample.java) - [Disabled Button Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/button/DisabledButtonExample.java) - [Normal, Default and Cancel Mode Button Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/button/ButtonDefaultAndCancelModesExample.java) - [Button FXML Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/button/ButtonFXMLExample.java) - [Button Transformation Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/button/ButtonTransformationExample.java) - [Canvas Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/canvas/CanvasExample.java) - [ChoiceBox Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/choicebox/ChoiceBoxExample.java) - [Color Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/color/ColorExample.java) - [ColorPicker Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/colorpicker/ColorPickerExample.java) - [ComboBox Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/combobox/ComboBoxExample.java) - [Concurrency Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/concurrency/ConcurrencyExample.java) - [ContextMenu Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/contextmenu/ContextMenuExample.java) - [DirectoryChooser Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/directorychooser/DirectoryChooserExample.java) - [FileChooser Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/filechooser/FileChooserExample.java) - [Font Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/font/FontExample.java) - [FXML Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/fxml/FXMLExample.java) - [HTMLEditor Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/htmleditor/HtmlEditorExample.java) Hyperlink Examples - [Hyperlink Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/hyperlink/HyperlinkExample.java) - [Hyperlink Font Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/hyperlink/HyperlinkFontExample.java) - [Hyperlink Change Text Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/hyperlink/HyperlinkChangeTextExample.java) - [ImageView Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/imageview/ImageViewExample.java) - Label Examples - [Label Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/label/LabelExample.java) - [Label Font Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/label/LabelFontExample.java) - [Label Change Text Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/label/LabelChangeTextExample.java) - [Media Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/media/MediaExample.java) - MenuButton Examples - [MenuButton Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/menubutton/MenuButtonExample.java) - [MenuButton Font Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/menubutton/MenuButtonFontExample.java) - [MenuButton Icon Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/menubutton/MenuButtonIconExample.java) - [Pagination Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/pagination/PaginationExample.java) - [ProgressBar Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/progressbar/ProgressBarExample.java) - [Properties Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/properties/PropertyExample.java) - [Scene Cursor Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/scene/SceneCursorExample.java) - [ScrollPane Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/scrollpane/ScrollPaneExample.java) - [Separator Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/separator/SeparatorExample.java) - [Slider Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/slider/SliderExample.java) - [SplitMenuButton Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/splitmenubutton/SplitMenuButtonExample.java) - [SplitPane Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/splitpane/SplitPaneExample.java) - Stage Examples - [Stage Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/stage/StageExample.java) - [Stage Decoration Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/stage/StageDecorationExample.java) - [Multiple Stages Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/stage/MultipleStagesExample.java) - [Multiple Stages Modal Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/stage/MultipleStagesModalExample.java) - [Full Screen Stage Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/stage/FullScreenStageExample.java) - [Auto Shutdown Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/stage/AutoShutDownExample.java) - [Keyboard Events Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/stage/StageKeyboardEventsExample.java) - [TabPane Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tabpane/TabPaneExample.java) - TableView Examples - [TableView Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tableview/TableViewExample.java) - [TableView Editable Column Cells Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tableview/TableViewEditableExample.java) - [TableView Nested Columns Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tableview/TableViewNestedColumnsExample.java) - [TableView Selection Model Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tableview/TableViewSelectionModelExample.java) - [TableView Custom Rendering Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tableview/TableViewCustomRenderingExample.java) - [TableView Map as Data Items Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tableview/TableViewMapDataItemsExample.java) - [Text Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/text/TextExample.java) - [TextArea Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/textarea/TextAreaExample.java) - [TextField Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/textfield/TextFieldExample.java) - [TitledPane Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/titledpane/TitledPaneExample.java) - ToggleButton Examples - [ToggleButton Example](https://github.com/jjenkov/javafx-example/blob/main/src/main/java/com/jenkov/javafx/togglebutton/ToggleButtonExample.java) - [ToggleButton Font Example](https://github.com/jjenkov/javafx-example/blob/main/src/main/java/com/jenkov/javafx/togglebutton/ToggleButtonFontExample.java) - [ToolBar Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/toolbar/ToolBarExample.java) - [ToolTip Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/tooltip/ToolTipExample.java) - [TreeTableView Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/treetableview/TreeTableViewExample.java) - [TreeView Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/treeview/TreeViewExample.java) - [VBox Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/vbox/VBoxExample.java) - WebView Examples - [WebView Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/webview/WebViewExample.java) - [WebView JavaScript Integration Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/webview/WebViewJavaScriptIntegrationExample.java) - [WebView Mouse Wheel Zoom Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/webview/WebViewMouseWheelZoomExample.java) (Mouse wheel zoom code provided by Friedhold Matz (@FriedholdMatz on Twitter)) - 2D Examples - [2D Basics Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/gfx2d/Gfx2DExample.java) - 3D Examples - [3D Basics Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/gfx3d/Gfx3DExample.java) - Transformations Examples - [Transformations Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/transformations/TransformationsExample.java) - [Translate Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/transformations/TranslateTransformationsExample.java) - [Rotate Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/transformations/RotateTransformationsExample.java) - [Scale Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/transformations/ScaleTransformationsExample.java) - Drag and Drop Examples - [Drag and Drop Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/draganddrop/DragAndDropExample.java) <a name="javafx-advanced-examples"></a> # JavaFX Advanced Examples - [Auto-responsive Layout Example](https://github.com/jjenkov/javafx-examples/blob/main/src/main/java/com/jenkov/javafx/layout/AutoResponsiveLayoutExample.java)
0
mscharhag/blog-examples
null
null
blog-examples ============= This repository contains example code for various blog posts on [https://www.mscharhag.com/][1] [1]:https://www.mscharhag.com/
0
mswiderski/jbpm-examples
Various examples of jBPM 5
null
jbpm-examples ============= Various examples of jBPM 5 and 6: - use of jbpm as a framwork - use of jbpm service - use of jbpm services with spring to build execution server
0
m0ver/tinystruct-examples
The framework is quite easy to be used, but in order to help you to understand deeply, we prepared some code examples for your reference. It might be helpful for you to hand it easily.
null
<img src="https://avatars.githubusercontent.com/u/3723144?s=400&u=6c4b365e7feb0aab20383785d77ba27abf9f5bb8&v=4" title="tinystruct2.0" /> tinystruct framework ========= [![Build Status](https://travis-ci.org/m0ver/tinystruct-examples.svg?branch=master)](https://travis-ci.org/m0ver/tinystruct2.0) This is an example project based on tinystruct framework, it supports both C/S application and B/S web application development. To execute it in CLI mode --- ```tcsh $ bin/dispatcher --version _/ ' _ _/ _ _ _/ / / /) (/ _) / / (/ ( / 1.2.3 / ``` ```tcsh $ bin/dispatcher --help Usage: bin/dispatcher COMMAND [OPTIONS] Commands: download Download a resource from other servers exec To execute native command(s) generate POJO object generator install Install a package open Start a default browser to open the specific URL say Output words set Set system property sql-execute Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement. sql-query Executes the given SQL statement, which returns a single ResultSet object. update Update for latest version Options: --allow-remote-access Allow to be accessed remotely --help Help command --host Host name / IP --import Import application --logo Print logo --settings Print settings --version Print version Run 'bin/dispatcher COMMAND --help' for more information on a command. $ bin/dispatcher say/"Praise to the Lord" Praise to the Lord ``` Run it in a servlet container --- ```tcsh # bin/dispatcher start --import org.tinystruct.system.TomcatServer ``` Run it in docker container --- ```tcsh # wget https://github.com/tinystruct/tinystruct2.0/archive/master.zip # unzip master.zip # mv tinystruct2.0-master/Dockerfile . # docker build -t tinystruct-based:1.0 -f Dockerfile . # docker run -d -p 777:777 tinystruct-based:1.0 ``` You can access the below URLs after deployed the project in Tomcat 6.0+ : * <a href="http://localhost:777/?q=say/Praise%20to%20the%20Lord!">http://localhost:777/?q=say/Praise%20to%20the%20Lord! </a><br /> * <a href="http://localhost:777/?q=praise">http://localhost:777/?q=praise </a><br /> * <a href="http://localhost:777/?q=youhappy">http://localhost:777/?q=youhappy</a><br /> * <a href="http://localhost:777/?q=say/%E4%BD%A0%E7%9F%A5%E9%81%93%E5%85%A8%E4%B8%96%E7%95%8C%E6%9C%80%E7%95%85%E9%94%80%E7%9A%84%E4%B9%A6%E6%98%AF%E5%93%AA%E4%B8%80%E6%9C%AC%E4%B9%A6%E5%90%97%EF%BC%9F">http://localhost:777/?q=say/%E4%BD%A0%E7%9F%A5%E9%81%93%E5%85%A8%E4%B8%96%E7%95%8C%E6%9C%80%E7%95%85%E9%94%80%E7%9A%84%E4%B9%A6%E6%98%AF%E5%93%AA%E4%B8%80%E6%9C%AC%E4%B9%A6%E5%90%97%EF%BC%9F</a> A demonstration for comet technology, without any websocket and support any web browser: * <a href="https://tinystruct.herokuapp.com/?q=talk">https://tinystruct.herokuapp.com/?q=talk</a><br /> <img src="example.png" title="smalltalk - tinystruct2.0" height="300"/> <br /> Live Demo Site: * https://tinystruct.herokuapp.com/ * <a href="https://tinystruct.herokuapp.com/?q=say/Praise%20to%20the%20Lord!">https://tinystruct.herokuapp.com/?q=say/Praise%20to%20the%20Lord! </a><br /> * <a href="https://tinystruct.herokuapp.com/?q=praise">https://tinystruct.herokuapp.com/?q=praise</a><br /> * <a href="https://tinystruct.herokuapp.com/?q=youhappy">https://tinystruct.herokuapp.com/?q=youhappy</a><br /> * <a href="https://tinystruct.herokuapp.com/?q=say/%E4%BD%A0%E7%9F%A5%E9%81%93%E5%85%A8%E4%B8%96%E7%95%8C%E6%9C%80%E7%95%85%E9%94%80%E7%9A%84%E4%B9%A6%E6%98%AF%E5%93%AA%E4%B8%80%E6%9C%AC%E4%B9%A6%E5%90%97%EF%BC%9F">https://tinystruct.herokuapp.com/?q=say/%E4%BD%A0%E7%9F%A5%E9%81%93%E5%85%A8%E4%B8%96%E7%95%8C%E6%9C%80%E7%95%85%E9%94%80%E7%9A%84%E4%B9%A6%E6%98%AF%E5%93%AA%E4%B8%80%E6%9C%AC%E4%B9%A6%E5%90%97%EF%BC%9F</a> Results in your browser should be: <blockquote> <h1>Praise to the Lord!</h1> Praise to the Lord! <i>true</i> <h1>你知道全世界最畅销的书是哪一本书吗?</h1> </blockquote> Explore it -- * Please read more example code in the project. * Also please see this project: https://github.com/m0ver/mobile1.0 http://ingod.asia License -- 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. [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/m0ver/tinystruct2.0/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
0
streamnative/examples
Apache Pulsar examples and demos
apache-pulsar schema
<img src="images/streamnative-logo.png" width="250"> * [Overview](#overview) # Overview This is a curated list of demos that showcase Apache Pulsar® messaging and event streaming capabilities. # Clients - [PubSub Client Examples](clients/README.md) # Cloud - [SteamNative Cloud Examples](cloud/README.md) # Flink - [Pulsar Flink Connector](pulsar-flink/README.md) # Spring for Apache Pulsar - [Spring for Apache Pulsar Example](spring-pulsar/README.md)
0
googleads/googleads-adsense-examples
Samples for the AdSense Management API
null
Samples for the AdSense Management API =========================== The AdSense Management API v2 is [now availble](https://ads-developers.googleblog.com/2021/04/announcing-v2-of-adsense-management-api.html). Updated examples can be found for each language in the top-level `v2` directory. These code samples are organized by language. * *dotnet* is a command-line sample that shows how to make most calls against the API, written in C#. * *java* is a command-line sample that shows how to make most calls against the API, written in Java. * *php* is a set of samples that shows how to make most calls against the API, written in PHP. * *python* is a command-line sample that shows how to make most calls against the API, written in Python. * *ruby* is a set of command-line samples that show how to make most calls against the API, written in Ruby. Please refer to the README.md file inside each directory for installation instructions.
0
in28minutes/MavenIn28Minutes
Maven Tutorial for Beginners with Examples
null
# Maven Tutorial for Beginners - with Examples In28Minutes [![Image](https://www.springboottutorial.com/images/Course-Maven-Tutorial-Manage-Java-Dependencies-in-20-Steps.png "Maven Tutorial - Manage Java Dependencies in 20 Steps")](https://www.udemy.com/course/learn-maven-java-dependency-management-in-20-steps/) ## Installing Eclipse and Java https://github.com/in28minutes/SpringIn28Minutes/blob/master/InstallationGuide-JavaEclipseAndMaven_v2.pdf ## Course Overview - We will use Handson Real World Examples to understand what Maven can do. - We will understand how Maven makes the life of an application developer easy. - We will learn how Maven helps us to automate things like compilation, running unit tests, creating a war, creating an ear, running a web application in tomcat. - We will learn how to use Maven effectively in combination of an IDE like Eclipse. - We will use - Maven for dependency management, building and running the application in tomcat. - Eclipse IDE. ### Step List Lets now look at the steps in this tutorial. - Step 1 to 4 we will learn about the basics of Maven : Project Object Model and Build LifeCycle - Steps 5 and 6 we will learn about dependency management and transitive dependencies - Step 7 we will learn about a maven project with multiple layers. Typical projects have a web layer, data layer, external interface layer. We will learn how to create such projects using maven. Multi Module Maven Project. - Step 8 : We will learn how to create a war, deploy to tomcat. ### Running Examples - If you are downloading the zip file, unzip the file - Open Command Prompt and Change directory to folder containing pom.xml - Run command "mvn tomcat7:run" - For help : user our installation guide - https://github.com/in28minutes/SpringIn28Minutes/blob/master/InstallationGuide-JavaEclipseAndMaven_v2.pdf ### Youtube Video https://courses.in28minutes.com/p/maven-tutorial-for-beginners-in-5-steps # 0. What is Maven? Defining what Maven does is very difficult. ## Every Day Developer Manages Dependencies - Web Layer (Spring MVC), Data Layer (JPA - Hibernate) etc.. Build a jar or a war or an ear Run the application locally - Tomcat or Jetty Deploy to a T environment Add new dependencies to a project Run Unit Tests ## Maven helps us do all these and more... Generate Projects Create Eclipse Workspace # 1. Beginner Maven Project ## What is the power of Maven? #### First Project : My aim is to create a Spring.jar. Think as if you are developing Spring. Some other developers want to use the framework you are developing. Steps in creating a JAr - App.Java -> App.class - AppTest.Java -> AppTest.class - Run Unit Tests - Package in a particular format - Earlier this was done using long tedious ant scripts #### Convention over Configuration - Pre defined folder structure - pom.xml - mvn --version - mvn compile (compiles source files) - mvn test-compile (compiles test files) - one thing to observe is this also compiles source files - mvn clean - deletes target directory - mvn test - run unit tests ## You are ready for theory on Build Life Cycle Pre-defined sequence of steps that are done when we run a maven command. Plugins can be attached to lifecycle stages. Default plugins are already defined in the super pom. mvn install - package - creates the jar - install - copies the created jar to local maven repository - a temp folder on my machine where maven stores the files. ### Build LifeCycle Validate Compile Test Package Integration Test Verify Install Deploy ## Lets understand pom.xml ### Project Object Model (POM) Name (if another project want to refer to our project, how do they do it?) Version (Major Version, Minor Version, Incremental Version) Packaging Dependencies Plugins ### Maven repository stores all the versions of all dependencies. JUnit 4.2,4.3,4.4 ### Local Repository - all the dependencies that are downloaded for 1st time are stored. # 2. Intermediate Maven Project - Transtive Dependencies (add Hibernate dependency) - Exclusions - Add an exclude - Dependency Hierarchy - See how each dependency is coming in - Versions [4.1,] [,4.1] [,4.1) - Scope - Dependencies are needed only for tests. They are not part of the war or jar. we can use scope for that. - Maven Compiler Plugin - Change source from 1.5 to 1.8. - Effective Pom - Super Pom (Similar to Java Inheritance) - Check the build part of super pom (Convention over configuration - defaults are defined). We can change it - for example source directory. Recommended not to override defaults. Easy to move from one project to another project. Definitions of various plugins. mvn help:effective-pom ## Dependency Management Scope Transitive Dependencies Excluding Dependency Dependency Versions ## Sample Project Object Model Maven Plugins Convention over configuration Source Code ${basedir}/src/main/java ${basedir}/src/main/resources Test Code ${basedir}/src/test ## Hierarchy of POMS Super POM # 3. Multi Module Maven Project - Most projects have multiple layers. Each layer has its own dependencies. Also multiple layers may share same dependency. We will see the best practices in managing dependencies in a multi module maven project. - Parent pom has type pom - - Defines Modules - Dependency Management Section - Properties - Pre-defined Variables ${project.version} - Run from command prompt - mvn clean install # 4. Maven Web Application ## Packaging War Ear ## Running application in Tomcat # 5. Tip and Tricks ## Important Commands help:effective-settings help:effective-pom dependency:tree dependency:sources --debug ## Maven Archetypes archetype:generate # 6. Missing (To Discuss) - Plugins : Show in super pom.xml - Eclipse Integration - Profiles ### Expectations - You should know Java. ### Running Examples - Download the zip or clone the Git repository. - Unzip the zip file (if you downloaded one) - Open Command Prompt and Change directory (cd) to folder containing pom.xml - Open Eclipse - File -> Import -> Existing Maven Project -> Navigate to the folder where you unzipped the zip - Select the right project - Choose the Spring Boot Application file (search for @SpringBootApplication) - Right Click on the file and Run as Java Application - You are all Set ### Troubleshooting - Refer our TroubleShooting Guide - https://github.com/in28minutes/in28minutes-initiatives/tree/master/The-in28Minutes-TroubleshootingGuide-And-FAQ ## Youtube Playlists - 500+ Videos [Click here - 30+ Playlists with 500+ Videos on Spring, Spring Boot, REST, Microservices and the Cloud](https://www.youtube.com/user/rithustutorials/playlists?view=1&sort=lad&flow=list) ## Keep Learning in28Minutes in28Minutes is creating amazing solutions for you to learn Spring Boot, Full Stack and the Cloud - Docker, Kubernetes, AWS, React, Angular etc. - [Check out all our courses here](https://github.com/in28minutes/learn)
1
ttrelle/spring-data-examples
Examples for using Spring Data for JPA, MongoDB, Neo4j, Redis
java jpa mongodb neo4j redis spring-data
# Spring Data Blog Series This projects holds the Java source examples for my blog post series on the Spring Data project: * [GridFS Support in Spring Data MongoDB](http://blog.codecentric.de/en/2012/07/gridfs-support-in-spring-data-mongodb/) * [Part 6: Spring Data Redis](http://blog.codecentric.de/en/2012/04/spring-data-redis/) * [Part 5: Spring Data Neo4j](http://blog.codecentric.de/en/2012/02/spring-data-neo4j/) * [Part 4: Geospatial Queries with Spring Data MongoDB](http://blog.codecentric.de/en/2012/02/spring-data-mongodb-geospatial-queries/) * [Part 3: Spring Data MongoDB](http://blog.codecentric.de/en/2012/02/spring-data-mongodb/) * [Part 2: Spring Data JPA](http://blog.codecentric.de/en/2012/01/spring-data-jpa/) * [Part 1: Spring Data Commons](http://blog.codecentric.de/en/2011/12/spring-data-commons/) ## Build Status @ Travis CI ## [![Build Status](https://travis-ci.org/ttrelle/spring-data-examples.png?branch=master)](https://travis-ci.org/ttrelle/spring-data-examples) ## Usage The projects are using a Maven based build. To run the tests on the command line use mvn clean test If you want to use an IDE like Eclipse run mvn eclipse:eclipse and set the Eclipse variable M2_REPO pointing to your local Maven repository. Or just import the project as an existing Maven project if you are using the m2 plugin.
0
resteasy/resteasy-examples
RESTEasy examples
null
null
0
aliyun/tablestore-examples
Example code for aliyun tablestore.
null
# Aliyun TableStore Examples [![License Status](https://img.shields.io/badge/license-apache2-brightgreen.svg)](https://travis-ci.org/aliyun/aliyun-tablestore-nodejs-sdk) ## [Click here for the English README](README_EN.md) **目录** - [1、项目结构](#1%E9%A1%B9%E7%9B%AE%E7%BB%93%E6%9E%84) - [2、开通与配置](#2%E5%BC%80%E9%80%9A%E4%B8%8E%E9%85%8D%E7%BD%AE) - [开通服务、创建实例、获取AK](#%E5%BC%80%E9%80%9A%E6%9C%8D%E5%8A%A1%E5%88%9B%E5%BB%BA%E5%AE%9E%E4%BE%8B%E8%8E%B7%E5%8F%96ak) - [完成配置](#%E5%AE%8C%E6%88%90%E9%85%8D%E7%BD%AE) - [3、样例统计](#3%E6%A0%B7%E4%BE%8B%E7%BB%9F%E8%AE%A1) - [demos(场景样例)](#demos%E5%9C%BA%E6%99%AF%E6%A0%B7%E4%BE%8B) - [tools(迁移、计算等工具)](#tools%E8%BF%81%E7%A7%BB%E8%AE%A1%E7%AE%97%E7%AD%89%E5%B7%A5%E5%85%B7) - [feature(SDK基础功能)](#featuresdk%E5%9F%BA%E7%A1%80%E5%8A%9F%E8%83%BD) - [4、使用提醒](#4%E4%BD%BF%E7%94%A8%E6%8F%90%E9%86%92) - [资源释放](#%E8%B5%84%E6%BA%90%E9%87%8A%E6%94%BE) - [5、咨询/答疑/反馈](#5%E5%92%A8%E8%AF%A2%E7%AD%94%E7%96%91%E5%8F%8D%E9%A6%88) - [联系方式:](#%E8%81%94%E7%B3%BB%E6%96%B9%E5%BC%8F) # 1、项目结构 - 根据功能,分为3个模块(场景样例/迁移、计算等工具/SDK基础功能), - 每个项目名下对应独立的Example项目 ``` ├── README.md ├── demos #场景样例 │   ├── IMChart #即时聊天系统 │   ├── SharingCarManagement #共享汽车管理 │   ├── SportTrack #运动轨迹 │   ├── insurance-policy-management #保险单管理系统 │   ├── TraceMedicine #药品监管(溯源)系统 │   ├── TableStore-Grid #气象格点数据解决方案 │   ├── MailManagement #基于Timestream的快递轨迹管理 │   ├── WifiMonitor #基于Timestream的Wifi监控系统 │  ├── Orders #基于 MySQL + Tablestore 分层存储的大规模订单系统系列测试代码 │ └── Canal-press #基于 MySQL + Tablestore 分层存储的大规模订单系统系列中canal部分压测代码 │ ├── tools #工具/产品 │   ├── Dts-MySQL2TableStore #MySQL增量数据迁移表格存储 │   └── Datax-MySQL2TableStore #MySQL数据迁移表格存储 │ └── feature #SDK基础功能    ├── TableCopy #数据复制(表级别)    ├── FuzzySearch #模糊查询    └── AggregationAndGroupBy #统计聚合 ``` # 2、开通与配置 ## 开通服务、创建实例、获取AK - [控制台](https://ots.console.aliyun.com): https://ots.console.aliyun.com - [开通服务](https://help.aliyun.com/document_detail/27287.html): https://help.aliyun.com/document_detail/27287.html - [创建实例](https://help.aliyun.com/document_detail/55211.html): https://help.aliyun.com/document_detail/55211.html - [获取AK](https://usercenter.console.aliyun.com/#/manage/ak): https://usercenter.console.aliyun.com/#/manage/ak ## 完成配置 在home目录下创建tablestoreCong.json文件,填写相应参数,所有独立项目都会使用该配置 ``` # mac 或 linux系统下:/home/userhome/tablestoreConf.json # windows系统下: C:\Documents and Settings\%用户名%\tablestoreConf.json { "endpoint": "http://instanceName.cn-hangzhou.ots.aliyuncs.com", "accessId": "***********", "accessKey": "***********************", "instanceName": "instanceName" } ``` - endpoint:实例的接入地址,控制台实例详情页获取; - accessId:AK的ID,获取AK链接提供; - accessKey:AK的密码,获取AK链接提供; - instanceName:使用的实例名; # 3、项目统计 ## [demos(场景样例)](/demos) 样例 | 语言 | 项目名 --- | --- | --- 基于 MySQL + Tablestore 分层存储架构的大规模订单系统实践-架构篇 | java | [Orders](/demos/Orders) 基于 MySQL + Tablestore 分层存储架构的大规模订单系统实践-数据同步 Canal 篇 | java | [Canal-press](/demos/Canal-press) [即时聊天系统](https://yq.aliyun.com/articles/710363) | java | [IMChart](/demos/ImChart) [共享汽车管理](https://yq.aliyun.com/articles/703177) | java | [SharingCarManagement](/demos/SharingCarManagement) [运动轨迹管理](https://yq.aliyun.com/articles/702482) | java | [SportTrack](/demos/SportTrack) [保险单管理系统](https://yq.aliyun.com/articles/699669) | java | [insurance-policy-management](/demos/insurance-policy-management) [药品监管(溯源)系统](https://yq.aliyun.com/articles/699636) | java | [TraceMedicine](/demos/TraceMedicine) [气象格点数据解决方案](https://yq.aliyun.com/articles/698313) | java | [TableStore-Grid](/demos/TableStore-Grid) [基于Timestream的Wifi监控系统](https://yq.aliyun.com/articles/698591) | java | [WifiMonitor](/demos/WifiMonitor) [基于Timestream的快递轨迹管理](https://yq.aliyun.com/articles/698551) | java | [MailManagement](/demos/MailManagement) ## tools(迁移、计算等工具) 场景 | 工具 | 项目名 --- | --- | --- [MySQL数据迁移表格存储](https://yq.aliyun.com/articles/698973) | datax | [Datax-MySQL2TableStore](/tools/Datax-MySQL2TableStore) [MySQL增量数据导入表格存储](https://yq.aliyun.com/articles/708325) | DTS | [Dts-MySQL2TableStore](/tools/Dts-MySQL2TableStore) ## feature(Tablestore功能) 功能 | 语言(SDK) | 项目名 --- | --- | --- [表级别数据复制](https://yq.aliyun.com/articles/706791) | java | [TableCopy](/feature/TableCopy) [模糊查询](https://yq.aliyun.com/articles/703707) | java | [FuzzySearch](/feature/FuzzySearch) 统计聚合 | java | [AggregationAndGroupBy](/feature/AggregationAndGroupBy) [Tablestore Spark Demo](/feature/TableStoreSparkDemo/README.md) | scala | [TableStoreSparkDemo](/feature/TableStoreSparkDemo) ## basic(SDK基础使用) 功能 | 语言(SDK) | 项目名 --- | --- | --- 基础使用 | java | [Java SDK 使用](/basic/Java) # 4、使用提醒 ## 资源释放 - 删除无用索引、无用数据、无用表格等 - 释放相应资源,避免持续收费 # 5、咨询/答疑/反馈 ## 联系方式: - 钉钉群: 表格存储技术交流群-2 - 群号: 23307953 - 二维码: ![二维码](image/QRcode.png)
1
swagger-api/swagger-core
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
java open-source openapi openapi-specification openapi3 rest rest-api swagger swagger-api swagger-oss
# Swagger Core <img src="https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SW-logo-clr.png" height="50" align="right"> **NOTE:** If you're looking for Swagger Core 1.5.X and OpenAPI 2.0, please refer to [1.5 branch](https://github.com/swagger-api/swagger-core/tree/1.5). **NOTE:** Since version 2.1.7, Swagger Core also supports the Jakarta namespace. There are a parallel set of artifacts with the `-jakarta` suffix, providing the same functionality as the unsuffixed (i.e.: `javax`) artifacts. Please see the [Wiki](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) for more details. **NOTE:** Since version 2.2.0 Swagger Core supports OpenAPI 3.1; see [this page](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1) for details ![Build Test Deploy](https://github.com/swagger-api/swagger-core/workflows/Build%20Test%20Deploy%20master/badge.svg?branch=master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.swagger.core.v3/swagger-project/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/io.swagger.core.v3/swagger-project) Swagger Core is a Java implementation of the OpenAPI Specification. Current version supports *JAX-RS2* (`javax` and `jakarta` namespaces). ## Get started with Swagger Core! See the guide on [getting started with Swagger Core](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) to get started with adding Swagger to your API. ## See the Wiki! The [github wiki](https://github.com/swagger-api/swagger-core/wiki) contains documentation, samples, contributions, etc. Start there. ## Compatibility The OpenAPI Specification has undergone several revisions since initial creation in 2010. The Swagger Core project has the following compatibilities with the OpenAPI Specification: Swagger core Version | Release Date | OpenAPI Spec compatibility | Notes | Status ------------------------- | ------------ | -------------------------- | ----- | ---- 2.2.21 (**current stable**)| 2024-03-20 | 3.x | [tag v2.2.21](https://github.com/swagger-api/swagger-core/tree/v2.2.21) | Supported 2.2.20 | 2023-12-19 | 3.x | [tag v2.2.20](https://github.com/swagger-api/swagger-core/tree/v2.2.20) | Supported 2.2.19 | 2023-11-10 | 3.x | [tag v2.2.19](https://github.com/swagger-api/swagger-core/tree/v2.2.19) | Supported 2.2.18 | 2023-10-25 | 3.x | [tag v2.2.18](https://github.com/swagger-api/swagger-core/tree/v2.2.18) | Supported 2.2.17 | 2023-10-12 | 3.x | [tag v2.2.17](https://github.com/swagger-api/swagger-core/tree/v2.2.17) | Supported 2.2.16 | 2023-09-18 | 3.x | [tag v2.2.16](https://github.com/swagger-api/swagger-core/tree/v2.2.16) | Supported 2.2.15 | 2023-07-08 | 3.x | [tag v2.2.15](https://github.com/swagger-api/swagger-core/tree/v2.2.15) | Supported 2.2.14 | 2023-06-26 | 3.x | [tag v2.2.14](https://github.com/swagger-api/swagger-core/tree/v2.2.14) | Supported 2.2.13 | 2023-06-24 | 3.x | [tag v2.2.13](https://github.com/swagger-api/swagger-core/tree/v2.2.13) | Supported 2.2.12 | 2023-06-13 | 3.x | [tag v2.2.12](https://github.com/swagger-api/swagger-core/tree/v2.2.12) | Supported 2.2.11 | 2023-06-01 | 3.x | [tag v2.2.11](https://github.com/swagger-api/swagger-core/tree/v2.2.11) | Supported 2.2.10 | 2023-05-15 | 3.x | [tag v2.2.10](https://github.com/swagger-api/swagger-core/tree/v2.2.10) | Supported 2.2.9 | 2023-03-20 | 3.x | [tag v2.2.9](https://github.com/swagger-api/swagger-core/tree/v2.2.9) | Supported 2.2.8 | 2023-01-06 | 3.x | [tag v2.2.8](https://github.com/swagger-api/swagger-core/tree/v2.2.8) | Supported 2.2.7 | 2022-11-15 | 3.0 | [tag v2.2.7](https://github.com/swagger-api/swagger-core/tree/v2.2.7) | Supported 2.2.6 | 2022-11-02 | 3.0 | [tag v2.2.6](https://github.com/swagger-api/swagger-core/tree/v2.2.6) | Supported 2.2.5 | 2022-11-02 | 3.0 | [tag v2.2.5](https://github.com/swagger-api/swagger-core/tree/v2.2.5) | Supported 2.2.4 | 2022-10-16 | 3.0 | [tag v2.2.4](https://github.com/swagger-api/swagger-core/tree/v2.2.4) | Supported 2.2.3 | 2022-09-27 | 3.0 | [tag v2.2.3](https://github.com/swagger-api/swagger-core/tree/v2.2.3) | Supported 2.2.2 | 2022-07-20 | 3.0 | [tag v2.2.2](https://github.com/swagger-api/swagger-core/tree/v2.2.2) | Supported 2.2.1 | 2022-06-15 | 3.0 | [tag v2.2.1](https://github.com/swagger-api/swagger-core/tree/v2.2.1) | Supported 2.2.0 | 2022-04-04 | 3.0 | [tag v2.2.0](https://github.com/swagger-api/swagger-core/tree/v2.2.0) | Supported 2.1.13 | 2022-02-07 | 3.0 | [tag v2.1.13](https://github.com/swagger-api/swagger-core/tree/v2.1.13) | Supported 2.1.12 | 2021-12-23 | 3.0 | [tag v2.1.12](https://github.com/swagger-api/swagger-core/tree/v2.1.12) | Supported 2.1.11 | 2021-09-29 | 3.0 | [tag v2.1.11](https://github.com/swagger-api/swagger-core/tree/v2.1.11) | Supported 2.1.10 | 2021-06-28 | 3.0 | [tag v2.1.10](https://github.com/swagger-api/swagger-core/tree/v2.1.10) | Supported 2.1.9 | 2021-04-20 | 3.0 | [tag v2.1.9](https://github.com/swagger-api/swagger-core/tree/v2.1.9) | Supported 2.1.8 | 2021-04-18 | 3.0 | [tag v2.1.8](https://github.com/swagger-api/swagger-core/tree/v2.1.8) | Supported 2.1.7 | 2021-02-18 | 3.0 | [tag v2.1.7](https://github.com/swagger-api/swagger-core/tree/v2.1.7) | Supported 2.1.6 | 2020-12-04 | 3.0 | [tag v2.1.6](https://github.com/swagger-api/swagger-core/tree/v2.1.6) | Supported 2.1.5 | 2020-10-01 | 3.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-core/tree/v2.1.5) | Supported 2.1.4 | 2020-07-24 | 3.0 | [tag v2.1.4](https://github.com/swagger-api/swagger-core/tree/v2.1.4) | Supported 2.1.3 | 2020-06-27 | 3.0 | [tag v2.1.3](https://github.com/swagger-api/swagger-core/tree/v2.1.3) | Supported 2.1.2 | 2020-04-01 | 3.0 | [tag v2.1.2](https://github.com/swagger-api/swagger-core/tree/v2.1.2) | Supported 2.1.1 | 2020-01-02 | 3.0 | [tag v2.1.1](https://github.com/swagger-api/swagger-core/tree/v2.1.1) | Supported 2.1.0 | 2019-11-16 | 3.0 | [tag v2.1.0](https://github.com/swagger-api/swagger-core/tree/v2.1.0) | Supported 2.0.10 | 2019-10-11 | 3.0 | [tag v2.0.10](https://github.com/swagger-api/swagger-core/tree/v2.0.10) | Supported 2.0.9 | 2019-08-22 | 3.0 | [tag v2.0.9](https://github.com/swagger-api/swagger-core/tree/v2.0.9) | Supported 2.0.8 | 2019-04-24 | 3.0 | [tag v2.0.8](https://github.com/swagger-api/swagger-core/tree/v2.0.8) | Supported 2.0.7 | 2019-02-18 | 3.0 | [tag v2.0.7](https://github.com/swagger-api/swagger-core/tree/v2.0.7) | Supported 2.0.6 | 2018-11-27 | 3.0 | [tag v2.0.6](https://github.com/swagger-api/swagger-core/tree/v2.0.6) | Supported 2.0.5 | 2018-09-19 | 3.0 | [tag v2.0.5](https://github.com/swagger-api/swagger-core/tree/v2.0.5) | Supported 2.0.4 | 2018-09-05 | 3.0 | [tag v2.0.4](https://github.com/swagger-api/swagger-core/tree/v2.0.4) | Supported 2.0.3 | 2018-08-09 | 3.0 | [tag v2.0.3](https://github.com/swagger-api/swagger-core/tree/v2.0.3) | Supported 1.6.14 (**current stable**)| 2024-03-19 | 2.0 | [tag v1.6.14](https://github.com/swagger-api/swagger-core/tree/v1.6.14) | Supported 1.6.13 | 2024-01-26 | 2.0 | [tag v1.6.13](https://github.com/swagger-api/swagger-core/tree/v1.6.13) | Supported 1.6.12 | 2023-10-14 | 2.0 | [tag v1.6.12](https://github.com/swagger-api/swagger-core/tree/v1.6.12) | Supported 1.6.11 | 2023-05-15 | 2.0 | [tag v1.6.11](https://github.com/swagger-api/swagger-core/tree/v1.6.11) | Supported 1.6.10 | 2023-03-21 | 2.0 | [tag v1.6.10](https://github.com/swagger-api/swagger-core/tree/v1.6.10) | Supported 1.6.9 | 2022-11-15 | 2.0 | [tag v1.6.9](https://github.com/swagger-api/swagger-core/tree/v1.6.9) | Supported 1.6.8 | 2022-10-16 | 2.0 | [tag v1.6.8](https://github.com/swagger-api/swagger-core/tree/v1.6.8) | Supported 1.6.7 | 2022-09-27 | 2.0 | [tag v1.6.7](https://github.com/swagger-api/swagger-core/tree/v1.6.7) | Supported 1.6.6 | 2022-04-04 | 2.0 | [tag v1.6.6](https://github.com/swagger-api/swagger-core/tree/v1.6.6) | Supported 1.6.5 | 2022-02-07 | 2.0 | [tag v1.6.5](https://github.com/swagger-api/swagger-core/tree/v1.6.5) | Supported 1.6.4 | 2021-12-23 | 2.0 | [tag v1.6.4](https://github.com/swagger-api/swagger-core/tree/v1.6.4) | Supported 1.6.3 | 2021-09-29 | 2.0 | [tag v1.6.3](https://github.com/swagger-api/swagger-core/tree/v1.6.3) | Supported 1.6.2 | 2020-07-01 | 2.0 | [tag v1.6.2](https://github.com/swagger-api/swagger-core/tree/v1.6.2) | Supported 1.6.1 | 2020-04-01 | 2.0 | [tag v1.6.1](https://github.com/swagger-api/swagger-core/tree/v1.6.1) | Supported 1.6.0 | 2019-11-16 | 2.0 | [tag v1.6.0](https://github.com/swagger-api/swagger-core/tree/v1.6.0) | Supported 1.5.24 | 2019-10-11 | 2.0 | [tag v1.5.24](https://github.com/swagger-api/swagger-core/tree/v1.5.24) | Supported 1.5.23 | 2019-08-22 | 2.0 | [tag v1.5.23](https://github.com/swagger-api/swagger-core/tree/v1.5.23) | Supported 1.5.22 | 2019-02-18 | 2.0 | [tag v1.5.22](https://github.com/swagger-api/swagger-core/tree/v1.5.22) | Supported 1.5.21 | 2018-08-09 | 2.0 | [tag v1.5.21](https://github.com/swagger-api/swagger-core/tree/v1.5.21) | Supported 1.5.20 | 2018-05-23 | 2.0 | [tag v1.5.20](https://github.com/swagger-api/swagger-core/tree/v1.5.20) | Supported 2.0.2 | 2018-05-23 | 3.0 | [tag v2.0.2](https://github.com/swagger-api/swagger-core/tree/v2.0.2) | Supported 2.0.1 | 2018-04-16 | 3.0 | [tag v2.0.1](https://github.com/swagger-api/swagger-core/tree/v2.0.1) | Supported 1.5.19 | 2018-04-16 | 2.0 | [tag v1.5.19](https://github.com/swagger-api/swagger-core/tree/v1.5.19) | Supported 2.0.0 | 2018-03-20 | 3.0 | [tag v2.0.0](https://github.com/swagger-api/swagger-core/tree/v2.0.0) | Supported 2.0.0-rc4 | 2018-01-22 | 3.0 | [tag v2.0.0-rc4](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc4) | Supported 2.0.0-rc3 | 2017-11-21 | 3.0 | [tag v2.0.0-rc3](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc3) | Supported 2.0.0-rc2 | 2017-09-29 | 3.0 | [tag v2.0.0-rc2](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc2) | Supported 2.0.0-rc1 | 2017-08-17 | 3.0 | [tag v2.0.0-rc1](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc1) | Supported 1.5.18 | 2018-01-22 | 2.0 | [tag v1.5.18](https://github.com/swagger-api/swagger-core/tree/v1.5.18) | Supported 1.5.17 | 2017-11-21 | 2.0 | [tag v1.5.17](https://github.com/swagger-api/swagger-core/tree/v1.5.17) | Supported 1.5.16 | 2017-07-15 | 2.0 | [tag v1.5.16](https://github.com/swagger-api/swagger-core/tree/v1.5.16) | Supported 1.3.12 | 2014-12-23 | 1.2 | [tag v1.3.12](https://github.com/swagger-api/swagger-core/tree/v1.3.12) | Supported 1.2.4 | 2013-06-19 | 1.1 | [tag swagger-project_2.10.0-1.2.4](https://github.com/swagger-api/swagger-core/tree/swagger-project_2.10.0-1.2.4) | Deprecated 1.0.0 | 2011-10-16 | 1.0 | [tag v1.0](https://github.com/swagger-api/swagger-core/tree/v1.0) | Deprecated ### Change History If you're interested in the change history of swagger and the Swagger Core framework, see [here](https://github.com/swagger-api/swagger-core/releases). ### Prerequisites You need the following installed and available in your $PATH: * Java 11 * Apache maven 3.0.4 or greater * Jackson 2.4.5 or greater ### To build from source (currently 2.2.22-SNAPSHOT) ``` # first time building locally mvn -N ``` Subsequent builds: ``` mvn install ``` This will build the modules. Of course if you don't want to build locally you can grab artifacts from maven central: `https://repo1.maven.org/maven2/io/swagger/core/` ## Sample Apps The samples have moved to [a new repository](https://github.com/swagger-api/swagger-samples/tree/2.0) and contain various integrations and configurations. ## Security contact Please disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.
0
eazybytes/microservices-with-spring-sectionwise-code
Microservices With Spring, Docker, Kubernetes - Code Examples
docker docker-compose java kubernetes microservices spring spring-boot spring-cloud
# This repo belongs to older version of the course. For the current version of the microservice course, please use below GitHub repo, https://github.com/eazybytes/microservices
0
HaydiKodlayalim/spring-examples
SpringBoot Examples
aop elasticsearch graphql java jwt-token mongodb postgresql rabbitmq spring-aop spring-data spring-data-jpa spring-security springboot swagger2
null
0
write2munish/Akka-Essentials
Java/Scala Examples from the book - Akka Essentials
actors akka java remote-actors scala supervisor testkit
Akka Essentials (refer http://akka-essentials.blogspot.com/ for more details) [![Build Status](https://api.travis-ci.org/write2munish/Akka-Essentials.png)](https://api.travis-ci.org/write2munish/Akka-Essentials) You will find examples of Akka in Java & Scala, talking of one concept along with a problem solved ClientServerExample : This example demonstrates how the remote actors works in a client / server mode. The client sends the message to the server and server replies back to the client. The example also demonstrates various methods of creating remote actor references on the client side. LoadGeneratorExample : This example generates 10 million messages and calculates the time it takes to process them. The program demonstrated the Routing concept where a roundrobinrouter is used to distribute the load on to a set of workers WordCountMapReduce : This examples implements the Word Count Map Reduce model. The client system reads a text file and sends each line of text as a message to the Server. The server reads the line, maps the words, reduces the words and finally does an inmemory aggregation of the result. The example also implemented a prioritymailbox, which is used to segregate the message requests between the mapreduce requests and getting the list of results from the aggregate actor GridPatternExample : Grid Computing pattern is where a control node distributes the work to other nodes. Idea is to make use of the nodes on the network for their computing power. It is analogous to Master Slave Pattern with certain differences. The idea behind the Master Slave pattern is to partition the work into identical sub tasks which are then delegated to Slaves. The example demonstrates how an WorkerActor system sends a request for registration. The RegisterRemoteWorker recieves the request and forwards the same to JobController where the RoundRobinRouter is updated for the new worker information. The WorkScheduler sends a periodic request to JobController, who then sends packets to all the registered worker actors. AkkaSerializableExample : Akka by default supports 2 serializer options - java and protobuf. In addition, Akka provides an API to write you owns serializable. In this example, i have used google gson library to convert your value object into json string representation which is then converted to bytes and transported across the wire AkkaSupervisorExample : Akka provides two supervisor strategies - One-For-One or All-For-One that are used to monitor the actors and build the fault tolerance in the actor model. There are 3 examples that demonstrate the strategies and their usage. In addition, the java section has unit testing code also for testing your supervisor code AkkaWithZeroMQ - Akka provides native support for ZeroMQ libraries and provide different connectors (Pub-Sub, Req-Rep,Router-Dealer and Pull-Push). There are four examples that demonstrated their usage AkkaUnitTest : Unit testing toolkit is provided via TestKit in Akka. The scala side of unit testing is well covered. For java, TestKit provides limited constructs. The various examples implemented by Ray Roestenburg have ported to Java world, with couple of more scenario's added. This can be good starting point for Java programmers to start unit testing their actors AkkaPersistentExample : Akka provides persistent model for stateful actors. The example uses a simple example of Integer (which carries the ) and operations (ADD, SUBTRACT, MULTIPLY, DIVIDE) along with operand acts on the state object
0
saturnism/grpc-by-example-java
A collection of useful/essential gRPC Java Examples
containers distributed-tracing docker examples grpc grpc-java java java8 jpa kubernetes prometheus rxjava rxjava2 spring-boot stream zipkin
gRPC Java Examples ================== This is a collection of Java gRPC examples. This is not official Google product. [YouTube video](https://www.youtube.com/watch?v=xpmFhTMqWhc)
0
ebean-orm/examples
Example use Ebean with Maven, Gradle, Java and Kotlin
null
# examples Examples using Ebean with Maven, Gradle, Java and Kotlin <table> <tr> <td>base-example</td> <td>A basic maven Java8 example</td> </tr> <tr> <td>basic-gradle-java</td> <td>Gradle5 Java8 example</td> </tr> <tr> <td>basic-gradle-kotlin</td> <td>Gradle5 Kotlin example. Includes Kotlin query bean generation.</td> </tr> </table>
1
hamvocke/spring-testing
A Spring Boot application with lots of test examples
microservices spring spring-boot spring-test tdd test-automation test-microservices test-pyramid testing
# The Practical Test Pyramid: Spring Boot Edition [![Build Status](https://circleci.com/gh/hamvocke/spring-testing/tree/master.svg?style=svg)](https://circleci.com/gh/hamvocke/spring-testing/tree/master) This repository contains a *Spring Boot* application with lots of test examples on different levels of the [Test Pyramid](https://martinfowler.com/bliki/TestPyramid.html). It shows an opinionated way to thoroughly test your spring application by demonstrating different types and levels of testing. You will find that some of the tests are duplicated along the test pyramid -- concepts that have already been tested in lower-level tests will be tested in more high-level tests. This contradicts the premise of the test pyramid. In this case it helps demonstrating different kinds of tests which is the main goal of this repository. ## Read the Blog Post This repository is part of a [blog posts](https://martinfowler.com/articles/practical-test-pyramid.html) I wrote about test automation and the test pyramid. I highly recommend you read it to get a better feeling for the purpose of the different kinds of tests in this repository and how you can implement a reliable test suite for a Spring Boot application. ## Get started ### 1. Set an API Key as Environment Variable In order to run the service, you need to set the `WEATHER_API_KEY` environment variable to a valid API key retrieved from ~~darksky.net~~ [openweathermap.org](https://openweathermap.org/). _Note: in a previous version this example used darksky.net as the weather API. Since they've shut down their API for public access, we've since switched over to openweathermap.org_ A simple way is to rename the `env.sample` file to `.env`, fill in your API key from _openweathermap.org_ and source it before running your application: ```bash source .env ``` ### 2. Start a PostgreSQL database The easiest way is to use the provided `startDatabase.sh` script. This script starts a Docker container which contains a database with the following configuration: * port: `15432` * username: `testuser` * password: `password` * database name: `postgres` If you don't want to use the script make sure to have a database with the same configuration or modify your `application.properties`. ### 3. Run the Application Once you've provided the API key and started a PostgreSQL database you can run the application using ```bash ./gradlew bootRun ``` The application will start on port `8080` so you can send a sample request to `http://localhost:8080/hello` to see if you're up and running. ## Application Architecture ``` ╭┄┄┄┄┄┄┄╮ ┌──────────┐ ┌──────────┐ ┆ ☁ ┆ ←→ │ ☕ │ ←→ │ 💾 │ ┆ Web ┆ HTTP │ Spring │ │ Database │ ╰┄┄┄┄┄┄┄╯ │ Service │ └──────────┘ └──────────┘ ↑ JSON/HTTP ↓ ┌──────────┐ │ ☁ │ │ Weather │ │ API │ └──────────┘ ``` The sample application is almost as easy as it gets. It stores `Person`s in an in-memory database (using _Spring Data_) and provides a _REST_ interface with three endpoints: * `GET /hello`: Returns _"Hello World!"_. Always. * `GET /hello/{lastname}`: Looks up the person with `lastname` as its last name and returns _"Hello {Firstname} {Lastname}"_ if that person is found. * `GET /weather`: Calls a downstream [weather API](https://openweathermap.org/current#name) via HTTP and returns a summary for the current weather conditions in Hamburg, Germany ### Internal Architecture The **Spring Service** itself has a pretty common internal architecture: * `Controller` classes provide _REST_ endpoints and deal with _HTTP_ requests and responses * `Repository` classes interface with the _database_ and take care of writing and reading data to/from persistent storage * `Client` classes talk to other APIs, in our case it fetches _JSON_ via _HTTP_ from the openweathermap.org weather API ``` Request ┌────────── Spring Service ───────────┐ ─────────→ ┌─────────────┐ ┌─────────────┐ │ ┌─────────────┐ ←───────── │ Controller │ ←→ │ Repository │←──→ │ Database │ Response │ └─────────────┘ └─────────────┘ │ └─────────────┘ │ ↓ │ │ ┌──────────┐ │ │ │ Client │ │ │ └──────────┘ │ └─────────│───────────────────────────┘ │ ↓ ┌──────────┐ │ ☁ │ │ Weather │ │ API │ └──────────┘ ``` ## Test Layers The example applicationn shows different test layers according to the [Test Pyramid](https://martinfowler.com/bliki/TestPyramid.html). ``` ╱╲ End-to-End ╱────╲ ╱ Inte-╲ ╱ gration╲ ╱──────────╲ ╱ Unit ╲ ────────────── ``` The base of the pyramid is made up of unit tests. They should make the biggest part of your automated test suite. The next layer, integration tests, test all places where your application serializes or deserializes data. Your service's REST API, Repositories or calling third-party services are good examples. This codebase contains example for all of these tests. ``` ╭┄┄┄┄┄┄┄╮ ┌──────────┐ ┌──────────┐ ┆ ☁ ┆ ←→ │ ☕ │ ←→ │ 💾 │ ┆ Web ┆ │ Spring │ │ Database │ ╰┄┄┄┄┄┄┄╯ │ Service │ └──────────┘ └──────────┘ │ Controller │ Repository │ └─── Integration ───┴──── Integration ─────┘ │ │ └────────────── Acceptance ────────────────┘ ``` ``` ┌─────────┐ ─┐ │ ☁ │ │ │ Weather │ │ │ API │ │ │ Stub │ │ └─────────┘ │ Client ↑ │ Integration ↓ │ Test ┌──────────┐ │ │ ☕ │ │ │ Spring │ │ │ Service │ │ └──────────┘ ─┘ ``` ## Tools You can find lots of different tools, frameworks and libraries being used in the different examples: * **Spring Boot**: application framework * **JUnit**: test runner * **Hamcrest Matchers**: assertions * **Mockito**: test doubles (mocks, stubs) * **MockMVC**: testing Spring MVC controllers * **RestAssured**: testing the service end to end via HTTP * **Wiremock**: provide HTTP stubs for downstream services
0
rathboma/hadoop-framework-examples
An implementation of a real-world map-reduce workflow in each major framework.
null
# Realistic Hadoop Data Processing Examples This code is to accompany [my blog post on map reduce frameworks][1] The point of the code in this repository is to provide an implementation for a business question (listed below) in each of the major Map Reduce frameworks. Each implementation will get it's own subdirectory with it's own build and running instructions. Each framework will also get an accompanying test, and an in-depth walkthrough about implementation details. The following implementations are complete: * Java map reduce - [walkthrough](http://blog.matthewrathbone.com/2013/02/09/real-world-hadoop-implementing-a-left-outer-join-in-hadoop-map-reduce.html) * Scoobi - [walkthrough](http://blog.matthewrathbone.com/2013/11/03/real-world-hadoop---implementing-a-left-outer-join-with-scoobi.html) * Scalding - [walkthrough](http://blog.matthewrathbone.com/2015/10/20/2015-10-20-scalding-tutorial.html) * Cascading - [walkthrough](http://blog.matthewrathbone.com/2015/06/25/real-world-hadoop---implementing-a-left-outer-join-in-java-with-cascading.html) * Hive - [walkthrough](http://blog.matthewrathbone.com/2013/02/20/real-world-hadoop---implementing-a-left-outer-join-in-hive.html) * Pig - [walkthrough](http://blog.matthewrathbone.com/2013/04/07/real-world-hadoop---implementing-a-left-outer-join-in-pig.html) ## The problem ### The Data We have two datasets: customers, and transactions. Customer Fields: * id (1) * email (matthew@example.com) * language (EN) * location (US) Transaction Fields: * transaction-id (1) * product-id (1) * user-id (1) * purchase-amount (19.99) * product-description (a rubber chicken) These two datasets are stored in tab-delimited files somewhere on HDFS. ### The Question For each product, we want to know the number of locations in which that product was purchased. That's it! In the real world, we might have other questions, like the number of purchases per location for each product. [1]: http://blog.matthewrathbone.com/post/39783477991/a-quick-guide-to-hadoop-map-reduce-frameworks [2]: https://github.com/rathboma/hadoop-framework-examples/tree/master/java-mapreduce
0
chanjarster/spring-test-examples
Spring、Spring Boot和TestNG测试指南
null
# Spring、Spring Boot和TestNG测试指南 Spring、Spring Boot都提供了非常便利的测试工具,但遗憾的是官方文档的大多数例子都是基于JUnit的。本人比较喜欢用TestNG做单元、集成测试,所以开启了本项目收集了在Spring、Spring Boot项目中利用TestNG测试的例子。 ## 章节列表 1. [Chapter 0: 基本概念][chapter_0_concept] 1. Chapter 1: 基本用法 1. [引言][chapter_1_intro] 1. [认识TestNG][chapter_1_s1_testng] 1. [使用Spring Testing工具][chapter_1_s2_spring_testing] 1. [使用Spring Boot Testing工具][chapter_1_s3_spring_boot_testing] 1. Chapter 2: Annotations 1. [引言][chapter_2_intro] 1. [@TestPropertySource][chapter_2_s1_test_property_source] 1. [@ActiveProfile][chapter_2_s2_active_profile] 1. [@JsonTest][chapter_2_s3_json_test] 1. [@OverrideAutoConfiguration][chapter_2_s4_override_auto_configuration] 1. [@TestConfiguration][chapter_2_s5_test_configuration] 1. [Chapter 3: 使用Mockito][chapter_3_mockito] 1. Chapter 4: 测试关系型数据库 1. [基本做法][chapter_4_s1_basic] 1. [使用Docker创建临时数据库][chapter_4_s2_using_docker] 1. [Chapter 5: 测试Spring MVC][chapter_5_mvc] 1. [Chapter 6: 测试AOP][chapter_6_aop] 1. [Chapter 7: 测试@Configuration][chapter_7_configuration] 1. [Chapter 8: 共享测试配置][chapter_8_share_test_config] 1. [附录I Spring Mock Objects][appendix_i] 1. [附录II Spring Test Utils][appendix_ii] [doc-spring-test-utils]: http://docs.spring.io/spring/docs/4.3.9.RELEASE/spring-framework-reference/htmlsingle/#unit-testing-support-classes [chapter_0_concept]: chapter_0_concept.md [chapter_1_intro]: chapter_1_intro.md [chapter_1_s1_testng]: chapter_1_s1_testng.md [chapter_1_s2_spring_testing]: chapter_1_s2_spring_testing.md [chapter_1_s3_spring_boot_testing]: chapter_1_s3_spring_boot_testing.md [chapter_2_intro]: chapter_2_intro.md [chapter_2_s1_test_property_source]: chapter_2_s1_test_property_source.md [chapter_2_s2_active_profile]: chapter_2_s2_active_profile.md [chapter_2_s3_json_test]: chapter_2_s3_json_test.md [chapter_2_s4_override_auto_configuration]: chapter_2_s4_override_auto_configuration.md [chapter_2_s5_test_configuration]: chapter_2_s5_test_configuration.md [chapter_3_mockito]: chapter_3_mockito.md [chapter_4_s1_basic]: chapter_4_s1_basic.md [chapter_4_s2_using_docker]: chapter_4_s2_using_docker.md [chapter_5_mvc]: chapter_5_mvc.md [chapter_6_aop]: chapter_6_aop.md [chapter_7_configuration]: chapter_7_configuration.md [chapter_8_share_test_config]: chapter_8_share_test_config.md [appendix_i]: appendix_i.md [appendix_ii]: appendix_ii.md
0
laolunsi/spring-boot-examples
:green_salad:​ Spring/SpringBoot/SpringCloud 实践学习案例,从入门到精通,持续更新中,欢迎交流学习:beer: !
alibaba-cloud blog elasticsearch gateway java mail nacos rabbitmq redis spring spring-boot spring-cloud spring-cloud-alibaba spring-cloud-gateway
# spring-boot-exmaples :smile: 该仓库为Spring/SpringBoot/SpringCloud系列技术栈 目前还在持续更新中哦!我的公众号:猿生物语,ID: JavaApes, 欢迎大家与我一起学习、进步! :tipping_hand_man: demo表示实战示例,study表示知识点的深入学习,请注意!因为工作较忙,可能部分已上传代码的子项目对应的文章还未发布,如有问题可以联系我! 如果您觉得该教程还算有所帮助,还请点个**star**支持一下! --- ## Spring Boot - [x] spring-boot-ssm-demo: [Spring Boot SSM 简单整合示例](https://mp.weixin.qq.com/s/GO-LDQb4c2LERVpCT8xoVQ) - [x] spring-boot-admin-demo: [Spring Boot 应用健康监控](https://mp.weixin.qq.com/s/4qCocrB-lhrNGtP1N4w4mQ) - [x] spring-boot-config-study: [Spring Boot 配置详解](https://mp.weixin.qq.com/s/ctzf1Xo7850yBdBzv9vlmA) - [x] spring-boot-swagger-demo: [Spring Boot 使用 Swagger 构建 RestAPI 接口文档](https://mp.weixin.qq.com/s/cATpnfphcbb1n8RW4YQXcA) - [x] spring-boot-exception-demo: [Spring Boot 统一异常处理](https://mp.weixin.qq.com/s/KQGU1FaIvF-v9LmUa_-NGw) - [x] spring-boot-logback-demo: [Spring Boot 日志处理之 Logback](https://mp.weixin.qq.com/s/Y_P-t_xy-BPtrHgJ0IZKlg) - [x] spring-boot-redis-demo: [Spring Boot 整合 Redis](https://mp.weixin.qq.com/s/vxW3WNYixdKrHir7dlVzWQ) - [x] spring-boot-mongo-demo: [Spring Boot 整合 MongoDB](https://mp.weixin.qq.com/s/5BAGDxengmOmT9m6iwq4dQ) - [x] spring-boot-params-time-demo: [Spring Boot 时间参数处理问题](https://mp.weixin.qq.com/s/nEUIUCuyG1oz9JwJYhM8mA) - [x] spring-boot-mail-demo: [Spring Boot 邮件发送](https://mp.weixin.qq.com/s/3wNjqD8db_vrn01WYv6ymg) - [x] spring-boot-application-study: [Spring Boot Application 详解](https://mp.weixin.qq.com/s/AiDvv5wR4Av4yHxFOvLyDQ) - [x] spring-boot-cache-demo: [Spring Boot 缓存技术实战](https://mp.weixin.qq.com/s/lcZfgOY-TOIcmUqFcBGBEA) - [x] sso-oauth2-demo: [Spring Boot OAuth2 单点登录示例](https://mp.weixin.qq.com/s/2davYzHuGKRQD1m-Atjs3w) - [x] spring-boot-rabbitmq-demo: [Spring Boot 整合 RabbitMQ](https://mp.weixin.qq.com/s/UjTWWIc68ncNYR6oxDUcBw) - [x] spring-boot-elasticsearch-demo: [Spring Boot 整合 ElasticSearch](https://mp.weixin.qq.com/s/0_2u5v-ALMIGMaplr2AAfQ) - [x] spring-boot-shardsphere-demo: Spring Boot + ShardShpere 实现分库分表 - [x] spring-boot-clickhouse-demo: [Spring Boot + ClickHouse](https://mp.weixin.qq.com/s/XQDWkmnXGrina_And9063w) --- ## Spring Cloud - [x] spring-cloud-eureka-demo: [Spring Cloud 服务注册与发现之 Eureka](http://www.eknown.cn/index.php/springcloud/eureka.html) - [x] spring-cloud-feign-demo: [Spring Cloud 服务调用之 Feign](http://www.eknown.cn/index.php/springcloud/feign.html) - [x] spring-cloud-consul-demo: [Spring Cloud 服务注册中心之 Consul](http://www.eknown.cn/index.php/springcloud/consul.html) - [x] spring-cloud-ribbon-demo: [Spring Cloud 服务调用之 Ribbon](http://www.eknown.cn/index.php/springcloud/ribbon.html) - [x] spring-cloud-hystrix-demo: [Spring Cloud 熔断之 Hystrix](http://www.eknown.cn/index.php/springcloud/hystrix.html) - [x] spring-cloud-ali-nacos-demo: [Spring Cloud 阿里服务注册中心 Nacos](https://mp.weixin.qq.com/s/XUt2GZbXHk9Mkg9in99ERQ) - [x] spring-cloud-admin-demo: [Spring Cloud 应用健康监控](https://mp.weixin.qq.com/s/pInf-K-KaQAOxLM5sINQOw) - [x] spring-cloud-config-demo:[ Spring Cloud 配置中心](https://mp.weixin.qq.com/s/QcIaGAYUvPBIqJM8oMbVvQ) - [x] spring-cloud-nacos-config-demo: [Spring Cloud Nacos 配置中心](https://mp.weixin.qq.com/s/ESGR3aWgnkgJAw7Oc36xGw) - [ ] spring-cloud-gateway: Spring Cloud Gateway - [x] spring-cloud-gateway-nacos-routes: [Spring Cloud Gateway + Nacos 实现动态路由](https://mp.weixin.qq.com/s/B3sas24dVk0DSgeqDPBAng) - [x] spring-cloud-gateway-dynamic-routes: [Spring Cloud Gateway + Mysql 实现动态路由及路由管理功能](https://mp.weixin.qq.com/s/uHgF7tAj1uSsBxKvLENBUw) - [ ] spring-cloud-sentinel-demo: [Spring Cloud Alibaba Sentinel 流量管理](https://mp.weixin.qq.com/s/9BvAhUCvsW1GmwLXhB5btQ) 未完待续... --- ## 公众号 如果大家想要实时关注我的文章和分享动态的话,可以关注一下! 微信搜索 **猿生物语** or **JavaApes** ,或扫码。 ![file](http://zfh-public-blog.oss-cn-beijing.aliyuncs.com/image-1578371742220.png)
0
CrossTheRoadElec/Phoenix5-Examples
HERO C#, FRC C++/Java, future platforms.
null
null
0
devunwired/recyclerview-playground
Examples of RecyclerView use and custom LayoutManager implementations
null
Android RecyclerView Examples ----------------------------- This repository contains examples for using the RecyclerView widget found in the Android Support Library. Disclaimer ---------- This repository contains sample code intended to demonstrate the capabilities of the RecyclerView layout manager APIs. It is not intended to be used as-is in applications as a library dependency, and will not be maintained as such. Bug fix contributions are welcome, but issues and feature requests will not be addressed. Example Contents ---------------- The following bits can be found in the main sample application: - Implementation of `LinearLayoutManager` and `GridLayoutManager` for vertical and horizontal scrolling. - Custom ItemDecorations - `InsetDecoration` - Create an inset margin on all child views. - `DividerDecoration` - Create an inset margin and draw dividers below vertical child views. - `GridDividerDecoration` - Create an inset margin an draw dividers along grid lines - Custom LayoutManager - `FixedGridLayoutManager` - Similar to `StaticGridLayoutManager`, but with a controllable column count. The following examples are incubating on the `experimental` branch (these mostly work, if you feel like living dangerously): - Custom LayoutManagers - `StaticGridLayoutManager` - 2D scrolling grid with variable column count based on data set. Window of visible (non-recycled) views is determined statically. - `DynamicGridLayoutManager` - 2D scrolling grid where window of visible views is determined dynamically. Results in fewer views in memory, but scrolling performance is questionable. License ------- The code supplied here is covered under the MIT Open Source License: Copyright (c) 2015 Wireless Designs, LLC 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.
0
langchain4j/langchain4j-examples
null
null
# [LangChain4j](https://github.com/langchain4j/langchain4j) Examples This repository provides several examples using the LangChain4j library. A good place to start includes: - [Tutorials](https://github.com/langchain4j/langchain4j-examples/tree/main/tutorials/src/main/java) - [More examples](https://github.com/langchain4j/langchain4j-examples/tree/main/other-examples/src/main/java) - [Examples of using advanced RAG techniques](https://github.com/langchain4j/langchain4j-examples/tree/main/rag-examples/src/main/java) - [Example of an agent with memory, tools and RAG](https://github.com/langchain4j/langchain4j-examples/blob/5a19b723661530cf64846a256e2b01b060e7fb0b/customer-support-agent-example/src/main/java/dev/langchain4j/example/CustomerSupportAgentApplication.java#L39) If you have any issues or feature requests, please submit them [here](https://github.com/langchain4j/langchain4j/issues/new/choose).
0
luoyan35714/OPC_Client
OPC client examples
null
## OPC_Client OPC client examples include [utgard](http://openscada.org/projects/utgard/) and [jeasyopc](http://sourceforge.net/projects/jeasyopc/?source=navbar) Also for the real produce environment, there's two example for <b>performance</b> test. ## 已完成 `Utgard`部分已经全部完成 ## Next Step + JeasyOPC继续压力测试 + 40W点下异步的时间 + 异步下多少线程数是最好的 ## 现在依然存在的问题 + JeasyOPC发布订阅的实现 + JeasyOPC异步的源码实现 ## 资源 + `OPC_Client_Jeasyopc` JeasyOPC的测试Example + `OPC_Client_Jeasyopc_Perfermance` JeasyOPC的压力测试Example + `OPC_Client_Utgard` Utgard的测试Example + `OPC_Client_Utgard_Perfermance` Utgard的压力测试Example + `书籍` OPC开发参考书籍 + `学习笔记` 个人OPC学习笔记和一个测试结果文档`OPC压力测试结果统计` + `安装文件` 一个OPC Server 模拟器 ·Matrikon Simulation OPC Server· ## 学习笔记 + [个人学习OPC学习笔记](http://www.hifreud.com/tag/#OPC-ref)
0
TNG/ArchUnit-Examples
Examples for ArchUnit (A Java architecture test library, to specify and assert architecture rules in plain Java)
null
# ArchUnit Examples This module presents some examples on how to use the latest release of [ArchUnit](http://archunit.org). The different subprojects demonstrate the type of test support: * `example-junit4` shows how to use the JUnit 4 test support including the `ArchUnitRunner` * `example-junit5` shows how to use the JUnit 5 test support where test classes are simply being picked up by being annotated with `@AnalyzeClasses` * `example-plain` shows how to use ArchUnit independently of any specific test framework, even though as a runtime environment these tests use JUnit 4 as well All example rules you find within `src/test` refer to classes from `src/main`. These tests are all designed to fail, to demonstrate how production code could violate typical architectural constraints (like layer dependencies). You can run them with Gradle ``` ./gradlew build ``` Otherwise the tests can be run directly from any IDE. ## Regarding issues If you have found any issues with the examples or have any question, please direct them to the [main repository](https://github.com/TNG/ArchUnit/issues) instead. This repository is an autogenerated version of the latest released version of https://github.com/TNG/ArchUnit/tree/main/archunit-example (with some simplified project setup for illustration)
0
gothinkster/spring-boot-realworld-example-app
Example Spring codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.
mybatis realworld spring-boot
# ![RealWorld Example App using Kotlin and Spring](example-logo.png) [![Actions](https://github.com/gothinkster/spring-boot-realworld-example-app/workflows/Java%20CI/badge.svg)](https://github.com/gothinkster/spring-boot-realworld-example-app/actions) > ### Spring boot + MyBatis codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld-example-apps) spec and API. This codebase was created to demonstrate a fully fledged full-stack application built with Spring boot + Mybatis including CRUD operations, authentication, routing, pagination, and more. For more information on how to this works with other frontends/backends, head over to the [RealWorld](https://github.com/gothinkster/realworld) repo. # *NEW* GraphQL Support Following some DDD principles. REST or GraphQL is just a kind of adapter. And the domain layer will be consistent all the time. So this repository implement GraphQL and REST at the same time. The GraphQL schema is https://github.com/gothinkster/spring-boot-realworld-example-app/blob/master/src/main/resources/schema/schema.graphqls and the visualization looks like below. ![](graphql-schema.png) And this implementation is using [dgs-framework](https://github.com/Netflix/dgs-framework) which is a quite new java graphql server framework. # How it works The application uses Spring Boot (Web, Mybatis). * Use the idea of Domain Driven Design to separate the business term and infrastructure term. * Use MyBatis to implement the [Data Mapper](https://martinfowler.com/eaaCatalog/dataMapper.html) pattern for persistence. * Use [CQRS](https://martinfowler.com/bliki/CQRS.html) pattern to separate the read model and write model. And the code is organized as this: 1. `api` is the web layer implemented by Spring MVC 2. `core` is the business model including entities and services 3. `application` is the high-level services for querying the data transfer objects 4. `infrastructure` contains all the implementation classes as the technique details # Security Integration with Spring Security and add other filter for jwt token process. The secret key is stored in `application.properties`. # Database It uses a ~~H2 in-memory database~~ sqlite database (for easy local test without losing test data after every restart), can be changed easily in the `application.properties` for any other database. # Getting started You'll need Java 11 installed. ./gradlew bootRun To test that it works, open a browser tab at http://localhost:8080/tags . Alternatively, you can run curl http://localhost:8080/tags # Try it out with [Docker](https://www.docker.com/) You'll need Docker installed. ./gradlew bootBuildImage --imageName spring-boot-realworld-example-app docker run -p 8081:8080 spring-boot-realworld-example-app # Try it out with a RealWorld frontend The entry point address of the backend API is at http://localhost:8080, **not** http://localhost:8080/api as some of the frontend documentation suggests. # Run test The repository contains a lot of test cases to cover both api test and repository test. ./gradlew test # Code format Use spotless for code format. ./gradlew spotlessJavaApply # Help Please fork and PR to improve the project.
1
Udinic/SmallExamples
A collection of small examples from my blog
null
Small Examples ============== This project combines a collection of modules, each intended to show a certain feature discussed in my blog. This project can be easily opened in IntelliJ IDEA, or imported into your favorite IDE. Developed By ============ * Udi Cohen (udinic@gmail.com) License ======= Copyright 2012 Udi Cohen 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
andreschaffer/event-sourcing-cqrs-examples
Event Sourcing and CQRS in practice.
cqrs cqrs-es ddd domain-driven-design event-sourcing event-store events hexagonal-architecture java
![Build](https://github.com/andreschaffer/event-sourcing-cqrs-examples/workflows/Build/badge.svg) [![Test Coverage](https://api.codeclimate.com/v1/badges/299df5b2515003778612/test_coverage)](https://codeclimate.com/github/andreschaffer/event-sourcing-cqrs-examples/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/299df5b2515003778612/maintainability)](https://codeclimate.com/github/andreschaffer/event-sourcing-cqrs-examples/maintainability) [![Dependabot](https://img.shields.io/badge/Dependabot-enabled-blue?logo=dependabot)](https://docs.github.com/en/github/administering-a-repository/keeping-your-dependencies-updated-automatically) # Event Sourcing and CQRS Examples This project aims to provide examples of how to use Event Sourcing and CQRS applied to a minimalistic bank context. We assume the reader has basic knowledge of Event Sourcing and CQRS concepts. If you want to brush up on the subject we suggest reading: - [https://martinfowler.com/eaaDev/EventSourcing.html](https://martinfowler.com/eaaDev/EventSourcing.html) - [https://martinfowler.com/bliki/CQRS.html](https://martinfowler.com/bliki/CQRS.html) ## Domain overview In this minimalistic bank, a _client_ can _open_ one or more _accounts_. On each _account_, the _client_ can _deposit_ or _withdraw_ money. The history of an _account's transactions_ is available to the _client_ as well as a summary of the _client's accounts_. ## Design choices ### Architecture overview Event Store Projections +----+ +----+ | | | | | DB | | DB | +--+-+ +-+--+ ^ ^ | | +------------+------------+ | | | | | | | Events | | | +------+----+ | | | | | | | | | + | v + | | Domain | Read | | Model | Model | | | | +------------+------------+ | | | API | | | +-------------------------+ #### Ports and Adapters For the Domain Model, we chose the Ports and Adapters structure because we wanted to protect the domain logic from all the technical concerns. For more information about it read [here](http://www.dossier-andreas.net/software_architecture/ports_and_adapters.html). #### Package by Feature For the Read Models, we chose the Package by Feature structure because we would not benefit from isolating the layers and instead we put all feature related parts close together. For more information about it read [here](http://www.javapractices.com/topic/TopicAction.do?Id=205). ### DDD and REST There has been a myth of DDD and REST being incompatible due to DDD being all about behaviour whereas REST is all about state. In this project we followed both techniques quite strictly and hope that the result shows that they can be well combined. Note: We did not include REST hypermedia controls as we believe it is a big subject in itself and didn't want to shift focus from Event Sourcing and CQRS. ### Event Sourcing and CQRS (finally!) We have taken a pragmatic approach when combining Event Sourcing and CQRS. By the book, CQRS proposes a complete separation between the read/query and write/command sides, but that's not what we have here. The approach we've taken instead: - The writes/commands are all on the domain model side and processed by aggregates; - The reads/queries are both in the domain model side and in the read model side. - The queries in the domain model side are only allowed when the data we need is a single aggregate itself. The reason being that we can only query the event store by aggregate id and we can actually fulfill those queries by replaying that single aggregate events. - For any other kind of query, we don't want to compromise the domain model. Therefore, we create read models to fulfill those queries. They are basically projections, potentially built from different events and aggregates that can be queried by more appropriate fields. #### Events Events are a thing from the past. It communicates a significant change that _happened_. ##### Idempotency when replaying events When replaying events, we don't want to execute any business logic because we can't change history. We only want to do assignments. A simple example is with a deposit event: instead of adding the deposited amount to the balance when replaying (business logic), we want the updated balance already available so that we can just assign it. This makes it possible to replay the event multiple times with the same outcome. ##### Ordering of events In a distributed world, event timestamps are unreliable for ordering - machines have their own clocks. Instead we can make the ordering explicit with an event version. In this project we use event versioning in two ways: - In the write/command side, we use it for protecting ourselves from race conditions via optimistic locking; - In the read/query side, we use it for commutative reasons, meaning events can come out of order and we can still handle them properly. If you are interested in this topic, we also recommend reading about [Lamport timestamps](https://en.wikipedia.org/wiki/Lamport_timestamps) and [Vector clocks](https://en.wikipedia.org/wiki/Vector_clock) as alternatives. ## Trying it out ### Requirements - Java 14 - Maven ### Building the application ` mvn clean verify ` ### Starting the application ` java -jar target/bank-service-1.0-SNAPSHOT.jar server src/environments/development.yml ` ### Examples of use #### Create a client ` curl -v -X POST -H "Content-Type: application/json" -d '{"name":"Jane Doe", "email":"jane.doe@example.com"}' http://localhost:8080/clients ` Check the created client in the response's 'Location' header. #### Create an account for the client ` curl -v -X POST -H "Content-Type: application/json" -d '{"clientId":"{CLIENT_ID}"}' http://localhost:8080/accounts ` Check the created account in the response's 'Location' header. #### Make a deposit to the account ` curl -v -X POST -H "Content-Type: application/json" -d '{"amount":1000000}' http://localhost:8080/accounts/{ACCOUNT_ID}/deposits ` #### Check that you created a millionaire! ` curl -v http://localhost:8080/accounts/{ACCOUNT_ID} ` #### More operations Go ahead and check the code! :) # Contributing If you would like to help making this project better, see the [CONTRIBUTING.md](CONTRIBUTING.md). # Maintainers Send any other comments, flowers and suggestions to [André Schaffer](https://github.com/andreschaffer) and [Dan Eidmark](https://github.com/daneidmark). # License This project is distributed under the [MIT License](LICENSE).
0
centic9/jgit-cookbook
Provides examples and code snippets for the JGit Java Git implementation
git java-git jgit jgit-cookbook
jgit-cookbook ============= [![Build Status](https://github.com/centic9/jgit-cookbook/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/centic9/jgit-cookbook/actions) [![Gradle Status](https://gradleupdate.appspot.com/centic9/jgit-cookbook/status.svg?branch=master)](https://gradleupdate.appspot.com/centic9/jgit-cookbook/status) [![Tag](https://img.shields.io/github/tag/centic9/jgit-cookbook.svg)](https://github.com/centic9/jgit-cookbook/tags) Provides examples and code snippets for the [JGit](https://eclipse.org/jgit/) Java Git implementation. The JGit framework is rich and diverse, it has two layers, a low-level _api_ and a higher-level set of _porcelain_ commands. This can be a bit intimidating at first as there are lots of classes, some of which are not relevant for most tasks. This project tries to provide a collection of ready-to-run snippets which provide a quick start for building functionality using JGit. Please make sure to take a look at the nicely written [introduction](http://www.codeaffine.com/2015/12/15/getting-started-with-jgit/) and also use the existing [JavaDoc](http://download.eclipse.org/jgit/site/6.8.0.202311291450-r/apidocs/) and the [User Guide](http://wiki.eclipse.org/JGit/User_Guide) as well, as they are well done and provide detailed information and a general overview of JGit respectively. *Note: Please use sites such as http://stackoverflow.com for general questions about JGit usage, not issues in this project. Issues should be used for problems with snippets and suggestions of missing snippets. Snippets from good answers on stackoverflow can then be included here, naturally.* #### Getting started ##### Grab it git clone https://github.com/centic9/jgit-cookbook.git ##### Build it and create Eclipse project files ###### When using Maven mvn dependency:sources eclipse:eclipse package ###### When using Gradle ./gradlew eclipse check #### Run it Each snippet is a small standalone Java application, so you can simply import the project into your favourite IDE and execute the snippets there. #### Currently the following snippets are available ##### General Repository handling * [Open an existing repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/OpenRepository.java) * [Create a new repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/CreateNewRepository.java) ##### Porcelain commands * [Initialize a new repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/InitRepository.java) * [Add a new file to the index](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/AddFile.java) * [Commit a file to an existing repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CommitFile.java) * [Commit all changes](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CommitAll.java) * [List commits (i.e. Log)](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ShowLog.java) * [List all tags in a repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ListTags.java) * [List all branches in a repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ListBranches.java) * [List all commits in a repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/WalkAllCommits.java) * [List uncommitted changes of a repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ListUncommittedChanges.java) * [Create and delete branches](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CreateAndDeleteBranch.java) * [Create and delete tags](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CreateAndDeleteTag.java) * [List all tags applied on a branch](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ListTagsOnBranch.java) * [Revert a modified tracked file back to its original state in most recent commit](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/RevertChanges.java) * [Return diff between two branches](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ShowBranchDiff.java) * [Show diff of changes to a file between two revs](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ShowFileDiff.java) * [Show diff of changes to all files between two commits](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ShowChangedFilesBetweenCommits.java) * [Show diff of changes to a file between two commits when the file has been renamed](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/DiffRenamedFile.java) * [Show Status](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ShowStatus.java) * [Store contents of branch into a compressed file](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CreateArchive.java) * [Write contents of branch into a compressed file using a custom archive format](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CreateCustomFormatArchive.java) * [Blame, i.e. find out which commit changed specific lines in a file](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ShowBlame.java) * [Add and list Notes attached to commits](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/AddAndListNoteOfCommit.java) * [List available Notes](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ListNotes.java) * [Clean all untracked files](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CleanUntrackedFiles.java) * [Create, list, apply and drop stashes](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CreateListApplyAndDropStash.java) * [Run garbage collection](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CollectGarbage.java) * [Blame, i.e. retrieve information who last changed which line in a file](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/BlameFile.java) * [Merge changes from a branch](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/MergeChanges.java) * [List changed files between two commits](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/DiffFilesInCommit.java) * [List changed files in index](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/DiffIndexChanges.java) * [List changed files in checkout](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/DiffLocalChanges.java) ##### Commands working with remote repositories * [Clone a remote repository into a new local directory](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CloneRemoteRepository.java) * [Clone a remote repository via Apache SSHD](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CloneRemoteRepositoryWithApacheSSHD.java) * [Iterate remote references in a repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ListRemotes.java) * [List remote heads/tags without a local clone](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/ListRemoteRepository.java) * [Fetch from remote repositories](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/FetchRemoteCommits.java) * [Fetch from remote repositories and use 'prune' to remove outdated remote branches/tags](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/FetchRemoteCommitsWithPrune.java) * [Fetch from remote repositories via SSH protocol](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/FetchRemoteCommitsWithSshAuth.java) * [Clone a remote repository via SSH protocol and username/password credentials](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CloneRemoteRepositoryWithAuthentication.java) * [Rebase onto an upstream branch](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/RebaseToOriginMaster.java) * [Using InMemoryRepository to clone a Git repo in-memory and work from there](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CloneRemoteRepositoryIntoMemoryAndReadFile.java) * [Checkout a PR from GitHub](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/CheckoutGitHubPullRequest.java) * [Push to a remote repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/PushToRemoteRepository.java) * [Set remote tracking branch](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/porcelain/TrackMaster.java) ##### Low-level API * [Get the SHA-1 ref from a name, e.g. refs/heads/master](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/GetRefFromName.java) * [Get the commit-object from a name or a SHA-1](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/GetRevCommitFromObjectId.java) * [Get the commit-message](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/GetCommitMessage.java) * [Get the tree-object from a commit-object, name or SHA-1](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/GetRevTreeFromObjectId.java) * [Read the contents of a file/blob](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/ReadBlobContents.java) * [Get the tag-object from a name or a SHA-1](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/ReadTagFromName.java) * [Resolve complex references, e.g. HEAD^^ to a SHA-1](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/ResolveRef.java) * [Iterate over the commits on a branch](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/WalkRev.java) * [Iterate over a range of commits](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/WalkFromToRev.java) * [Read contents of a specific file from a specific commit](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/ReadFileFromCommit.java) * [List remotes configured for the current repository](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/PrintRemotes.java) * [Print out user information from Git](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/ReadUserConfig.java) * [Read file attributes, e.g. executable state, file or directory, size, ...](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/GetFileAttributes.java) * [Use class BranchTrackingStatus to retrieve number of commits ahead/behind compared to remote branches](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/ShowBranchTrackingStatus.java) * [Check if commits on other branches are merged into a given branch](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/CheckMergeStatusOfCommit.java) * [List files in a directory as-of a specific commit or a tag](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/ListFilesOfCommitAndTag.java) * [Iterate over files of a commit recursively](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/WalkTreeRecursive.java) * [Iterate over files of a commit non-recursively](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/WalkTreeNonRecursive.java) * [Find all commits that are reachable via tags, branches, remotes, HEADs, ...](https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/WalkAllCommits.java) ##### GitServlet * There is a standalone sub-project in directory [httpserver](https://github.com/centic9/jgit-cookbook/blob/master/httpserver) which starts up a simple HTTP Git server based on the JGit GitServlet. Just import the project in your IDE and start up the `Main` application, see the Comments in the code for more details. Another simple way to start the sample-server is to run `./gradlew run` in the httpserver-directory. #### Useful code elsewhere ##### cf-ops-automation-broker * Implementation of a simple git server serving anynymous `git:` protocol: https://github.com/orange-cloudfoundry/cf-ops-automation-broker/blob/8bcb286652fae2b8fe2ccc9f67c53cb0272bcbd0/cf-ops-automation-broker-core/src/main/java/com/orange/oss/cloudfoundry/broker/opsautomation/ondemandbroker/git/GitServer.java * Usage in tests: https://github.com/orange-cloudfoundry/cf-ops-automation-broker/blob/8bcb286652fae2b8fe2ccc9f67c53cb0272bcbd0/cf-ops-automation-bosh-broker/src/test/java/com/orange/oss/cloudfoundry/broker/opsautomation/ondemandbroker/sample/BoshServiceProvisionningTest.java#L134 #### Missing snippets * Iterate all commits of a repository: https://gerrit.googlesource.com/plugins/branch-network/+log/refs/heads/master/src/main/java/com/googlesource/gerrit/plugins/branchnetwork/data/JGitFacade.java * Take some of the unit tests as example: https://github.com/eclipse/jgit/tree/master/org.eclipse.jgit.test/tst/org/eclipse/jgit/api * SubModules: http://stackoverflow.com/questions/13426798/jgit-read-gitmodules http://www.codeaffine.com/2014/04/16/how-to-manage-git-submodules-with-jgit/ https://stackoverflow.com/questions/26090139/jgit-reading-commits-from-a-submodule https://download.eclipse.org/jgit/site/6.8.0.202311291450-r/apidocs/org/eclipse/jgit/submodule/package-frame.html * Diffing: http://stackoverflow.com/questions/12987364/how-to-diff-with-two-files-by-jgit-without-creating-repo * Amend a previous commit: http://stackoverflow.com/questions/4772142/jgit-unstaging-files-removing-files-from-the-index-and-ammending-a-commit * Remove a file from the index: http://stackoverflow.com/questions/4803462/jgit-java-git-library-unstaging-files * Git repo on Amazon S3: http://stackoverflow.com/questions/8744611/git-repository-on-s3-as-origin-not-as-backup http://stackoverflow.com/questions/7031729/publish-to-s3-using-git http://www.fancybeans.com/blog/2012/08/24/how-to-use-s3-as-a-private-git-repository/ * CherryPick: http://download.eclipse.org/jgit/site/6.8.0.202311291450-r/apidocs/org/eclipse/jgit/api/CherryPickCommand.html http://stackoverflow.com/questions/18300898/how-to-cherry-pick-a-commit-that-has-more-than-one-parent * More authentication: http://www.lordofthejars.com/2016/09/authenticating-with-jgit.html * How to do a shallow clone (i.e. --depth 1) as soon as https://bugs.eclipse.org/bugs/show_bug.cgi?id=475615 is implemented #### Support this project If you find these snippets useful and would like to support it, you can [Sponsor the author](https://github.com/sponsors/centic9) #### Sources The following sources were used to build the snippets: * [JGit JavaDoc](http://download.eclipse.org/jgit/site/6.8.0.202311291450-r/apidocs/) * [JGit User Guide](http://wiki.eclipse.org/JGit/User_Guide) * [JGit related questions on stackoverflow](http://stackoverflow.com/questions/tagged/jgit) * [AlBlue's Blog: Embedding JGit](http://alblue.bandlem.com/2013/11/embedding-jgit.html) * [JGit main page](http://www.eclipse.org/jgit/) * [What’s the Difference? Creating Diffs with JGit](https://www.codeaffine.com/2016/06/16/jgit-diff/) #### Other applications using JGit * EGit - Git plugin for Eclipse - https://www.eclipse.org/egit/ * Gerrit - A web-based team code collaboration tool - https://www.gerritcodereview.com * Gitiles - A simple Git repository browser - http://code.google.com/p/gitiles/ and https://android.googlesource.com * JGitFS - A userfs implementation which allows to browse branches, tags, committs as a directory structure - https://github.com/centic9/JGitFS * jgitstats - displays repository stats - https://github.com/selesse/jgitstats * git-to-solr - Index git history into a Solr repository - https://github.com/arafalov/git-to-solr * Elegit - GUI client for people who want to learn Git - https://github.com/dmusican/Elegit * Grgit - A wrapper over JGit that provides a fluent API for interacting with Git repositories in Groovy-based tooling - https://github.com/ajoberstar/grgit * jgitver A library to calculate a project semver compatible version from a git repository and its content - https://github.com/jgitver/jgitver * gitective - Investigate Git repositories via filters - https://github.com/kevinsawicki/gitective * RJGit - A JRuby wrapper around the JGit library - https://github.com/repotag/rjgit * KGit - A Kotlin Wrapper of JGit - https://github.com/sya-ri/KGit * Jabylon - A web based translation tool - https://github.com/jutzig/jabylon/ - [GitTeamProvider.java](https://github.com/jutzig/jabylon/blob/master/org.jabylon.team.git/src/main/java/org/jabylon/team/git/GitTeamProvider.java) Ruby Build #### Contribute Please note that the list of snippets is not yet complete, probably never will. If you are missing things or have suggestions how to improve or add snippets, please either send pull requests or create [issues](https://github.com/centic9/jgit-cookbook/issues). #### Licensing Copyright 2013-2023 Dominik Stadler 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](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
cxyxiaokui/spring-boot-examples
个人学习 SpringBoot2.x 写的一些示例程序,目前正在持续更新中.....
devtools filter freemarker interceptor jsp jwt mybatis rabbitmq redis servlet spirng-data-jpa spring-boot spring-session springboot springboot2 swagger thymeleaf webflux websockets weixin
SpringBoot2.x 个人学习示例程序 ========================= ![Spring Boot 2.0](https://img.shields.io/badge/Spring%20Boot-2.0-brightgreen.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-apache%202.0-blue.svg) 个人学习 **SpringBoot2.x** 写的一些示例程序,每个文件夹模块存放对应的示例程序代码。 在学习前首先要确保一下你本地是否配置了 JDK 和 Maven 的基础环境。 - Maven 必须是3.2及以上版本, - JDK 必须是1.8 或更高。 如下所示 基础应用篇,高级应用篇,原理应用篇 列表说明: - 第一个是:示例教程博客教程 - 第二个是:示例教程具体代码 Mavne 模块 (可以单独部署) **SpringBoot版本:** 2.1.0.RELEASE --- ## SpringBoot2.x 基础应用篇 - [玩转SpringBoot 2 快速搭建 | Spring Initializr 篇](https://mp.weixin.qq.com/s/spbtRZVYzDips437o9oYvA) **spring-boot-2.x-start** - [玩转 SpringBoot 2 快速搭建 | IntellJ IDEA篇](https://mp.weixin.qq.com/s/Z5vebfI7dPP75-1bE_JVzA) **spring-boot-2.x-start** - [玩转 SpringBoot 2 快速搭建 | SpringToolSuite 篇](https://mp.weixin.qq.com/s/OpBxjMgrOkOvccn718YStA) **spring-boot-2.x-start** - [玩转 Springboot 2 | 不使用 parent 方式创建SpringBoot项目篇](https://zhuoqianmingyue.blog.csdn.net/article/details/88093042) - [玩转SpringBoot 2 之项目启动篇](https://mp.weixin.qq.com/s/gVkdcWP8RpJaLkOQF23JzQ) **spring-boot-2.x-start** - [玩转 SpringBoot 2 之热部署DevTools](https://mp.weixin.qq.com/s/hJeh_YDiqZjHVJoDBa2oYQ) **spring-boot-2.x-start** - [玩转 SpringBoot 2 快速搭建 | RESTful Api 篇](https://mp.weixin.qq.com/s/d2aB7t0NyIDVlQb4VKZciQ) **spring-boot-2.x-restful-api** - [玩转 SpringBoot 2 快速整合 | 丝袜哥(Swagger)](https://mp.weixin.qq.com/s/X6KaClQRZbFn5-UcgxbqGQ) **spring-boot-2.x-swagger** - [玩转 SpringBoot 2 快速整合 Filter](https://mp.weixin.qq.com/s/WtZ63iDwXh2L5qxhGyWESg) **spring-boot-2.x_filter** - [玩转 SpringBoot 2 快速整合 Filter 注解版](https://mp.weixin.qq.com/s/MiuKREMyboVzcBDAYr9XNg) **spring-boot-2.x-annotation-filter** - [玩转 SpringBoot 2快速整合拦截器](https://mp.weixin.qq.com/s/IkNHvjRV7lMlShFYasC9yw) **spring-boot-2.x-interceptor** - [玩转 SpringBoot 2 快速整合 | Hibernate Validator数据校验](https://mp.weixin.qq.com/s/MUzj_Yg7X6JqGsDHE2MaXQ) **spring-boot-2.x-restful-api** - [玩转 SpringBoot 2 快速整合 Servlet](https://mp.weixin.qq.com/s/3Pe4hiCbrmvBDG3kFcnX7A) **spring-boot-2.x-servlet** - [玩转 SpringBoot 2 快速整合 Listener](https://mp.weixin.qq.com/s/8NSHNpyN1PfOWoZUFmTy6g) **spring-boot-2.x-listener** - [玩转 SpringBoot 2 快速整合 | 统一异常处理](https://mp.weixin.qq.com/s/3cfb3djYRo15KlavkV7tpw) **spring-boot-2.x-unified_anomaly** - [玩转 SpringBoot 2 快速整合 | FreeMarker篇](https://mp.weixin.qq.com/s/dAa_KZvVEV2wK40L7WdH4g) **spring-boot-2.x-freemarker** - [玩转 SpringBoot 2 快速整合 | JSP 篇](https://mp.weixin.qq.com/s/EbysDIkDKZ9OzMN_b7_uNQ) **spring-boot-2.x-jsp** - [玩转 SpringBoot 2 快速整合 | Thymeleaf 篇](https://mp.weixin.qq.com/s/O53FKyrWTDPqFhHEvdDCoQ) **spring-boot-2.x-thymeleaf** - [史上最详 Thymeleaf 使用教程](https://mp.weixin.qq.com/s/7FLO1ChRf18QU-w9ILzeAw) **spring-boot-2.x-thymeleaf** - [玩转 SpringBoot 2 之整合 JWT 上篇](https://mp.weixin.qq.com/s/WlwkTtn3xD6izXkkk5MjCQ) **spring-boot-2.x-jwt** - [玩转 SpringBoot 2 之整合 JWT 下篇](https://mp.weixin.qq.com/s/kUiZ1PcBCr1shoOg_-hmvA) **spring-boot-2.x-jwt** - [玩转SpringBoot 2之整合WebSocket篇](https://mp.weixin.qq.com/s/ZzgUerD1KTkQ-MCpPy2hGA) **spring-boot-2.x_websocket** - [玩转 SpringBoot 2 之发送邮件篇](https://mp.weixin.qq.com/s/BxExlZztSbnuPi0Tem-cPQ) **spring-boot-2.x_mail** - [玩转 SpringBoot 2 之整合定时任务篇](https://mp.weixin.qq.com/s/KYxh1g8LMY0TVdof08BlmA) **spring-boot-2.x_task** - [玩转 SpringBoot 2.x 之使用 SpringDataJpa 篇](https://mp.weixin.qq.com/s/MVSY8cryvXIpCV1NTqWuFw) **spring-boot-2.x-spring-data-jpa** - [玩转 SpringBoot 2.x 整合 Mybatis](https://mp.weixin.qq.com/s/98Lcc5mSD4xIl3fm69mIpQ) **spring-boot-2.x-mybaties** - [玩转SpringBoot2.x 整合Druid(Mybatis版)](https://mp.weixin.qq.com/s/2zSRQT2LWOCAI1zADFcHwQ) **spring-boot-2.x-mybaties** - [玩转 SpringBoot 2.x 之自定义Starter依赖](https://mp.weixin.qq.com/s/C6nP__BZ6NZkGpEW3h4F1w) **spring-boot-start-httpclient** **springboot-2.x-httpclient-custom-starter** - [SpringBoot 2 使用异步调用@Async](https://zhuoqianmingyue.blog.csdn.net/article/details/87989647) - [SpringBoot 2 使用SpringBoot Admin 监控](https://zhuoqianmingyue.blog.csdn.net/article/details/82785269) - [SpringBoot 2 多数据源操作 MyBatis + Durid版](https://mp.weixin.qq.com/s/KbeMwk65nWt-qYmlZ7vR_g) **spring-boot-2.x-mybaties-multipleDataSource** - 未完待续... ## SpringBoot2.x 高级应用篇 - [SpringBoot 2 使用Spring WebFlux之HelloWord教程](https://github.com/zhuoqianmingyue/springbootexamples/wiki/SpringBoot2.0%E4%BD%BF%E7%94%A8Spring-WebFlux%E4%B9%8BHelloWord%E6%95%99%E7%A8%8B) **lesson16_spring_webflux** - [Spring Boot 2 快速教程:WebFlux 快速入门(二)转载自泥瓦匠BYSocket](https://github.com/zhuoqianmingyue/springbootexamples/blob/master/doc/webflux/Spring%20Boot%202%20%E5%BF%AB%E9%80%9F%E6%95%99%E7%A8%8B%EF%BC%9AWebFlux%20%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8%EF%BC%88%E4%BA%8C%EF%BC%89.md) - [Spring Boot 2 快速教程:WebFlux Restful CRUD 实践(三)转载自泥瓦匠BYSocket ](https://github.com/zhuoqianmingyue/springbootexamples/blob/master/doc/webflux/Spring%20Boot%202%20%E5%BF%AB%E9%80%9F%E6%95%99%E7%A8%8B%EF%BC%9AWebFlux%20Restful%20CRUD%20%E5%AE%9E%E8%B7%B5%EF%BC%88%E4%B8%89%EF%BC%89.md) - [Spring Boot 2 快速教程:WebFlux 集成 Mongodb(四)转载自泥瓦匠BYSocket ](https://github.com/zhuoqianmingyue/springbootexamples/blob/master/doc/webflux/Spring%20Boot%202%20%E5%BF%AB%E9%80%9F%E6%95%99%E7%A8%8B%EF%BC%9AWebFlux%20%E9%9B%86%E6%88%90%20Mongodb%EF%BC%88%E5%9B%9B%EF%BC%89.md) - [Spring Boot 2 快速教程:WebFlux 集成 Thymeleaf(五)转载自泥瓦匠BYSocket ](https://github.com/zhuoqianmingyue/springbootexamples/blob/master/doc/webflux/Spring%20Boot%202%20%E5%BF%AB%E9%80%9F%E6%95%99%E7%A8%8B%EF%BC%9AWebFlux%20%E9%9B%86%E6%88%90%20Thymeleaf%EF%BC%88%E4%BA%94%EF%BC%89.md) - [Spring Boot 2 快速教程:WebFlux 集成 Thymeleaf 、 Mongodb 实践(六)转载自泥瓦匠BYSocket ](https://github.com/zhuoqianmingyue/springbootexamples/blob/master/doc/webflux/Spring%20Boot%202%20%E5%BF%AB%E9%80%9F%E6%95%99%E7%A8%8B%EF%BC%9AWebFlux%20%E9%9B%86%E6%88%90%20Thymeleaf%20%E3%80%81%20Mongodb%20%E5%AE%9E%E8%B7%B5%EF%BC%88%E5%85%AD%EF%BC%89.md) - [SpringBoot 2 快速集成 Jedis客户端 连接 redis 服务](https://zhuoqianmingyue.blog.csdn.net/article/details/93303627) **spring-boot-2.x-redis** - [SpringBoot 2 整合 SpringSession 最简操作](https://blog.csdn.net/ljk126wy/article/details/93971421) **spring-boot-2.x-spring-session-1** **spring-boot-2.x-spring-session-2** - [SpringBoot 2 快速整合 RabbitMQ](https://blog.csdn.net/ljk126wy/article/details/97543094) **spring-boot-2.x-rabbit-mq** - [SpringBoot 2 集成微信扫码支付](https://zhuoqianmingyue.blog.csdn.net/article/details/99554766) **spring-boot-2.x-wxpay** - [SpringBoot中获取微信用户信息竟然这么简单!](https://mp.weixin.qq.com/s/MFw9dWLAbEwO-giBu9rPVA) **spring-boot-2.x-weixin** - [JS-SDK自定义微信分享(SpringBoot版)](https://zhuoqianmingyue.blog.csdn.net/article/details/100714362) **spring-boot-2.x-weixin** - [通过Docker 启动SpringBoot 项目](https://blog.csdn.net/ljk126wy/article/details/104275624) - 未完待续... ## SpringBoot2.x 原理应用篇 - [不会部署并调试SpringBoot源码?一看必会IDEA操作](https://mp.weixin.qq.com/s/XY3p1kMrZ0UqdSqjXN4ytA) - [SpringBoot 2之自定义 Banner 日志输出篇](https://zhuoqianmingyue.blog.csdn.net/article/details/83109152) - [SpringBoot 2.x 解析BeanPostProcessor原理篇](https://blog.csdn.net/ljk126wy/article/details/83305455) 目前正在维护中... 尽请期待 <div align=center><img src="https://img-blog.csdnimg.cn/20191005233835434.png" /></div>
0