- 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.
推薦閱讀
- Learning Cython Programming
- The Android Game Developer's Handbook
- Architecting the Industrial Internet
- UML+OOPC嵌入式C語言開發精講
- Python機器學習實戰
- Python數據可視化之Matplotlib與Pyecharts實戰
- Java編程的邏輯
- Visual Basic程序設計實驗指導(第二版)
- ExtJS高級程序設計
- OpenGL Data Visualization Cookbook
- Java 從入門到項目實踐(超值版)
- Android移動應用開發項目教程
- ASP.NET Web API Security Essentials
- Python全棧開發:基礎入門
- HTML5 WebSocket權威指南