A simple and modern Java and Kotlin vert.x web framework

Overview

Cloudopt Next

image.png image.png

Cloudopt Next is a very lightweight and modern, JVM-based, full stack kotlin framework designed for building modular, easily testable JVM applications with support for Java, Kotlin language, crafted from the best of breed Java libraries and standards.

Cloudopt Next has the following features:

Simple Minimalist design, almost no configuration, no dependence on tomcat, jetty and other web containers.

Asyn Based on vertx, it is easy to achieve high-performance asynchronous services.

Plugin Supports various components of the vertx system, and also supports the extension of functions through plug-ins. The official also provides a large number of useful plug-ins.

Chinese All Chinese documents, Chinese community to help Chinese developers get started quickly

Started

You can view the document by visiting the official website of Cloudopt Next, or you can go to example to see a simple example.

Route

Let's take a look at a simple route based on Cloudopt Next:

@API("/")
class IndexController : Resource() {
    @GET
    fun get(){
        renderHtml(view = "index")
    }
}
@API(value = "/")
public class IndexController extends Resource {
    @GET
    public void get(){
        View v = new View();
        v.setView("index");
        renderHtml(view);
    }
}

Run

fun main(args: Array<String>) {
    CloudoptServer.run()
}
public static void main(String args[]) {
    CloudoptServer.run();
}

SockJS

@SocketJS("/socket/api/*")
class SocketController : SocketJSResource {
    override fun handler(socket: SockJSSocket) {
        println(socket)
        socket.handler {message->
            println(message)
            socket.write("Hello world!")
        }
    }
}

Plugin

fun main(args: Array<String>) {
    CloudoptServer.addPlugin(TestPlugin())
    CloudoptServer.addPlugin(EventPlugin())
    CloudoptServer.run()
}

Getting help

Having trouble with Cloudopt Next? We’d like to help!

  • Follow our twitter to get the latest information.
  • Check the reference documentation carefully for specific code cases or common problems.
  • If you have a problem with the upgrade, check the upgrade instructions in the Wiki.
  • Send mail to [email protected].
  • Send issue to your question on GitHub, we will answer it as soon as possible.
  • If you are in China, you can also join the QQ group: 557692142.

Reporting Issues

Cloudopt Next uses GitHub’s integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:

  • Before you log a bug, please search the issue tracker to see if someone has already reported the problem.
  • Please provide as much information as possible with the issue report, we like to know the version of Cloudopt Next that you are using, as well as your Operating System and JVM version.

License

Cloudopt Next is Open Source software released under the Apache 2.0 license.

