Try : http://camel.apache.org/advicewith.html
*Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Wed, Dec 11, 2013 at 5:59 AM, Stephan Burkard <[email protected]> wrote: > Hi > > You can use the advice-functionality => > http://camel.apache.org/advicewith.html > > Since Camel 2.9 you can (in the test) completely replace your From-Endpoint > with "replaceFromWith". > > Regards > Stephan > > > > > On Wed, Dec 11, 2013 at 12:30 PM, [email protected] < > [email protected]> wrote: > > > Hi, > > > > Sorry to ask a few questions. I know i have asked a few recently. I have > > been looking up bean and endpoint injection today but can't find a blurb > on > > my scenario. > > > > I have a route which uses a file component as the from endpoint... > > > > from("file:{{dir.item.inbox}}?" > > + "doneFileName={{filename.item.trigger}}&" > > + "preMove={{dir.item.staging}}&" > > + "move={{dir.item.done}}&" > > + "moveFailed={{dir.item.error}}") > > > > All my routes get loaded from spring via.... > > > > <camelContext trace="false" id="camel" > > xmlns="http://camel.apache.org/schema/spring"> > > <propertyPlaceholder > > location="classpath:auski-camel.properties" > > id="placeholder"/> > > <package>org.apache.camel.etl.route</package> > > </camelContext> > > > > For testing purposes it is annoying when the file gets moved all the time > > on > > processing. I want to just change it to noop for testing purposes. What > is > > the best way to do this. Can I do some sort of endpoint injection from > > Spring? > > > > thanks > > > > > > > > > > -- > > View this message in context: > > > http://camel.465427.n5.nabble.com/Inject-an-endpoint-into-my-route-for-testing-purposes-tp5744594.html > > Sent from the Camel - Users mailing list archive at Nabble.com. > > >
