Zandero

REST easy request and security context

Лицензия

Лицензия

Группа

Группа

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

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

rest.context
Последняя версия

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

1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Zandero
REST easy request and security context
Система контроля версий

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

https://github.com/Zandero/rest.context

Скачать rest.context

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

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

Зависимости

compile (13)

Идентификатор библиотеки Тип Версия
com.zandero : utils jar [1.2,)
com.zandero : utils.extra jar [1.2,)
com.zandero : rest.events jar [1.2,)
com.zandero : http jar [1.2,)
org.jboss.resteasy : resteasy-jaxrs jar [3.1.1.Final,)
ch.qos.logback : logback-classic jar [1.1.7,)
com.google.inject : guice jar 4.1.0
com.google.inject.extensions : guice-servlet jar 4.1.0
com.google.inject.extensions : guice-multibindings jar 4.1.0
com.fasterxml.jackson.core : jackson-core jar [2.7.3,)
com.fasterxml.jackson.core : jackson-annotations jar [2.7.3,)
com.fasterxml.jackson.core : jackson-databind jar [2.7.3,)
javax.servlet : javax.servlet-api jar [3.1.0,)

test (9)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.jaxrs : jackson-jaxrs-json-provider jar [2.7.3,)
org.jboss.resteasy : resteasy-jackson2-provider jar [3.1.1.Final,)
junit : junit jar [4.12,)
net.trajano.commons : commons-testing jar [2.1.0,)
org.mockito : mockito-all jar [1.10.19,)
com.google.inject.extensions : guice-assistedinject jar 4.1.0
org.jboss.resteasy : resteasy-guice jar [3.1.1.Final,)
org.eclipse.jetty : jetty-server jar [9.3.7.v20160115,)
org.eclipse.jetty : jetty-servlet jar [9.3.7.v20160115,)

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

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

Events for RestEasy

Sometime we need to do a little bit more when a REST API is called, but in doing so we slow down the REST API itself.
Events for RestEasy is a simple library that enables triggering of custom events when a REST API is called.

Event triggering supports:

  • asynchronous event execution
  • events on specific response codes
  • exception based event triggers
  • exception handling and wrapping to JSON response
  • Guice for dependency injection

Setup

 <dependency>      
      <groupId>com.zandero</groupId>      
      <artifactId>rest.events</artifactId>      
      <version>1.2</version>      
 </dependency>

Example

Simple event triggered on every call to /ping

@GET
@Path("/ping")
@RestEvent(processor = PingEvent.class)
@Produces(MediaType.APPLICATION_JSON)
public String ping() {

    return "ping";
}
public class PingEvent implements RestEventProcessor {
    @Override
    public RestEventResult execute(Serializable entity, RestEventContext context) throws Exception {
        // magic happens here
        return RestEventResult.ok();
    }
}

Additional info

com.zandero

Zandero

A collection of useful utilities, extensions and wrappers

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

Версия
1.2
1.0