我要求将旧式spring项目迁移到Spring引导.假设下面的代码片段我必须迁移到Spring引导样式.
在这里我问,如何将下面的抽象bean转换为@Bean?
<bean id="sample" class="com.test.core.common.AbstractClass" abstract="true">
<property name="sample1" ref="sample1" />
<property name="sample2" ref="sample2" />
</bean>
Run Code Online (Sandbox Code Playgroud) apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'groovy'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
//Artifactory Central Repository
buildscript {
repositories {
maven {
url 'abc'
credentials {
username = ""
password = ""
}
Run Code Online (Sandbox Code Playgroud)