thirty-one Star four hundred and two Fork one hundred and fourteen

Code craftsman / dante-oss

Join Gitee
Discover and participate in excellent open source projects with more than 12 million developers, and the private warehouse is completely free:)
Join for free
Clone/Download
Contribution code
Synchronization code
cancel
Tips: Since Git does not support empty folders, empty. keep files will be generated after creating folders
Loading...
README
Apache-2.0

Dante OSS

Rich and comprehensive | simple and convenient

Make the integration and use of Minio easier


 Spring Boot 3.3.0  Version 3.3.0.3  Java 17  License Apache 2.0  Total Visits  Code craftsman  Github star  Github fork  Gitee star  Gitee fork

Sample microservice application   |   Example monomer application   |   Example front-end application

If you find it helpful, please click "Star" in the upper right corner to support it. Thank you!

Introduction | Intro

Dante OSS is an open source framework that simplifies object storage (OSS) operations. Learn from the standardized design idea of JPA, gradually extract and abstract the OSS standardized operations of various manufacturers, and build a unified Java OSS API specification. It forms an object storage usage mode similar to the JPA specification, with the Java OSS API as the core and different OSS vendors' SDKs as the implementation, so that you can switch between OSS from different vendors without modifying the code.

Goal

  • Build a Java OSS API specification similar to JPA, with the goal of not changing the API. You can switch object storage by switching the vendor OSS SDK.
  • It is not limited to common upload and download, but covers common operations of all OSS SDKs. It can not only easily upload and download, but also quickly build your own OSS management applications.
  • Unified Java API and REST API are provided for common operations, and separate REST API implementation is provided for OSS vendor personalized operations as appropriate.

Design | Design thinking

The original design goal of Dante OSS is to deeply encapsulate the Minio Java SDK, which can more easily implement complex Minio management operations, and improve the convenience of using Minio custom development. With the continuous iteration of versions and the collection of more user requirements, the design idea of Dante OSS is also constantly iterative.

With the continuous integration of different OSS manufacturers' SDKs such as Amazon S3 and Alibaba Cloud, it is found that although most OSS products are compatible with S3 standards, the Amazon S3 SDK can be used to complete other manufacturers' OSS operations, but it is also limited to regular and basic OSS operations, and cannot fully play the characteristics of individual manufacturers' OSS. Moreover, due to different implementations, even the same OSS operation, the parameters passed and the return values are also different. Yes, if the code of the same business logic is implemented using Manufacturer A's SDK, it cannot be used on Manufacturer B's SDK. It must be re implemented before it can be used, which greatly increases the cost of migrating OSS.

Although there are many excellent encapsulation frameworks for object storage operations that can support many OSS vendors, the operations supported by them are not so rich. Dante OSS's goal is not only to meet the use of regular OSS operations, but also to provide richer and more unified OSS management operations. Users can more easily integrate and develop richer and updated detailed OSS management functions in their own applications.

Therefore, on the basis of maintaining the original goal of simplifying Minio management operations, Dante OSS draws on the standardized design idea of JPA, extracts and abstracts OSS standardized operations, and forms a unified Java OSS API specification. At the same time, it encapsulates a unified REST API that can operate from any manufacturer to form an application mode with unified definition and dynamic implementation (similar to Hibernate, which is an implementation of JPA, and Hibernate supports different databases in the Dialect mode), so as to facilitate the switching and migration of different OSS.

 structure

Currently, Minio is the default implementation of the Java OSS API specification. Currently, only Minio personalized operation REST API implementation is available.