Comments
  • 前后端分离本地调试,前端vue请求后端服务接口失败,报CORS error

    前后端分离本地调试,前端vue请求后端服务接口失败,报CORS error

    配置文件未配置属性cors,查看源码默认开启跨域访问的。 但,仍报跨域错误。 而用原生vertx代码,却是可以的。 router.route().handler(CorsHandler.create(".") .allowCredentials(true) .allowedMethods(setOf(HttpMethod.OPTIONS, HttpMethod.GET, HttpMethod.POST, HttpMethod.PUT, HttpMethod.DELETE)) .allowedHeader("") .maxAgeSeconds(3600) )

    support 
    opened by qianqian78 6
  • 部署到腾讯云 centos7 ,日志显示启动正常,但是任何请求都不响应。而在window 10上都正常。版本3.0.0.1.RELEASE

    部署到腾讯云 centos7 ,日志显示启动正常,但是任何请求都不响应。而在window 10上都正常。版本3.0.0.1.RELEASE

    11:52:42,617 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 11:52:42,618 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 11:52:42,622 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/work/powerdesign/classes/logback.xml] 11:52:42,623 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 11:52:42,623 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/work/powerdesign/lib/cloudopt-next-web.jar!/logback.xml] 11:52:42,623 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/work/powerdesign/classes/logback.xml] 11:52:42,748 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 11:52:42,749 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 11:52:42,756 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] 11:52:42,763 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 11:52:42,842 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 11:52:42,842 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 11:52:42,842 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 11:52:42,843 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@a74868d - Registering current configuration as safe fallback point

    [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ███╗ ██╗███████╗██╗ ██╗████████╗ [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝ [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ██╔██╗ ██║█████╗ ╚███╔╝ ██║ [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ██║╚██╗██║██╔══╝ ██╔██╗ ██║ [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ██║ ╚████║███████╗██╔╝ ██╗ ██║ [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝ [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: Java Version: 11.0.9 [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: Java Provider: Red Hat, Inc. [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: System: Linux [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: Time: 2021-05-30 11:52:43 [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: Listener Port: 9090 [Cloudopt Next] 2021-05-30 11:52:43 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ------------------------------------------------------------------------------------------- [Cloudopt Next] 2021-05-30 11:52:43 com.zaxxer.hikari.HikariDataSource [INFO ] - HikariPool-1 - Starting... [Cloudopt Next] 2021-05-30 11:52:44 com.zaxxer.hikari.HikariDataSource [INFO ] - HikariPool-1 - Start completed. [Cloudopt Next] 2021-05-30 11:52:44 com.zaxxer.hikari.HikariDataSource [INFO ] - HikariPool-1 - Starting... [Cloudopt Next] 2021-05-30 11:52:44 com.zaxxer.hikari.HikariDataSource [INFO ] - HikariPool-1 - Start completed. [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [PLUGIN] Registered plugin:net.cloudopt.next.jooq.JooqPlugin [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [FAILURE HANDLER] Registered failure handler:net.cloudopt.next.web.handler.DefaultErrorHandler [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [HANDLER] Registered handler:net.cloudopt.next.web.handler.CorsHandler [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [HANDLER] Registered handler:net.cloudopt.next.web.handler.CookieCorsHandler [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [HANDLER] Registered handler:net.cloudopt.next.web.handler.WafHandler [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [HANDLER] Registered handler:net.cloudopt.next.web.handler.ShowRouteHandler [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [RESOURCE] Registered resource POST :addCellMeta | /api/addCellMeta [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [RESOURCE] Registered resource GET :listGraphFile | /api/listGraphFile [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [RESOURCE] Registered resource POST :modifyGraph | /api/modifyGraph [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [RESOURCE] Registered resource GET :queryCellSchemaMap | /api/queryCellSchemaMap [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [RESOURCE] Registered resource POST :queryGraph | /api/queryGraph [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [RESOURCE] Registered resource GET :querySideBarGroups | /api/querySideBarGroups [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: [RESOURCE] Registered resource POST :save | /api/save [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ========================================================================================================== [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO:  Cloudopt Next started success! [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: http://127.0.0.1:9090 [Cloudopt Next] 2021-05-30 11:52:44 net.cloudopt.next.web.NextServer [INFO ] - ℹ️ INFO: ==========================================================================================================

    [root@VM-0-6-centos ~]# curl http://127.0.0.1:9090/static/index.html curl: (52) Empty reply from server

    support 
    opened by qianqian78 6
  • bug: logger的实现类造成崩溃

    bug: logger的实现类造成崩溃

    我的cookie是这样的: Cookie : "Phpstorm-385e8778=4b818d7f-e37d-49f1-bd6e-7a0ec9a27d09; PHPSESSID=luks4l55tj9j2t4c8actdkjnh3; Phpstorm-a03fb457=e86b135e-de94-4232-8e3f-b04158ee52fe; loggedon=26d1ebd4ec8c55cc69f190d0d37f6dac; filemanager=lg7p67m427lhmhe3tej9tefq00; fm_current_dir=D%3A%5C; _ga=GA1.1.701572348.1585020446; Phpstorm-66f14207=89186c57-4c50-4c74-ab23-4aa81b6bd591; io=VhmAg7_IBC33-941AAAA; JSESSIONID=B53DBEB5A049B01722CCC240BE257EC9" 其中%3A和%5C这种urlencode过的字符串,会被String.format误识别为标识符,造成格式化字符串报错。 Slf4JLogger 里面的实现,也有点问题,format之后又来一次*args。 logger.info("${Colorer.blue(Logger.configuration.infoPrefix)} ${String.format(message, *args)}", *args)

    在实现上slf4j的logger比较好,使用的是{}来标识替代位置,这种不会造成格式化出错问题。

    相关源码 https://github.com/cloudoptlab/cloudopt-next/blob/e14195406b7c24aa5797ab1470b1389b9217cb1d/cloudopt-next-web/src/main/kotlin/net/cloudopt/next/web/handler/ShowRouteHandler.kt#L51

    https://github.com/cloudoptlab/cloudopt-next/blob/e14195406b7c24aa5797ab1470b1389b9217cb1d/cloudopt-next-logging/src/main/kotlin/net/cloudopt/next/logging/provider/Slf4jLoggerProvider.kt#L49

    https://github.com/cloudoptlab/cloudopt-next/blob/e14195406b7c24aa5797ab1470b1389b9217cb1d/cloudopt-next-logging/src/main/kotlin/net/cloudopt/next/logging/provider/JdkLoggerProvider.kt#L70

    bug 
    opened by cat9 5
  • netty版本不一致,GraalVM打包netty报错,不知道是不是版本冲突引起。

    netty版本不一致,GraalVM打包netty报错,不知道是不是版本冲突引起。

    提几个小小的但是自我感觉非常重要的更新建议哈: 1、netty版本需要更新一下,目前用的3.0.3.0-RELEASE版本,依赖列表可以看到4.1.65跟4.1.75两个版本,然后我看Cloudopt-next饮用的4.1.65,希望可以统一升级为4.1.75,我这边使用GraalVM打包netty报错,不知道是不是由于版本冲突导致的,因此无法打包成native可执行文件。 2、日志那个handle(ShowRouteHandler)的@AutoHandler这个注解希望可以移除掉,目前不太符合我们项目需求,需要自定义,如果自定义,每次请求都打印两部分日志,非常难受。(文档里面的示例可以展示给用户,让用户选择是否要用这个handle,也可以模仿这个handle自定义自己的日志handle)

    目前就以上两个问题希望可以尽快解决一下,谢谢各位开源作者可以贡献出这么优质,易用轻量的kotlin的服务端框架!

    support 
    opened by 891806797 3
  • 启动报出Thread blocked

    启动报出Thread blocked

    2022-07-05 11:55:26.675 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker - Thread Thread[vert.x-eventloop-thread-2,5,main] has been blocked for 2813 ms, time limit is 2000 ms 2022-07-05 11:55:27.681 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker - Thread Thread[vert.x-eventloop-thread-2,5,main] has been blocked for 3820 ms, time limit is 2000 ms 2022-07-05 11:55:28.722 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker - Thread Thread[vert.x-eventloop-thread-2,5,main] has been blocked for 4861 ms, time limit is 2000 ms 2022-07-05 11:55:29.731 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker - Thread Thread[vert.x-eventloop-thread-2,5,main] has been blocked for 5866 ms, time limit is 2000 ms io.vertx.core.VertxException: Thread blocked at [email protected]/java.io.WinNTFileSystem.getBooleanAttributes(Native Method) at [email protected]/java.io.File.exists(File.java:820) at [email protected]/java.io.WinNTFileSystem.lambda$listRoots$1(WinNTFileSystem.java:600) at [email protected]/java.io.WinNTFileSystem$$Lambda$247/0x00000008004c3440.test(Unknown Source) at [email protected]/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176) at [email protected]/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180) at [email protected]/java.util.BitSet$1BitSetSpliterator.forEachRemaining(BitSet.java:1302) at [email protected]/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:699) at [email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at [email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at [email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:550) at [email protected]/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) at [email protected]/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:517) at [email protected]/java.io.WinNTFileSystem.listRoots(WinNTFileSystem.java:601) at [email protected]/java.io.File.listRoots(File.java:1791) at app//io.vertx.ext.web.handler.impl.StaticHandlerImpl.setRoot(StaticHandlerImpl.java:590) at app//io.vertx.ext.web.handler.impl.StaticHandlerImpl.setWebRoot(StaticHandlerImpl.java:453) at app//net.cloudopt.next.web.NextServerVerticle.start(NextServerVerticle.kt:220) at app//io.vertx.kotlin.coroutines.CoroutineVerticle$start$1.invokeSuspend(CoroutineVerticle.kt:50) at app//kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at app//kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at app//io.vertx.kotlin.coroutines.VertxCoroutineExecutor.execute(VertxCoroutine.kt:229) at app//kotlinx.coroutines.ExecutorCoroutineDispatcherBase.dispatch(Executors.kt:94) at app//kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:332) at app//kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30) at app//kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25) at app//kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110) at app//kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126) at app//kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56) at app//kotlinx.coroutines.BuildersKt.launch(Unknown Source) at app//kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47) at app//kotlinx.coroutines.BuildersKt.launch$default(Unknown Source) at app//io.vertx.kotlin.coroutines.CoroutineVerticle.start(CoroutineVerticle.kt:48) at app//io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:196) at app//io.vertx.core.impl.DeploymentManager$$Lambda$234/0x00000008004c7c40.handle(Unknown Source) at app//io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:96) at app//io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:59) at app//io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:37) at app//io.vertx.core.impl.EventLoopContext$$Lambda$116/0x000000080037e840.run(Unknown Source) at app//io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164) at app//io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) at app//io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at app//io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at app//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at [email protected]/java.lang.Thread.run(Thread.java:834)

    support 
    opened by qianqian78 3
  • 在一个方法上添加两个自定义annotation,这两个自定义annotation都用@Before修饰,而只有一个Before的invokeBy类中的方法被调用。

    在一个方法上添加两个自定义annotation,这两个自定义annotation都用@Before修饰,而只有一个Before的invokeBy类中的方法被调用。

    //第一个annotation @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.FUNCTION) @MustBeDocumented

    @Before(invokeBy = [RoleCheck::class]) annotation class PreRole( val value: String, ) //第二个annotation @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.FUNCTION) @MustBeDocumented

    @Before(invokeBy = [PermissionCheck::class]) annotation class PreAuthorize( val value: String, )

    // @API("/api/log") class LogController : Resource() {

    @GET("/list")
    @PreRole("admin")
    @PreAuthorize("log:list")
    suspend fun list() {
      //......
    }
    

    }

    跟踪代码发现: 问题在NextServer.kt 第169行,beforeRouteHandlersTable[resourceUrl]?.get(httpMethod)?.plus(annotation)

    bug 
    opened by qianqian78 3
  • 依赖cloudopt-next-eventbus时,也必须同时依赖lettuce-core,否则启动打印类找不到。

    依赖cloudopt-next-eventbus时,也必须同时依赖lettuce-core,否则启动打印类找不到。

    net.cloudopt.next cloudopt-next-eventbus ${nextVersion}

    java.lang.NoClassDefFoundError: io/lettuce/core/pubsub/RedisPubSubAdapter at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at net.cloudopt.next.core.Classer.loadClass(Classer.kt:169) at net.cloudopt.next.core.Classer.fillClass(Classer.kt:365) at net.cloudopt.next.core.Classer.processJarFile(Classer.kt:340) at net.cloudopt.next.core.Classer.fillClasses(Classer.kt:235) at net.cloudopt.next.core.Classer.scanPackage(Classer.kt:127) at net.cloudopt.next.core.Classer.scanPackageByAnnotation(Classer.kt:83) at net.cloudopt.next.web.NextServer.scan(NextServer.kt:208) at net.cloudopt.next.web.NextServer.run(NextServer.kt:277)

    bug 
    opened by qianqian78 3
  • bug:如果application.json文件不存在,无法正常启动

    bug:如果application.json文件不存在,无法正常启动

    类初始化问题,NextServer init先执行检测包名,包名空则抛异常了,导致NextServer.run(App.class)无法正常执行。 public static void main(String[] args) { NextServer.run(App.class); }

    报错: Caused by: java.lang.RuntimeException: Package name must not be null! at net.cloudopt.next.web.NextServer.scan(NextServer.kt:109) at net.cloudopt.next.web.NextServer.(NextServer.kt:78) ... 1 more

    https://github.com/cloudoptlab/cloudopt-next/blob/65f04be0ec56c861279efaa27599ba6d671af009/cloudopt-next-web/src/main/kotlin/net/cloudopt/next/web/NextServer.kt#L78

    bug 
    opened by cat9 3
  • 请增加application.json的处理方式

    请增加application.json的处理方式

    希望支持从jar包外加载application.json ,因为fatjar里面的这个配置文件修改起来不方便。 我的想法是: 思路一,首先从文件系统的当前路径或config目录下加载的application.json文件,如果加载不到,再从jar包里加载。 思路二,文件系统或config目录下的application.json,和jar包里的application.json,合并到一起,且外部的application.json优先。

    feature 
    opened by qianqian78 2
  • getBodyJson 方法不能转换为目标类型对象

    getBodyJson 方法不能转换为目标类型对象

    fun getBodyJson(clazz: Class<*>): Any? { return Jsoner.toJsonObject(Jsoner.toJsonString(context.bodyAsJson), clazz) }

    初步怀疑:context.bodyAsJson获取的是JSONObject类型的对象,所以JSONObject结构并不能转换为clazz类型。

    bug 
    opened by tanqimin 2
  • 功能建议: 自动编译加载、Swagger、GraphQL、WebSocket

    功能建议: 自动编译加载、Swagger、GraphQL、WebSocket

    1. 在开发模式下支持热加载,src目录内容修改后自动编译、重新加载。可以参考KtorActFramework
    2. 通过注解、decorator生成swagger.json,SwaggerUI加载显示。Spring Boot JFinal支持此项功能
    3. 集成graphQLgraphiQL
    4. 增加WebSocket相关接口
    support 
    opened by venliong 2
Releases(3.1.0.0-RELEASE)
  • 3.1.0.0-RELEASE(Sep 21, 2022)

  • 3.0.3.0-RELEASE(Nov 12, 2021)

  • 3.0.2.0-RELEASE(Oct 10, 2021)

    ● JooqPaginate no longer counts the total at initialization. ● cloudopt-next-kafka supports suspend. ● cloudopt-next-auth supports suspend. ● Upgrade bcprov-jdk15on to 1.69. ● Optimize class scanning tool to avoid forcing some extension classes to be loaded. ● Error interception supports throwing exceptions, now you can handle it for different exceptions. ● Fix an issue that only one takes effect when there are multiple method-level interceptors on a route method.

    Source code(tar.gz)
    Source code(zip)
  • 3.0.1.0-RELEASE(Jul 14, 2021)

    • Update Vert.x version to 4.1.0
    • Final compatible with Netty 4.1.65.
    • WebSocket add methods to get ip and get cookie
    • Support reading external configuration files
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0.1-RELEASE(May 24, 2021)

    • Health Check plugin moved to a separate package.
    • Refactored EventBus.
    • Added a new Before and After RouteHandler mechanism. Any annotation that declares @Before or @After in it and declares the - corresponding implementation handler class will automatically implement an AOP-like interception mechanism depending on whether it is Before or After.
    • @AfterEvent is implemented using the new After RouteHandler mechanism.
    • Removed the valid attribute from the previous HttpMethod annotations of the route (e.g. @GET, @POST).
    • Added a new @Validator annotation, also implemented using the new After RouteHandler mechanism.
    • Adjusted the directory structure and naming of a large number of files.
    • All interceptions such as Handler, Intercept, and Before RouteHandler now automatically shift to 500 when an error occurs, and can now be intercepted with an error interceptor.
    • Because of the tweaks to the implementation of method-level validators, the way the health check automatically registers password validators has been rewritten.
    • EventBus supports using different implementation classes by name.
    • EventBus adds RedisMQ implementation class.
    • Fix the bug that the endHandler still tries to close the response.
    • All annotations under web package are moved to a unified folder.
    • Support registering routes manually via NextServer.registerResourceTable().
    • Optimized automatic route registration logic, reusing NextServer.registerResourceTable().
    • Optimized health plugin's route registration logic, reused NextServer.registerResourceTable().
    • Resource add responseBody variable to store the body in response.
    • Add @Cacheable annotation to the cache plugin.
    • Upgrade netty dependency to 4.1.65.Final.
    • hibernate-validator has been upgraded to 6.2.0.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0.0-BETA8(Apr 12, 2021)

  • 3.0.0.0-BETA7(Apr 9, 2021)

    • Fix the problem of incorrect reading of resource file path
    • Update the logo and use the new jvm ir
    • Rename vertxHttpServer -> httpServerOptions
    • Upgrade vert.x to 4.0.3
    • Optimize file reads, must be non-null
    • Optimize all renders and make them all asyn
    • Add grpc plugin
    • Publish to maven central repository
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0.0-BETA6(Mar 9, 2021)

    • Refactoring the json module
    • Removing fastjson and use Extension Functions
    • Using kryo as serialization and deserialization
    • cloudopt-next-json supports JSR-310
    • Add cloudopt-next-clickhouse
    • Move PermissionTree to companion object
    • Fix the problem that http client timeout settings do not take effect
    • Support for polyglot language programming on graalvm
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0.0-BETA4(Feb 11, 2021)

  • 3.0.0.0-BETA3(Feb 4, 2021)

  • 3.0.0.0-BETA1(Jan 21, 2021)

  • 2.0.8.1-BETA(Oct 14, 2020)

Owner
Cloudopt
Cloudopt is committed to helping global users stay away from phishing sites, virus Trojan site threats
Cloudopt
A simple, modern and coroutine based Kotlin Email API for clientside projects

Kotlinmailer is a Kotlin Mail API, using coroutines and providing DSLs. It may be used in a Ktor Backend for verification mails.

David Bieregger 4 Oct 5, 2022
A modular and portable open source XMPP client library written in Java for Android and Java (SE) VMs

Smack About Smack is an open-source, highly modular, easy to use, XMPP client library written in Java for Java SE compatible JVMs and Android. Being a

Ignite Realtime 2.3k Dec 28, 2022
A modular and portable open source XMPP client library written in Java for Android and Java (SE) VMs

Smack About Smack is an open-source, highly modular, easy to use, XMPP client library written in Java for Java SE compatible JVMs and Android. Being a

Ignite Realtime 2.3k Dec 21, 2021
Simple Android web-view-based application. The primary purpose is to show the website in Kiosk mode.

Kiosk mode app Simple Android web-view-based application. The primary purpose is to show the website in Kiosk mode. By default, the app works in Scree

Mykola Kichatov 1 Oct 25, 2022
🎥 A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose.

ComposeMovie Android ?? A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose. Built with

null 13 Oct 1, 2022
💰 Expense Manager is simple, intuitive, stable and modern app that is just designed for you.

Expense Manager is simple, intuitive, stable and modern app that is just designed for you. Everything you need at your fingertips to manage the expenditures and budgets.

Behzod Bozorboev 13 Oct 20, 2022
A Simple and Minimal Quotes Android Application to demonstrate the Modern Android Development tools

Quotee Android ?? A Simple and Minimal Quotes Android Application to demonstrate the Modern Android Development tools. Developed with ❤️ by Aminullah

null 12 Aug 24, 2022
A simple Android project using modern Android development tools and libraries.

A simple Android project using modern Android development tools and libraries.

Ahmed Sumeiry 0 Feb 3, 2022
A Simple Expense Tracker App 📱 built to demonstrate the use of modern android architecture component with MVVM Architecture

Expenso ?? A Simple Expense Tracker App ?? built to demonstrate the use of modern android architecture component with MVVM Architecture ?? . Made with

Michel Horacio 1 Dec 28, 2022
Simple Notes app demonstrates modern Android development with Hilt, Material Motion, Coroutines, Flow, Jetpack (Room, ViewModel) based on MVVM architecture.

Simple Notes app demonstrates modern Android development with Hilt, Material Motion, Coroutines, Flow, Jetpack (Room, ViewModel) based on MVVM architecture.

Aravind Chowdary 2 Sep 3, 2022
Cody Engel 2 Apr 20, 2022
Vaibhav Jaiswal 57 Jan 3, 2023
Taskify - An app to manage your daily tasks and boost your productivity. Taskify is built using kotlin and follows all modern android Development practices and hence is a good learning resource for beginners

Taskify Taskify is an app to manage your daily tasks and boost your productivity Video Introduction ?? This is a small introduction video about Taskif

Vaibhav Jaiswal 101 Jan 4, 2023
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT ??️ NotyKT is the complete Kotlin-stack note taking ??️ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Jan 8, 2023
Shreyas Patil 2.1k Dec 30, 2022
The JeTrivia is built on a modern Android Development tech stack with MVVM architecture. Kotlin, Coroutine, Flow, StateFlow, Jetpack Compose, Navigation, Room, Hilt, Retrofit2, OkHttp3, kotlinx.serialization, MockK, Truth

JeTrivia ?? In Progress ?? The JeTrivia application is sample based on MVVM architecture. Fetching data from the network via repository pattern and sa

Tolga Bolatcan 5 Mar 31, 2022
Modern-android-lab - Kotlin Language learning lab

kotlin-code-labs Kotlin Language learning lab Run the code with Kotlin Compiler:

Samuel Owino 4 Nov 7, 2022
Simple application with some famous graph algorithm implemented by Jetpack Compose framework

GraphAlgorithm This Application was implemented by Jetpack Compose framework. The dagger-hilt library was used for dependency injection and Room libra

Amirreza lotfi 8 Aug 17, 2022
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

Ionic Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a sin

Ionic 48.4k Jan 3, 2023