sdr-mixins

Defines various "mixin" interfaces for exposing Spring Data repository methods in a more granular method

Лицензия

Лицензия

Категории

Категории

Mixin Библиотеки уровня приложения Bytecode Manipulation
Группа

Группа

com.sdoctech
Идентификатор

Идентификатор

sdr-mixins
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

sdr-mixins
Defines various "mixin" interfaces for exposing Spring Data repository methods in a more granular method
Ссылка на сайт

Ссылка на сайт

https://github.com/SDOCTech/sdr-mixins
Система контроля версий

Система контроля версий

https://github.com/SDOCTech/sdr-mixins

Скачать sdr-mixins

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.sdoctech/sdr-mixins/ -->
<dependency>
    <groupId>com.sdoctech</groupId>
    <artifactId>sdr-mixins</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.sdoctech/sdr-mixins/
implementation 'com.sdoctech:sdr-mixins:1.0'
// https://jarcasting.com/artifacts/com.sdoctech/sdr-mixins/
implementation ("com.sdoctech:sdr-mixins:1.0")
'com.sdoctech:sdr-mixins:jar:1.0'
<dependency org="com.sdoctech" name="sdr-mixins" rev="1.0">
  <artifact name="sdr-mixins" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.sdoctech', module='sdr-mixins', version='1.0')
)
libraryDependencies += "com.sdoctech" % "sdr-mixins" % "1.0"
[com.sdoctech/sdr-mixins "1.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.springframework.data : spring-data-commons jar 2.0.7.RELEASE

Модули Проекта

Данный проект не имеет модулей.

sdr-mixins

The Spring Data Repository "mixins" project provides users with a way to make more granular repositories to use with Spring Data. Normally a user could implement the CrudRepository. However, this approach exposes methods like deleteAll() to the rest of the application.

With the various interfaces users can control which methods are exposed by their repository interface, thus insuring that methods that should not be invoked are never available to be called in the first place.

NOTE: In the end this really is just a preference for me that I really like. I made this available on the off chance that others like it as well. I've personally found spring-data and all of its accompanying modules to be fantastic libraries that help me be very productive.

Installation

To use add the following dependency to your pom

<dependency>
    <groupId>com.sdoctech</groupId>
    <artifactId>sdr-mixins</artifactId>
    <version>1.0</version>
</dependency>

Usage

Suppose that you only want to expose the ability to find an entity by its id and to test for existence of an entity by its id. You would just do the following:

public interface MyNewRepository<MyEntity, Long> extends
    HasFindById<MyEntity, Long>,
    HasExistsById<MyEntity, Long>,
    Repository<MyEntity, Long> {
}
com.sdoctech

SDOC Tech

Версии библиотеки

Версия
1.0