Map<String, String> courseNoTitleMap = listBOList.stream().collect(Collectors.toMap(CoursePriceInfoResultBO::getCourseNo, CoursePriceInfoResultBO::getTitle, (a, b) -> b));
(a, b) -> b) 的意思是,(oldValue, newValue) -> newValue),如果要put的key已存在,那麼就調用傳進來的方法。如果不指定就會拋出異常。