- Kotlin for Enterprise Applications using Java EE
- Raghavendra Rao K
- 97字
- 2021-06-10 18:49:30
Using the kotlin-spring plugin in Gradle
In Gradle, the kotlin-spring compiler plugin can be enabled by using buildscript with the allopen artifact, as shown here:
buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
}
}
apply plugin: "kotlin-spring"
Alternatively, the plugin can be enabled using plugins as follows:
plugins {
id "org.jetbrains.kotlin.plugin.spring" version "1.2.41"
}
This plugin specifies the following annotations:
- @Component
- @Transactional
- @Async
- @Cacheable
- @SpringBootTest
The classes that are annotated with these annotations are made open and accessible to the Spring framework so that we can create proxy objects.
推薦閱讀
- 數據科學實戰手冊(R+Python)
- C#高級編程(第10版) C# 6 & .NET Core 1.0 (.NET開發經典名著)
- Drupal 8 Blueprints
- Kubernetes實戰
- Docker進階與實戰
- C# 2012程序設計實踐教程 (清華電腦學堂)
- HBase從入門到實戰
- Monitoring Elasticsearch
- TradeStation交易應用實踐:量化方法構建贏家策略(原書第2版)
- Jupyter數據科學實戰
- UML 基礎與 Rose 建模案例(第3版)
- Spring核心技術和案例實戰
- NGINX Cookbook
- Mastering Linux Security and Hardening
- C++20高級編程