控制器代码 @Autowired 私人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);
}
方法代码
@Transactional(rollbackFor = Exception.class)
public AdNetworkPlacement createNonIntegratedAdNetworkPlacement(Long userId, Long publisherId, AdNetworkPlacement placement) throws APIException {
}
添加@Transactional
时,不会调用该方法评论它运作良好
答案 0 :(得分:0)
问题解决了
这是context-component:scan
的问题需要指定完整的包结构