package com.seecoder.BlueWhale.serviceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import com.seecoder.BlueWhale.service.ExcelService; import com.seecoder.BlueWhale.service.OrderService; import com.seecoder.BlueWhale.util.ExcelUtil; @Service public class ExcelServiceImpl implements ExcelService{ @Autowired ExcelUtil excelUtil; @Autowired OrderService orderService; @Override public ResponseEntity export() { return excelUtil.exportExcel(orderService.getAllOrders()); } }