Benefits | Advantages

  • Zero additional learning cost : Developers can seamlessly integrate and use Dante OSS as long as they understand the basic development of Spring and REST
  • Lower developer threshold : Shield the complexity of using Java OSS SDKs such as Minio, and use the Spring environment standard method to simplify the encapsulation of the original API. Service API and REST API out of the box
  • Unified development interface : Build a unified Java OSS API specification, form a unified Service API and REST API interface, and switch between different manufacturers' OSS without modifying the code
  • It contains rich functions : Nearly all functions of the Minio Java SDK have been modified, and the functions of large file fragment upload, second transfer, direct transfer, breakpoint resume transfer, etc. have been implemented and integrated with the best solution in the industry
  • Standard and elegant code : All function parameters do not destroy the original OSS SDK code constructor structure, but are abstracted and simplified on the basis of the original way, greatly improving the programming experience and code readability
  • Perfect annotation document : Provide detailed comments, descriptions, and OpenAPI annotations for request parameters, methods, REST APIs, and Validation. The purpose and usage are clear at a glance. There is no need to read the Minio documentation and source code again, helping you save more time
  • Abundant stability guarantee : Unified and humanized error system, built-in REST API anti brushing, idempotent protection, detailed and accurate Spring Validation.
  • Full front end example : The front end uses a complete project instead of a demo to comprehensively display the front end and rear end interaction, interface call, parameter use, TS type definition and other aspects, which can be directly used for actual projects or simply build their own products after transformation

Compare

For specific comparison, see online documentation [Function Description Section]

Structure

 dante-oss
 ☆ oss bom -- Dante OSS top-level Maven dependency, unified control of dependency and its version
 ☆ oss dialect -- OSS implementation by different manufacturers.
 ☆ -- dialect autoconfigure -- OSS Dialect auto configuration module
 ☆ -- dialect core -- OSS Dialect common code module
 Focus -- dialect sdk aliyun -- Aliyun OSS Java SDK package code module
 ☆ -- dialect sdk minio -- Minio OSS Java SDK package code module
 ☆ -- dialect-sdk-s3 -- Amazon S3 OSS Java SDK package code module
 ├── oss-rest -- Dante OSS REST API
 ☆ -- rest sdk minio -- Minio's unique REST API module
 ☆ -- rest sdk specification -- Unified REST API based on Dante Java OSS API specification
 ☆ oss solution -- Implementation module of conventional OSS application scheme based on Dante Java OSS API specification
 ☆ oss specification -- Dante Java OSS API specification definition
 ☆ oss starter -- Dante OSS related starter
 Focus -- oss aliyun spring boot starter -- Aliyun OSS Java SDK package Starter for independent use
 ☆ oss mini spring boot starter -- Minio OSS Java SDK package Starter for independent use
 Focus -- oss-s3 spring boot starter -- Amazon S3 OSS Java SDK package Starter for independent use
 L L L oss spring boot starter Dante OSS Unified Starter

Column | Cookbook

Dante Cloud Technology Insider High Level Document Column (Cookbook)

Due to the limited support of the currently used reading products, if you want to purchase the full text, please click the corresponding article link and open it in the computer browser to purchase.

S/N Article Title pay explain Scan code to read
one Suggestions on Dante Cloud and related knowledge learning methods and learning paths V2 Free Admission  Suggestions on Dante Cloud and related knowledge learning methods and learning paths V2
two Deep analysis of Scope and Role in OAuth 2 Paid, with trial chapters Exclusive throughout the network, in-depth analysis of the concepts and principles of Scope and Role in OAuth2 protocol and various components of Spring Security ecology, as well as their applications in actual combat  Deep analysis of Scope and Role in OAuth 2
three Automatic configuration and injection sequence control of Spring Boot 3 Paid, with trial chapters Key knowledge points of Spring ecology, master the key switches to enter microservices  Automatic configuration and injection sequence control of Spring Boot 3
four Session sharing and consistency processing of Spring Cloud Paid, with trial chapters Analyze the technical difficulties of microservice architecture session sharing in simple terms  Session sharing and consistency processing of Spring Cloud
five Authentication and dynamic interface authentication in OAuth 2 Paid, with trial chapters Follow the Dante Cloud source code to fully grasp the principles and implementation of Spring Security 5&6 and OAuth2 based microservice dynamic interface authentication  Authentication and dynamic interface authentication in OAuth 2
six Detailed explanation of the parameter transfer method of the Rest interface of Spring Boot 3 Paid, with trial chapters This article gives you a thorough understanding of the "correct opening method" of various parameter transfer methods and methods of Spring Boot Rest  Detailed explanation of the parameter transfer method of the Rest interface of Spring Boot 3

Use | How to use

