[REVERTED] 0a71eb7 Alexey Sedunov on 2/25/2016 at 14:02 (committed on 3/24/2016 at 18:42)
Spring Support: Implement Spring-specific references
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
// ELEMENT: singleton
|
||||
package test
|
||||
|
||||
import org.springframework.context.annotation.Scope
|
||||
|
||||
@Scope("<caret>")
|
||||
class ScopedBean
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// ELEMENT: singleton
|
||||
package test
|
||||
|
||||
import org.springframework.context.annotation.Scope
|
||||
|
||||
@Scope("singleton")
|
||||
class ScopedBean
|
||||
@@ -1,7 +0,0 @@
|
||||
<?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="barBean" class="java.lang.String"/>
|
||||
<bean id="scopedBean" class="test.ScopedBean"/>
|
||||
</beans>
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// ELEMENT: fooBean
|
||||
// CHAR: \n
|
||||
import org.springframework.beans.factory.BeanFactory
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory
|
||||
import org.springframework.core.io.FileSystemResource
|
||||
import org.springframework.core.io.Resource
|
||||
|
||||
class FooBeanClass {
|
||||
init {
|
||||
val configFile = FileSystemResource("spring-config.xml")
|
||||
val factory = XmlBeanFactory(configFile)
|
||||
factory.getBean("fo<caret>o")
|
||||
}
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// ELEMENT: fooBean
|
||||
// CHAR: \n
|
||||
import org.springframework.beans.factory.BeanFactory
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory
|
||||
import org.springframework.core.io.FileSystemResource
|
||||
import org.springframework.core.io.Resource
|
||||
|
||||
class FooBeanClass {
|
||||
init {
|
||||
val configFile = FileSystemResource("spring-config.xml")
|
||||
val factory = XmlBeanFactory(configFile)
|
||||
factory.getBean("fooBeano")
|
||||
}
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// ELEMENT: fooBean
|
||||
// CHAR: \t
|
||||
import org.springframework.beans.factory.BeanFactory
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory
|
||||
import org.springframework.core.io.FileSystemResource
|
||||
import org.springframework.core.io.Resource
|
||||
|
||||
class FooBeanClass {
|
||||
init {
|
||||
val configFile = FileSystemResource("spring-config.xml")
|
||||
val factory = XmlBeanFactory(configFile)
|
||||
factory.getBean("fo<caret>o")
|
||||
}
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// ELEMENT: fooBean
|
||||
// CHAR: \t
|
||||
import org.springframework.beans.factory.BeanFactory
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory
|
||||
import org.springframework.core.io.FileSystemResource
|
||||
import org.springframework.core.io.Resource
|
||||
|
||||
class FooBeanClass {
|
||||
init {
|
||||
val configFile = FileSystemResource("spring-config.xml")
|
||||
val factory = XmlBeanFactory(configFile)
|
||||
factory.getBean("fooBean")
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// NUMBER: 2
|
||||
// EXIST: { lookupString:"singleton" }
|
||||
// EXIST: { lookupString:"prototype" }
|
||||
package test
|
||||
|
||||
import org.springframework.context.annotation.Scope
|
||||
|
||||
@Scope("<caret>")
|
||||
class ScopedBean
|
||||
@@ -1,8 +0,0 @@
|
||||
<?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>
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// NUMBER: 2
|
||||
// EXIST: { lookupString:"fooBean" }
|
||||
// EXIST: { lookupString:"fooBean2" }
|
||||
import org.springframework.beans.factory.BeanFactory
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory
|
||||
import org.springframework.core.io.FileSystemResource
|
||||
import org.springframework.core.io.Resource
|
||||
|
||||
class FooBeanClass {
|
||||
init {
|
||||
val configFile = FileSystemResource("spring-config.xml")
|
||||
val factory = XmlBeanFactory(configFile)
|
||||
factory.getBean("fo<caret>o")
|
||||
}
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// NO_XML_CONFIG
|
||||
// REF: /src.fileReferenceInClasspathResource.test.xml
|
||||
import org.springframework.core.io.ClassPathResource
|
||||
|
||||
class Bean {
|
||||
init {
|
||||
ClassPathResource("<caret>fileReferenceInClasspathResource.test.xml")
|
||||
}
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<test>
|
||||
<foo/>
|
||||
</test>
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// NO_XML_CONFIG
|
||||
// REF: /src.fileReferenceInClasspathXmlContext.test.xml
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext
|
||||
|
||||
class Bean {
|
||||
init {
|
||||
ClassPathXmlApplicationContext("<caret>fileReferenceInClasspathXmlContext.test.xml")
|
||||
}
|
||||
}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
<test>
|
||||
<foo/>
|
||||
</test>
|
||||
@@ -1,7 +0,0 @@
|
||||
// REF: singleton
|
||||
package test
|
||||
|
||||
import org.springframework.context.annotation.Scope
|
||||
|
||||
@Scope("<caret>singleton")
|
||||
class Bean
|
||||
@@ -1,5 +0,0 @@
|
||||
<?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="test.Bean"/>
|
||||
</beans>
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// REF: <bean id="fooBean" class="java.lang.String"/>
|
||||
import org.springframework.beans.factory.BeanFactory
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory
|
||||
import org.springframework.core.io.FileSystemResource
|
||||
import org.springframework.core.io.Resource
|
||||
|
||||
class FooBeanClass {
|
||||
init {
|
||||
val configFile = FileSystemResource("spring-config.xml")
|
||||
val factory = XmlBeanFactory(configFile)
|
||||
if (factory.containsBean("<caret>fooBean")) println("FooBean")
|
||||
}
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
<?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"/>
|
||||
</beans>
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// REF: <bean id="fooBean" class="java.lang.String"/>
|
||||
import org.springframework.beans.factory.BeanFactory
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory
|
||||
import org.springframework.core.io.FileSystemResource
|
||||
import org.springframework.core.io.Resource
|
||||
|
||||
class FooBeanClass {
|
||||
init {
|
||||
val configFile = FileSystemResource("spring-config.xml")
|
||||
val factory = XmlBeanFactory(configFile)
|
||||
factory.getBean("<caret>fooBean")
|
||||
}
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?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"/>
|
||||
</beans>
|
||||
@@ -1,11 +0,0 @@
|
||||
// JAVAX_ANNOTATION_RESOURCE
|
||||
// REF: <bean id="fooBean" class="test.Bean"/>
|
||||
package test
|
||||
|
||||
import javax.annotation.Resource
|
||||
|
||||
class Bean
|
||||
|
||||
class Test {
|
||||
@Resource(name= "<caret>fooBean") lateinit var name: String
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?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="test.Bean"/>
|
||||
</beans>
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
// JAVAX_ANNOTATION_RESOURCE
|
||||
// REF: <bean id="fooBean" class="test.Bean"/>
|
||||
package test
|
||||
|
||||
import javax.annotation.Resource
|
||||
|
||||
class Bean
|
||||
|
||||
class Test {
|
||||
@Resource(name= "<caret>&fooBean") lateinit var name: String
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?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="test.Bean"/>
|
||||
</beans>
|
||||
Reference in New Issue
Block a user