首页>代码>基于SpringBoot实现的送水公司后台管理系统的设计与实现>/work/minzu-springboot/minzu-springboot-demo-03/src/main/java/com/minzu/controller/CustomerController.java
package com.minzu.controller; import com.minzu.entities.Customer; import com.minzu.service.CustomerService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * TODO: 客户管理控制器,处理客户管理的请求 * * @author caojie * @version 1.0 * @date 2021/10/20 9:31 */ @RestController @Slf4j public class CustomerController { @Autowired private CustomerService customerService; /** * listCustomer()方法用来处理浏览器的/custList请求,将客户表的所有数据输出到浏览器 * @return 以字符串的形式将客户表的所有数据输出到浏览器 */ @GetMapping("/custList") public String listCustomer() { // Controller调用业务逻辑层接口查询所有的客户信息 List<Customer> custList = customerService.listCustomer(); // for (Customer customer : custList) { // log.info(customer.toString()); // } // 将客户信息以字符串形式输出到控制台 return custList.toString(); } }
最近下载更多
yiipheartbeat LV1
2023年12月12日
hbj1285984841 LV4
2023年10月19日
sunlzh888888 LV28
2023年4月26日
youzitao LV11
2023年4月17日
泓鼎168 LV19
2023年4月3日
865581316LLL LV6
2023年1月6日
KnowKnowDontKnow LV8
2023年1月3日
LITIANYU084414 LV11
2022年12月30日
taowufeng2 LV8
2022年12月10日
ming_123_9715 LV23
2022年12月8日
最近浏览更多
SZEPEZS LV8
3月15日
407129151 LV6
2月18日
森sdfgf LV8
1月8日
houhanlin33 LV3
2023年12月28日
WBelong LV6
2023年12月27日
yiipheartbeat LV1
2023年12月12日
mukoooo LV2
2023年12月5日
yuan666 LV1
2023年12月4日
66666666aaa
2023年11月28日
暂无贡献等级
wuying8208 LV15
2023年11月28日