Hi
I have a regular Java bean and a Groovy bean:
Whether I do autowiring byType or byName, the Groovy class does get injected:Code:<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:lang="http://www.springframework.org/schema/lang" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd" default-init-method="init" default-autowire="byType"> <lang:groovy id="vinGenerator" script-source="file:C:/projects/mygroovy/groovy/VINBuildQuery.groovy"> <lang:property name="kefe" value="I Can Do The Frug" /> </lang:groovy> <bean id="brush" class="com.toyota.tms.groovy.Brush"/> </beans>
Any ideas? Do I do something wrong? I just do a very simple context loading:Code:class VINBuildQuery { Brush brush ..
Code:ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml"); Object obj = ctx.getBean("vinGenerator"); System.out.println(obj);


Reply With Quote