Hi all,
I am in the process of updating a rather large app to the 3.0 FInal
release of Coldbox, and since I was using Lightwire I wanted to
replace that with Wirebox:
In the coldbox.cfc I created the following config:
In Interceptors:
// Autowire
{class="coldbox.system.interceptors.Autowire",
properties={
entityInjection = true
}
},
Instead of the IOC Integration part:
//Model Integration view WireBox
wirebox = {
enabled = true
};
I created the wirebox.cfc file and put all my config for my CFC's in
the Service layer there. An example:
map("UserService").to("model.services.UserService")
.initArg(name="Coldbox",ref="Coldbox")
.initArg(name="BasketService",ref="BasketService")
.initArg(name="dataSource",ref="datasourceBean")
.asSingleton();
This part works as expected. But as I understand it, the beans, which
are in the directory model/beans/ do not need to be declared, Wirebox
should see them automaticly.
I have created the following line in my beans, following the
Simpleblog example:
<!--- DEPENDENCIES via WireBOX --->
<cfproperty name="myDSN" inject="coldbox:datasource:dsn"
persistent="false" />
But when I dump the bean, I just see an empty property myDSN, nothing
is injected.
When I look at the Simpleblog example, the code looks the same, but is
working.
What am I missing here?
Kind regards,
Erik-Jan