GithubHelp home page GithubHelp logo

bootique / bootique-kotlin Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 4.0 323 KB

RETIRED. Provides extension functions and features for smooth development with Bootique and Kotlin.

Home Page: https://bootique.io/docs/latest/bootique-kotlin-docs/

License: Apache License 2.0

Kotlin 99.61% HTML 0.39%
bootique kotlin kotlin-script

bootique-kotlin's Introduction

build test deploy Maven Central

Bootique is a minimally opinionated java launcher and integration technology. It is intended for building container-less runnable Java applications. With Bootique you can create REST services, webapps, jobs, DB migration tasks, etc. and run them as if they were simple commands. No JavaEE container required! Among other things Bootique is an ideal platform for Java microservices, as it allows you to create a fully-functional app with minimal setup.

Each Bootique app is a collection of modules interacting with each other via dependency injection. This GitHub project provides Bootique core. Bootique team also develops a number of important modules. A full list is available here.

Quick Links

Support

You have two options:

  • Open an issue on GitHub with a label of "help wanted" or "question" (or "bug" if you think you found a bug).
  • Post a question on the Bootique forum.

TL;DR

For the impatient, here is how to get started with Bootique:

  • Declare the official module collection:
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.bootique.bom</groupId>
            <artifactId>bootique-bom</artifactId>
            <version>3.0-M4</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency> 
    </dependencies>
</dependencyManagement>
  • Include the modules that you need:
<dependencies>
    <dependency>
        <groupId>io.bootique.jersey</groupId>
        <artifactId>bootique-jersey</artifactId>
    </dependency>
    <dependency>
        <groupId>io.bootique.logback</groupId>
        <artifactId>bootique-logback</artifactId>
    </dependency>
</dependencies>
  • Write your app:
package com.foo;

import io.bootique.Bootique;

public class Application {
    public static void main(String[] args) {
        Bootique
            .app(args)
            .autoLoadModules()
            .exec()
            .exit();
    }
}

It has main() method, so you can run it!

For a more detailed tutorial proceed to this link.

Upgrading

See the "maven-central" badge above for the current production version of bootique-bom. When upgrading, don't forget to check upgrade notes specific to your version.

bootique-kotlin's People

Contributors

aarrsseni avatar andrus avatar const1993 avatar elena-bondareva avatar irus avatar stariy95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootique-kotlin's Issues

Kotlin stdlib should be provided dependency

Kotlin stdlib should be provided dependency, since every Kotlin project always includes it, so it's better to not include it from library side. It will help in case if user uses never version of kotlin, but older kotlin stdlib comes with bootique-kotlin, which can lead to unpredictable behavior at runtime.

`bootique-kotlin-jackson` KotlinJacksonServiceTest is failing

Here's a full stack trace:

io.bootique.di.DIRuntimeException: Error invoking provider method 'config()' of module 'io.bootique.kotlin.jackson.TestKotlinModule'

 Injection trace: 

 [0] resolving key <BindingKey: io.bootique.kotlin.jackson.TestConfig>
    -> Invoking provider method 'config()' of module 'io.bootique.kotlin.jackson.TestKotlinModule'


Caused by: java.lang.IllegalStateException: KotlinValueInstantiator requires that the default ValueInstantiator is StdValueInstantiator
	at com.fasterxml.jackson.module.kotlin.KotlinInstantiators.findValueInstantiator(KotlinValueInstantiator.kt:174)
	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:230)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:262)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:151)
	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:415)
	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:350)
	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
	at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:648)
	at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:4861)
	at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4706)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2879)
	at io.bootique.config.jackson.JsonConfigurationFactory.config(JsonConfigurationFactory.java:59)
	at io.bootique.di.spi.DIJsonConfigurationFactory.config(DIJsonConfigurationFactory.java:69)
	at io.bootique.kotlin.jackson.TestKotlinModule.config(KotlinJacksonServiceTest.kt:67)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.bootique.di.spi.ProvidesHandler$ProvidesMethodProvider.get(ProvidesHandler.java:180)
	at io.bootique.di.spi.TraceableProvider.get(TraceableProvider.java:49)
	at io.bootique.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
	at io.bootique.BQRuntime.getInstance(BQRuntime.java:66)
	at io.bootique.BQRuntime.getInstance(BQRuntime.java:52)
	at io.bootique.kotlin.core.DefaultKotlinBQRuntime.getInstance(KotlinBootique.kt:230)
	at io.bootique.kotlin.jackson.KotlinJacksonServiceTest.test(KotlinJacksonServiceTest.kt:44)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)

