项目结构
front和client是两个不同的服务,front依赖client项目,需要在front中注入client的类
声明类:
import com.bluewhale.infra.client.IRestClient;
... ...
@Component("defaultWebServiceRequestHandler")
public class DefaultWebServiceRequestHandler implements BaseHandler {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource(name = "seckillClient")
private IRestClient seckillClient;
@Resource(name = "objectMapper")
protected ObjectMapper objectMapper;
@Resource(name = "restMapping")
public Map<String, String> restMapping;
... ...
}
注解类:
import org.springf