# Reactor-Guice
**Repository Path**: willbeahero/Reactor-Guice
## Basic Information
- **Project Name**: Reactor-Guice
- **Description**: Reactor-Guice 是一个基于 Reactor 的 Guice 框架,集成了 Google Guice 和 Reactor-netty 框架
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: https://www.oschina.net/p/Reactor-Guice
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 8
- **Created**: 2019-11-08
- **Last Updated**: 2021-02-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# reactor-guice
Reactor-guice integrates the framework of Google Guice and Reactor-netty
#### Milestone
``` html
0.0.3 Support annotations GET POST PUT DELETE
0.0.3 Support annotations Products PATH
0.0.3 Static File Support
0.0.3 Support Websocket
0.0.4 Custom filter by uri
0.0.5 index.html in the default output directory
0.0.5 Support for custom templates lib
with gson and Jackson convert
0.0.5 Support for custom json lib
with freeemark convert
and modelmap for template
0.0.5 you can upload files
0.0.6 POST can be an array
0.0.7 use redirect:/** to redirect
0.0.8 support api gateway model
fix Repeated header information
add cross domain header and options request
0.0.9 support protobuf ( can output byte[] )
fix redirect bug ... -_-
the default JSON output returns the execution
result directly ( remove object wrapping )
0.10 support BeanParam for form data , json data and protobuf data
upload file recive support byte[] UploadFile File annotation
upload file use File type can auto save specified directory
add more test example
0.11 autoscan controller Class than add custom mothd to route
(Remove handlePackage , add basePackage to create server Method)
autoscan service class ,then inject Guice model
support udp server
maybe use Jersey to execute dispatch
```
### 1. import reactor-guice
#### maven
```
com.doopp
reactor-guice
0.11
```
#### gradle
```
compile 'com.doopp:reactor-guice:0.11'
```
### 2. create you application
```java
// Injector injector = Guice.createInjector(...);
ReactorGuiceServer.create()
.bind(host, port)
// .injector(injector)
.createInjector(Module... mudules)
.setHttpMessageConverter(new JacksonHttpMessageConverter())
.setTemplateDelegate(new FreemarkTemplateDelegate())
.handlePackages("com.doopp.reactor.guice.test")
.addFilter("/", TestFilter.class)
.crossOrigin(true)
.printError(true)
.launch();
```
### 3. creat you service
#### Handle Example
```java
@Controller
class ApplicationController {
/** https://kreactor.doopp.com/test/json **/
@GET
@Path("/json")
@Produces({MediaType.APPLICATION_JSON})
public Mono