Coroutines handlers/wrappers

Undertow is async http server, and coroutines helps to write async code. So I'll add coroutines-enabled interfaces and adapters for undertow.

Rename packages to avoid "split packages"

For example kotlin-jetty and kotlin-logback both using io.bootique.kotlin.config.modules package.

Rename to scheme:

io.bootique.kotlin.config.name: io.bootique.kotlin.config.jetty

Issues with kotlin-compiler

There are few issues related to Kotlin Compiler (they affects only bootique-kotlin-config module):

  1. Since kotlin-script-util requires kotlin-compiler present in the classpath, we can't use fatjar approach, and forced to use application plugin in gradle, or appassembler in maven.
  2. Since kotlin-compiler fatjar, and it's includes guava - there are different issues appears because of different versions of same classes in classpath.

Related Kotlin issues:

Issues with bootique-kotlin-config autoloading

Some background... "bootique-bom-tests-all" is a test module that attempts to drop every single Bootique module in one runtime and see that the apps can start and run with no conflicts. In this setup it looks like KotlinConfigModule creates an issue with auto-loading. The change below causes the AgrestAppIT test failure with exception (also below). I suspect KotlinConfigModule must override KotlinBootique and not BQCoreModule (??)

diff --git a/bootique-bom-tests-all/src/test/java/io/bootique/bom/agrest/AgrestAppIT.java b/bootique-bom-tests-all/src/test/java/io/bootique/bom/agrest/AgrestAppIT.java
index 0df12c6..0e0752b 100644
--- a/bootique-bom-tests-all/src/test/java/io/bootique/bom/agrest/AgrestAppIT.java
+++ b/bootique-bom-tests-all/src/test/java/io/bootique/bom/agrest/AgrestAppIT.java
@@ -47,6 +47,7 @@ public class AgrestAppIT {
 
     private TestRuntumeBuilder appBuilder(String... args) {
         return testFactory.app(args)
+                .autoLoadModules()
                 .module(db.moduleWithTestDataSource("ds"))
                 .moduleProvider(new AgrestModuleProvider())
                 .moduleProvider(new JdbcTomcatModuleProvider())
io.bootique.BootiqueException: Module BQCoreModule provided by Bootique is overridden twice by KotlinConfigModule

at io.bootique.ModuleGraph.lambda$null$1(ModuleGraph.java:74)
at java.util.HashMap.compute(HashMap.java:1197)
at io.bootique.ModuleGraph.lambda$null$2(ModuleGraph.java:67)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at io.bootique.ModuleGraph.lambda$inDegree$3(ModuleGraph.java:67)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at io.bootique.ModuleGraph.inDegree(ModuleGraph.java:66)
at io.bootique.ModuleGraph.topSort(ModuleGraph.java:88)
at io.bootique.RuntimeModuleMerger.toDIModules(RuntimeModuleMerger.java:58)
at io.bootique.Bootique.createInjector(Bootique.java:444)
at io.bootique.Bootique.createRuntime(Bootique.java:316)
at io.bootique.junit5.TestRuntumeBuilder.createRuntime(TestRuntumeBuilder.java:69)
at io.bootique.junit5.TestRuntumeBuilder.run(TestRuntumeBuilder.java:81)
at io.bootique.bom.agrest.AgrestAppIT.testRun(AgrestAppIT.java:72)

cc @IRus

NPE in KotlinScriptConfigurationFactory

After applying PRs from #12 and #13 the earlier error in "bootique-bom" tests is gone, but now I have a new one. I isolated Kotlin tests under "bootique-bom" in a separate module, and added @Disabled to this test, so I could commit it to master, and anyone can run and reproduce it. Here is the test: https://github.com/bootique/bootique-bom/blob/master/bootique-bom-tests-all-kotlin/src/test/java/io/bootique/bom/kotlin/AutoLoadingIT.java

Caused by: io.bootique.di.DIRuntimeException: Error invoking provider method 'provideDataSourceStarters()' of module 'io.bootique.jdbc.JdbcModule'

 Injection trace: 

 [0] resolving key <BindingKey: java.util.Map[java.lang.String, io.bootique.jdbc.managed.ManagedDataSourceStarter]>
    -> Invoking provider method 'provideDataSourceStarters()' of module 'io.bootique.jdbc.JdbcModule'

 [1] resolving key <BindingKey: io.bootique.jdbc.DataSourceFactory>
    -> Get argument 0 for provider method 'createDataSource()' of module 'io.bootique.jdbc.JdbcModule'

 [2] resolving key <BindingKey: org.apache.cayenne.configuration.server.ServerRuntime>
    -> Get argument 1 for provider method 'createCayenneRuntime()' of module 'io.bootique.cayenne.v41.CayenneModule'

 [3] resolving key <BindingKey: io.bootique.cayenne.v41.test.CayenneTestModule$SchemaLoader>
    -> Get argument 1 for constructor of class 'io.bootique.cayenne.v41.test.CayenneTestModule$SchemaLoader'

Caused by: java.lang.NullPointerException: null cannot be cast to non-null type T
	at io.bootique.kotlin.config.KotlinScriptConfigurationFactory.createInstanceUsingDefaultConstructor(KotlinScriptConfigurationFactory.kt:76)
	at io.bootique.kotlin.config.KotlinScriptConfigurationFactory.config(KotlinScriptConfigurationFactory.kt:57)
	at io.bootique.kotlin.config.KotlinScriptConfigurationFactory.config(KotlinScriptConfigurationFactory.kt:69)
	at io.bootique.jdbc.JdbcModule.provideDataSourceStarters(JdbcModule.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at io.bootique.di.spi.ProvidesHandler$ProvidesMethodProvider.get(ProvidesHandler.java:180)
	at io.bootique.di.spi.TraceableProvider.get(TraceableProvider.java:49)
	at io.bootique.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:268)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:246)
	at io.bootique.di.spi.DefaultInjector.getInstance(DefaultInjector.java:242)
	at io.bootique.di.spi.ProvidesHandler.lambda$createArgumentProviders$1(ProvidesHandler.java:142)
	at io.bootique.di.spi.ProvidesHandler$ProvidesMethodProvider.get(ProvidesHandler.java:174)
	at io.bootique.di.spi.TraceableProvider.get(TraceableProvider.java:49)
	at io.bootique.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:268)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:246)
	at io.bootique.di.spi.DefaultInjector.getInstance(DefaultInjector.java:242)
	at io.bootique.di.spi.ProvidesHandler.lambda$createArgumentProviders$1(ProvidesHandler.java:142)
	at io.bootique.di.spi.ProvidesHandler$ProvidesMethodProvider.get(ProvidesHandler.java:174)
	at io.bootique.di.spi.TraceableProvider.get(TraceableProvider.java:49)
	at io.bootique.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:268)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:246)
	at io.bootique.di.spi.ConstructorInjectingProvider.value(ConstructorInjectingProvider.java:124)
	at io.bootique.di.spi.ConstructorInjectingProvider.get(ConstructorInjectingProvider.java:102)
	at io.bootique.di.spi.MemberInjectingProvider.get(MemberInjectingProvider.java:46)
	at io.bootique.di.spi.TraceableProvider.get(TraceableProvider.java:49)
	at io.bootique.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:268)
	at io.bootique.di.spi.DefaultInjector.getInstanceWithCycleProtection(DefaultInjector.java:246)
	at io.bootique.di.spi.DefaultInjector.getInstance(DefaultInjector.java:242)
	at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4649)
	at java.util.Collections$SetFromMap.forEach(Collections.java:5530)
	at io.bootique.di.spi.DefaultInjector.earlySetup(DefaultInjector.java:419)
	at io.bootique.di.spi.DefaultInjector.<init>(DefaultInjector.java:122)
	at io.bootique.di.DIBootstrap$InjectorBuilder.build(DIBootstrap.java:254)
	at io.bootique.Bootique.createInjector(Bootique.java:445)
	at io.bootique.Bootique.createRuntime(Bootique.java:316)
	at io.bootique.bom.kotlin.AutoLoadingIT.<clinit>(AutoLoadingIT.java:40)

