transactions - Spring method if annotated with @Transactional its not getting called -
controller code @autowired private adnetworkplacementservice adnetworkplacementservice;
@post @produces("application/json") @consumes("application/json") public adnetworkplacement createplacement(@queryparam("pubid") long publisherid, adnetworkplacement placement) throws apiexception { return adnetworkplacementservice.createnonintegratedadnetworkplacement(116l, publisherid, placement); }
method code
@transactional(rollbackfor = exception.class) public adnetworkplacement createnonintegratedadnetworkplacement(long userid, long publisherid, adnetworkplacement placement) throws apiexception { }
the method not called when added @transactional
commenting works fine
problem solved
it problem context-component:scan
need specify complete package structure
Comments
Post a Comment