Spring Support: Fixed computation of values in Java annotations referred by Kotlin annotation entries
#KT-11702 Fixed
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
// NUMBER: 1
|
||||
// EXIST: { lookupString:"buildBar" }
|
||||
|
||||
package a
|
||||
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
||||
|
||||
class FooBean
|
||||
class BarBean
|
||||
|
||||
@Configuration
|
||||
open class KotlinAnnotated {
|
||||
@Bean(name=arrayOf("annFooBean")) open fun buildFoo(): FooBean = FooBean()
|
||||
@Bean open fun buildBar(): BarBean = BarBean()
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun test() {
|
||||
val context = AnnotationConfigApplicationContext("a");
|
||||
context.getBean("build<caret>")
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// NUMBER: 2
|
||||
// EXIST: { lookupString:"annFooBean" }
|
||||
// EXIST: { lookupString:"kotlinAnnotated" }
|
||||
|
||||
package a
|
||||
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
||||
|
||||
class FooBean
|
||||
class BarBean
|
||||
|
||||
@Configuration
|
||||
open class KotlinAnnotated {
|
||||
@Bean(name=arrayOf("annFooBean")) open fun buildFoo(): FooBean = FooBean()
|
||||
@Bean open fun buildBar(): BarBean = BarBean()
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun test() {
|
||||
val context = AnnotationConfigApplicationContext("a");
|
||||
context.getBean("ann<caret>")
|
||||
}
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans>
|
||||
<bean id="fooBean" class="java.lang.String"/>
|
||||
<bean id="fooBean2" class="java.lang.String"/>
|
||||
<bean id="barBean" class="java.lang.String"/>
|
||||
<bean id="scopedBean" class="test.ScopedBean"/>
|
||||
</beans>
|
||||
Reference in New Issue
Block a user