I was working with FW/1 and came to a point that I need to "wire" the DI factory. I am running CF8 on dev so I tried to use DI/1 and that does not work on that version, come to find out. ( Loosing lots of time today.)
Anyway
Here I am with ColdSpring, seems simple enough, but issue I think I am having is the coldspring.xml
I only have one service at this point call courses. wwwroot/(myApp in FW/1)/model/services/courses.cfc
My App is not on the root is the point here, I guess.
application.cfc
contains
<cfset coldspringConfig = 'assets/config/coldspring.xml' />
<cfset beanFactory = CreateObject('component', 'coldspring.beans.DefaultXmlBeanFactory').init() />
<cfset beanFactory.loadBeans(coldspringConfig) />
(myApp in FW/1)/assets/config/coldspring.xml
contains
<beans default-autowire="byName">
<bean id="courses" class="model.services.courses" lazy-init="true" singleton="true"></bean>
</beans>
(myApp in FW/1)/controllers/main.cfc
...
<cfset rc.Locations = getCoursesService.getTop()>
...
<cffunction name="getCoursesService" access="public" output="false">
<cfreturn variables.coursesService>
</cffunction>
<cffunction name="setCoursesService" returntype="void" access="public" output="false">
<cfargument name="coursesService" type="any" required="true" />
<cfset variables.coursesService = arguments.coursesService />
</cffunction>
I am getting Error message:
The getTop method was not found.
Maybe I should be posting this to FW/1 not sure.