Deprecate Kotlin integration

The idea to provide an even friendlier Bootique API and configuration for server-side Kotlin developers using Kotlin-specific features was a solid one. But there's currently no way to support it, let alone to modernize and improve it properly. So we'll have to deprecate bootique-kotlin and remove it in 4.0

Config for prefix 'xyz' not found.

KotlinScriptConfigurationFactory throws on missing "config prefix". The following exception happens when running AutoLoadingIT in bootique-bom, with Kotlin enabled (see below). The behavior of KotlinScriptConfigurationFactory is different from JsonNodeConfigurationFactory. JsonNodeConfigurationFactory would load configuration even if the configuration tree does not have a node with a given prefix. Which is a valid situation.. Almost all modules can start with defaults with no explicit config.

Caused by: java.lang.RuntimeException: Config for prefix 'metrics' not found.
	at io.bootique.kotlin.config.KotlinScriptConfigurationFactory.config(KotlinScriptConfigurationFactory.kt:58)
	at io.bootique.ConfigModule.config(ConfigModule.java:74)
	at io.bootique.metrics.MetricsModule.provideMetricRegistryFactory(MetricsModule.java:52)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at io.bootique.di.spi.ProvidesHandler$ProvidesMethodProvider.get(ProvidesHandler.java:180)
	at io.bootique.di.spi.TraceableProvider.get(TraceableProvider.java:49)
	at io.bootique.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:50)