1、 Basic use

  1. Introduced in maven
 <dependency>
     <groupId> cn.herodotus.oss </groupId>
     <artifactId> oss-spring-boot-starter </artifactId>
     <version> Latest version </version>
 </dependency>
  1. Configure yml parameters
 herodotus :
   oss :
     dialect :  minio
     minio :
       endpoint :  http://127.0.0.1:9000
       access-key :  XXXXXXXXX
       secret-key :  XXXXXXXXX
       use-proxy :  true
       proxy-source-endpoint :  http://localhost:3000/api
  1. Unified error handling
 //Reference code
 public  static  Result < String >  resolveException ( Exception  ex   String  path )  {
     return  GlobalExceptionHandler . resolveException ( ex   path );
 }

 //Or

 @ExceptionHandler ({ HerodotusException . class   PlatformException . class })
 public  static  Result < String >  exception ( Exception  ex   HttpServletRequest  request   HttpServletResponse  response )  {
     ······
 }
  1. Interactive error information feedback
 //At the system unified error location, call the following code to return more interactive error information containing custom error codes.
 if  ( ex  instanceof  HerodotusException  exception )  {
     Result < String >  result  =  exception . getResult ();
     result . path ( path );
     log . error ( "[Herodotus] |- Global Exception Handler, Error is : {}" ,  result );
     return  result ;
 }

2、 Select Use

except dialect-core and oss-specification All other modules can be used independently. You can select only one module to use according to your own needs.

1. dialect-sdk-aliyun

It contains the service code that encapsulates the Aliyun basic API. As one of the ways to realize the unified abstraction of OSS, it also contains the implementation code for the Dante Java OSS API specification. It can be used alone and introduced oss-aliyun-spring-boot-starter Automatic configuration can be turned on.

Aliyun REST API encapsulation is not currently available. Please directly apply to use AliCloud REST API or use Dante OSS unified REST API interface according to your own needs.

2. dialect-sdk-s3

It contains the service code that encapsulates the Amazon S3 basic API. As one of the ways to realize the unified abstraction of OSS, it also contains the implementation code for the Dante Java OSS API specification. It can be used alone and introduced oss-s3-spring-boot-starter Automatic configuration can be turned on.

Amazon S3 REST API encapsulation is not currently available. Please directly apply to use Amazon S3 REST API or use Dante OSS unified REST API interface according to your own needs.

3. dialect-sdk-minio

It contains the service code that encapsulates the Minio basic API. As one of the ways to realize the unified abstraction of OSS, it also contains the implementation code for the Dante Java OSS API specification.

Provide MINIO standard operation REST API package rest-sdk-minio

be careful: rest-sdk-minio It does not include the business function of the general solution for large file sharding upload and the general function REST API conforming to the Dante Java OSS API specification

use oss-minio-spring-boot-starter Automatic configuration of Minio Service and REST API can be enabled uniformly.

4. rest-sdk-minio

Provide MINIO standard operation REST API package. use oss-minio-spring-boot-starter Automatic configuration of Minio Service and REST API can be enabled uniformly.

5. rest-sdk-specification

rest-sdk-specification It is a unified operation REST API formed by abstracting the common content of existing APIs in Minio, Aliyun and Amazon S3, and extracting the Dante Java OSS API specification definition. The goal is to form a unified Java OSS API and REST API similar to the Spring Data Repository, so that a set of APIs can support seamless switching between different OSS vendors without modifying the code.

6. oss-solution

It is a high abstraction of mainstream object storage business solutions such as large file sharding, and encapsulates the Dante Java OSS API specification for related management operations. With this module, you can easily and quickly integrate or customize your own large file shards.

7. oss-spring-boot-starter

All contents of Dante OSS can be directly introduced for use. Based on the common abstraction of OSS, switching between different OSS operations is achieved through Spring Boot configuration. Currently, Minio is used as the default implementation, and a complete REST API related to Minio is provided. Aliyun and Amazon S3 currently only contain service APIs encapsulated in their Java SDKs as options for different OSS implementations. If you want to use its REST API, please apply directly according to the official website documents of the corresponding manufacturer, and do not consider integrating this part into Dante OSS for the time being.

Contribution | Committer

  1. Go to your own repo in Gitee fork project
  2. Clone fork's past projects, that is, your projects, to your local
  3. Modify the code (remember to modify the development branch)
  4. Commit code, push to your own library (development branch)
  5. Log in to Gitee and you can see a pull request button on your home page. Click it, fill in some instructions, and then submit.
  6. Waiting for maintainer to merge

