Micronaut 2.0 に付属するデフォルトのトランザクション管理の使用に問題があります。私は何かが欠けていることを知っていますが、何がわかりません。ここに小さなサンプル プロジェクトを作成しました。
Application クラスを実行しようとすると、次のエラーが発生します。
12:41:31.838 [main] ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: BeanDefinition.requiresMethodProcessing() returned true but method has no @Executable definition. This should never happen. Please report an issue.
java.lang.IllegalStateException: BeanDefinition.requiresMethodProcessing() returned true but method has no @Executable definition. This should never happen. Please report an issue.
at io.micronaut.context.DefaultBeanContext.lambda$initializeContext$28(DefaultBeanContext.java:1569)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1566)
at io.micronaut.context.DefaultApplicationContext.initializeContext(DefaultApplicationContext.java:220)
at io.micronaut.context.DefaultBeanContext.readAllBeanDefinitionClasses(DefaultBeanContext.java:2763)
at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:227)
at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:166)
at io.micronaut.runtime.Micronaut.start(Micronaut.java:64)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:294)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:280)
at prueba.jdbc.Application.main(Application.java:8)
Process finished with exit code 1
問題は、注釈プロセッサ micronaut-data-processor が正しく構成されていないことだと思いますが、ここで本当に迷っています。