Code Monkey home page Code Monkey logo

vertx-jspare's Introduction

Vertx Jspare

Status

Build Status Javadocs

Description

If you stay here, that is because you know about of the incredible thinks that the Vert.x can do. I have no doubt that it is amazing and extremely versatile for their tasks. But, what if I say that we can extract more! And we can! The Jspare Vert.x will improve your experience with your Vert.x applications. We persue conventions and we seek to make bright ideas of Vert.x are used and improved. Try it, I'm sure your team and you will not regret.

  • Reactive and Scallable applications.
  • Develop Web applications with agility and intuitively.
  • Lightweight IoC and DI (JSR-330 support).
  • Easy way to create components and resources, uncoupling your architecture.
  • Components based.
  • Simple conventions, for improve your experience.
  • Minimalist api to mock unit tests with vertx-jspare-uni.

Visit the official web site of Vert.x Jspare

Installation and Getting Started

The reference documentation includes detailed installation instructions as well as a comprehensive getting started guide.

Here is a quick sample of a simple usage of Vertx Jspare

For maven:

<parent>
  <groupId>org.jspare.vertx</groupId>
  <artifactId>vertx-jspare</artifactId>
  <version>3.3.0</version>
</parent>

For gradle:

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    compile "org.jspare.vertx:vertx-jspare:3.3.0"
}

We can play wiyh one simple http api example (kotlin is fun too:

import org.jspare.vertx.JspareVerticle
import org.jspare.vertx.annotation.Module
import org.jspare.vertx.annotation.Modules
import org.jspare.vertx.web.annotation.module.Routes
import org.jspare.vertx.web.module.HttpServerModule

@Routes(scanClasspath = true)
@Modules(Module(HttpServerModule::class))
class RestModule : JspareVerticle(){

  @Get
  @Handler
  fun getAccounts(ctx : RoutingContext) = ctx?.response().end(
    JsonArray().add(
      JsonObject().put("hello", "world").encode()
    ))   
}

ok... in java:

import org.jspare.vertx.JspareVerticle;
import org.jspare.vertx.annotation.Module;
import org.jspare.vertx.annotation.Modules;
import org.jspare.vertx.web.annotation.module.Routes;
import org.jspare.vertx.web.module.HttpServerModule;

@Routes(scanPackages = true)
@Modules({
  @Module(HttpServerModule.class)
})
class RestModule extends JspareVerticle{

  @Get
  @Handler
  void getAccounts(RoutingContext ctx) {
    ctx.response().end(new JsonArray().add(
      new JsonObject().put("name", "Paulo").encode()
    ));
  } 
}

This is a very simple example, use your imagination to create awesome api's and services, this project is designed to improve your vert.x experience.

Documentation

You can find the vertx-jspare documentation here which has extended usage instructions and other useful information. Substantial usage information can be found in the API documentation.

We are writting one complete documentation, but this consumes long time, just we ask patience and your help. I'll be a commiter. Please enjoy with us. =)

Getting help and Reporting Issues

Having trouble with Jspare Container? We’d like to help!

Other Projects

Be sure to visit our other projects, jspare-container is the basis of all our frameworks and solutions. See it at: http://jspare.org/ or here on github: https://github.com/jspare-projects/

License

All Jspare projects are Open Source software released under the Apache 2.0 license.

vertx-jspare's People

Contributors

senior-ssm avatar pflima92 avatar

Stargazers

Chan Nguyen avatar Blake Lai avatar Ben Craig avatar qiulin avatar Armen avatar Liu Rui avatar Thomas Kim Pham avatar Kairan Moraes avatar  avatar

Watchers

Blake Lai avatar James Cloos avatar  avatar  avatar

Forkers

sj96

vertx-jspare's Issues

Auto Discover new CDI Components

Allow that one Injectable class can discover CDI components allowing auto discover mode using classpath scanner, similar to Spring Boot. We can told Vert.x boot?

Erro quando não passa json via método post

Quando envio uma requisição para uma rota POST que espera receber um json como parâmetro mas passo o parâmetro nulo, é retornado o seguinte erro:

io.vertx.core.json.DecodeException: Failed to decode: No content to map due to end-of-input
at [Source: ; line: 1, column: 0]
at io.vertx.core.json.Json.decodeValue(Json.java:123)
at org.jspare.vertx.web.handler.DefaultHandler.resolveParameter(DefaultHandler.java:227)
at org.jspare.vertx.web.handler.DefaultHandler.collectParameters(DefaultHandler.java:131)
at org.jspare.vertx.web.handler.DefaultHandler.handle(DefaultHandler.java:90)
at org.jspare.vertx.web.handler.DefaultHandler.handle(DefaultHandler.java:42)

O problema é que não consigo tratar esse erro.

CDI Container Thread Safe with Event Loop and Async load.

Allow that the CDI container should be managed by vert.x instance prevent undeseribles access without one thread safe schema. Uncoumpling the container from jspare-core.

Allow that one component be discovered by your implementation and the inverse too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.