Feedback

  • Welcome to submit ISSUE , please write down the specific cause of the problem, reproduce the steps and environment

Demo | Example

As an ecological product of Dante Cloud, Dante OSS does not provide demonstration environment and examples separately. Please use Dante environment directly to view the effect and understand the use, which is more practical.

Single version and microservice version cases based on Spring Authorization Server are provided. You can choose from SDK, Spring Boot Starter and complete project. The front-end uses a complete front-end project based on Vue3, Typescript5, Vite4, and Pinia 2 as an integration example, including detailed Typescript type definitions and the integration and use methods of mainstream components such as vue simple uploader.

Note: If you only want to understand the basic use method and effect, it is recommended to use the single architecture demonstration environment. For specific construction method, see [Online Document] Chapter of monomer version.

License

This project is based on the Apache License Version 2.0 open source agreement, which can be used for commercial projects, but must comply with the following supplementary terms.

  • This software shall not be used for acts endangering national security, honor and interests, or for illegal purposes in any form.
  • In the extended code (in the code derived from the modified existing source code), the agreement, copyright notice and other instructions required by the original author's regulations in the original code need to be included (please respect the copyright of the original author, and do not delete or modify the Copyright and @ author information in the file), not to mention replace Dante OSS Herodotus or the code maker, otherwise you will be liable for violating the terms of this agreement.
  • If you apply some codes or function references of this software, please retain the copyright and author in the source file. You need to indicate the source in the obvious position of your software introduction. For example, this software is based on Dante Cloud microservice architecture or Dante OSS, and the link is attached: https://www.herodotus.cn
  • All legal disputes and liabilities arising from this software have nothing to do with the author.
  • If you have improved this software, I hope you can contribute to us. It is the king's way to go both ways to achieve each other.
  • This project has applied for software copyright, please respect open source.

Sponsorship | Donate

S/N Sponsor Sponsorship time S/N Sponsor Sponsorship time S/N Sponsor Sponsorship time
one Silence 2021-10-25 two Potato Stealer 2021-11-24 three lorron 2022-04-04
four In the cloud 2022-12-26 five Xi 晽 2022-12-27 six p911gt3rs 2023-01-03
seven jacsty 2023-01-31 eight hubert_rust 2023-03-16 nine Zkey Z 2023-03-18
ten Zhiguo Ouba 2023-03-27 eleven michael 2023-04-07 twelve Uncle | Alley 2023-04-11
thirteen sun_left 2023-04-19 fourteen Time, sand 2023-07-06 fifteen Old Indian Turtle Dove 2023-09-09
sixteen A gust of wind 2023-12-10 seventeen Jack 2024-03-01 eighteen onehelper 2024-05-24
nineteen Ning 2024-05-29 twenty twenty-one
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution. " "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (c) 2020-2030 ZHENGENGWEI< herodotus@aliyun.com > 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. Dante OSS adopts the APACHE LICENSE 2.0 open source protocol. You should pay attention to the following points when using it: 1. Please do not delete or modify the LICENSE file in the root directory. 2. Please do not delete or modify the copyright notice of Dante Cloud source code header. 3. Please keep the source code and the project source of relevant description files, the author's statement, etc. 4. When distributing the source code, please indicate the source of the software< https://gitee.com/herodotus/dante-oss > 5. Please indicate the source of the software when modifying the package name, module name, project code, etc< https://gitee.com/herodotus/dante-oss > 6. If your project cannot meet the above points, you can apply for commercial authorization

brief introduction

Dante OSS is an open source framework that simplifies object storage (OSS) operations. Learn from the standardized design idea of JPA, extract and abstract the OSS standardized operations of various manufacturers, and build a unified Java OSS API specification. Form an object storage usage mode similar to the JPA specification, with the Java OSS API as the core, and different OSS vendor SDKs as the implementation, so as to facilitate switching between OSS from different vendors without modifying the code. open Stow
Apache-2.0
cancel

Release (112)

whole

contributor

whole

Recent developments

Load more
Can't load more
Java
one
https://gitee.com/herodotus/dante-oss.git
git@gitee.com :herodotus/dante-oss.git
herodotus
dante-oss
dante-oss
master

Search Help