Festvial是一个基于Vertx、Rxjava等开源库,拥有IOC、AOP功能的响应式Web框架。
Festvial是一个基于Vertx、Rxjava等开源库,拥有IOC、AOP功能的响应式Web框架。
引入maven依赖
<dependency>
<groupId>com.github.bdqfork</groupId>
<artifactId>festival-web</artifactId>
<version>0.5.0</version>
</dependency>
或者gradle依赖
implementation 'com.github.bdqfork:festival-web:0.5.0'
然后编写路由,运行WebApplicationContext。
@Singleton
@RouteController
public class UserController {
@GetMapping("/hello")
public String hello() {
return "hello festival";
}
public static void main(String[] args) throws Exception {
WebApplication.run(UserController.class);
}
}
访问http://localhost:8080/hello 即可看见hello festival。
Copyright (C) 2017 - present, bdqfork.
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.