diff --git a/bootique-bom-tests-all/pom.xml b/bootique-bom-tests-all/pom.xml
index e3602d7..75db6d7 100644
--- a/bootique-bom-tests-all/pom.xml
+++ b/bootique-bom-tests-all/pom.xml
@@ -221,22 +221,22 @@
             <groupId>io.bootique.kafka</groupId>
             <artifactId>bootique-kafka-streams</artifactId>
         </dependency>
-<!--        <dependency>-->
-<!--            <groupId>io.bootique.kotlin</groupId>-->
-<!--            <artifactId>bootique-kotlin</artifactId>-->
-<!--        </dependency>-->
-<!--        <dependency>-->
-<!--            <groupId>io.bootique.kotlin</groupId>-->
-<!--            <artifactId>bootique-kotlin-config</artifactId>-->
-<!--        </dependency>-->
-<!--        <dependency>-->
-<!--            <groupId>io.bootique.kotlin</groupId>-->
-<!--            <artifactId>bootique-kotlin-jetty</artifactId>-->
-<!--        </dependency>-->
-<!--        <dependency>-->
-<!--            <groupId>io.bootique.kotlin</groupId>-->
-<!--            <artifactId>bootique-kotlin-logback</artifactId>-->
-<!--        </dependency>-->
+        <dependency>
+            <groupId>io.bootique.kotlin</groupId>
+            <artifactId>bootique-kotlin</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.bootique.kotlin</groupId>
+            <artifactId>bootique-kotlin-config</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.bootique.kotlin</groupId>
+            <artifactId>bootique-kotlin-jetty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.bootique.kotlin</groupId>
+            <artifactId>bootique-kotlin-logback</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.bootique.linkmove</groupId>
             <artifactId>bootique-linkmove-cayenne41</artifactId>

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.