Java實現(xiàn)商品管理系統(tǒng)代碼實例講解
實現(xiàn)功能:商品查詢,新增,更改價格,以及刪除
首先是三個基本類的構建
商品類、賬號類、品牌類
1、商品類
public class Goods {
//商品信息:商品名稱,商品價格,商品銷量,商品種類,商品品牌對應編號
private String goodsName;
private double goodsPrice;
private int goodsSales;
private String goodsCategories;
private int brandsNum;
private String GoodsNum;
public Goods(String goodsName, double goodsPrice, int goodsSales, String goodsCategories,int brandsNum, String goodsNum) {
this.goodsName = goodsName;
this.goodsPrice = goodsPrice;
this.goodsSales = goodsSales;
this.goodsCategories = goodsCategories;
this.brandsNum = brandsNum;
GoodsNum = goodsNum;
}
public int getBrandsNum() {
return brandsNum;
}
public void setBrandsNum(int brandsNum) {
this.brandsNum = brandsNum;
}
public Goods() {
}
public String getGoodsNum() {
return GoodsNum;
}
public void setGoodsNum(String goodsNum) {
GoodsNum = goodsNum;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public double getGoodsPrice() {
return goodsPrice;
}
public void setGoodsPrice(double goodsPrice) {
this.goodsPrice = goodsPrice;
}
public int getGoodsSales() {
return goodsSales;
}
public void setGoodsSales(int goodsSales) {
this.goodsSales = goodsSales;
}
public String getGoodsCategories() {
return goodsCategories;
}
public void setGoodsCategories(String goodsCategories) {
this.goodsCategories = goodsCategories;
}
public int getBrands() {
return brandsNum;
}
public void setBrands(int brandsNum) {
this.brandsNum = brandsNum;
}
}
實現(xiàn)了其各個屬性的get和set方法
賬戶類
public class Accounts {
//賬戶信息:賬戶名稱,賬戶密碼
private String userName;
private String userPassword;
public Accounts(String userName, String userPassword) {
this.userName = userName;
this.userPassword = userPassword;
}
public Accounts() {
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPassword() {
return userPassword;
}
public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
}
}
品牌類
public class Brands {
//商品品牌信息:商品品牌名稱,商品品牌對應編號
private String brandsName;
private int brandsNum;
public Brands(String brandsName, int brandsNum) {
this.brandsName = brandsName;
this.brandsNum = brandsNum;
}
public String getBrandsName() {
return brandsName;
}
public void setBrandsName(String brandsName) {
this.brandsName = brandsName;
}
public int getBrandsNum() {
return brandsNum;
}
public void setBrandsNum(int brandsNum) {
this.brandsNum = brandsNum;
}
}
之后是一個存儲這三個基本類信息的數(shù)據(jù)類,通過定義List實現(xiàn)三個類的存儲
數(shù)據(jù)類
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class Database {
//存儲用戶信息
private List<Accounts>accountsList=new ArrayList<>();
//存儲商品信息
private List<Goods>goodsList=new ArrayList<>();
//存儲品牌信息
private List<Brands>brandsList=new ArrayList<>();
public Database(){
//添加初始化信息
此處自己添加商品,用戶信息,品牌信息
}
public List<Accounts> getAccountsList() {
return accountsList;
}
public void setAccountsList(List<Accounts> accountsList) {
this.accountsList = accountsList;
}
public List<Goods> getGoodsList() {
return goodsList;
}
public void setGoodsList(List<Goods> goodsList) {
this.goodsList = goodsList;
}
public List<Brands> getBrandsList() {
return brandsList;
}
public void setBrandsList(List<Brands> brandsList) {
this.brandsList = brandsList;
}
}
之后是三個基本類各個增刪改查方法的實現(xiàn),這個根據(jù)程序需求寫
商品交互類
import java.util.ArrayList;
import java.util.List;
public class GoodsDAO {
//調用數(shù)據(jù)庫
private Database database;
//初始化商品DAO類,引入數(shù)據(jù)庫
public GoodsDAO(Database database){
this.database=database;
}
//返回銷量最高的商品
public List<Goods>hotSell(){
List<Goods> temporList=database.getGoodsList();
for(int i=0;i<temporList.size();i++){
for(int j=0;j<temporList.size()-1-i;j++){
if(temporList.get(j).getGoodsSales()<temporList.get(j+1).getGoodsSales())
{
Goods e=temporList.get(j+1);
temporList.set(j+1,temporList.get(j));
temporList.set(j,e);
}
}
}
return temporList;
}
//根據(jù)商品序號查詢商品
public Goods searchById(int id){
Goods goods;
goods=database.getGoodsList().get(id-1);
return goods;
}
//根據(jù)品牌編號查詢商品
public List<Goods>searchByBranchId(int brandsId){
List<Goods>temporList=new ArrayList<>();
for(Goods each:database.getGoodsList()){
if(each.getBrandsNum()==brandsId)
temporList.add(each);
}
if(temporList.isEmpty())
temporList=null;
return temporList;
}
//根據(jù)價格區(qū)間查詢商品
public List<Goods>searchByPrice(double minPrice,double maxPrice){
List<Goods>temporList=new ArrayList<>();
for(Goods each:database.getGoodsList()){
if(each.getGoodsPrice()>=minPrice&&each.getGoodsPrice()<=maxPrice) {
temporList.add(each);
}
}
if(temporList.isEmpty())
temporList=null;
return temporList;
}
//新增商品
public void addGoods(Goods goods){
database.getGoodsList().add(goods);
}
//修改商品價格
public void modify(String goodsId,double price){
for(Goods each:database.getGoodsList()){
if(each.getGoodsNum().equals(goodsId))
each.setGoodsPrice(price);
}
}
//刪除商品
public void delete(String goodsId){
Goods goods=null;
for(Goods each:database.getGoodsList()){
if(each.getGoodsNum().equals(goodsId))
goods=each;
}
database.getGoodsList().remove(goods);
//迭代操作時不允許ArrayList被改變,因此重新定義一個對象指向他,迭代完后進行操作。
}
//更改商品品牌編號
public void changeByBranchId(int brandsId){
for(Goods each:database.getGoodsList()){
if(each.getBrandsNum()==brandsId)
each.setBrandsNum(brandsId-1);
}
}
}
賬戶交互類實現(xiàn)注冊,登錄的需求
public class AccountDAO {
//調用數(shù)據(jù)庫
private Database database;
//初始化賬戶DAO類,引入數(shù)據(jù)庫
public AccountDAO(Database database){
this.database=database;
}
//根據(jù)賬戶名返回賬戶類
public Accounts searchAccounts(String userName){
Accounts accounts=null;
for(Accounts each:database.getAccountsList()){
if(each.getUserName().equals(userName))
accounts=each;
}
return accounts;
}
//添加賬戶類
public void addAccount(Accounts accounts){
database.getAccountsList().add(accounts);
}
}
品牌類
public class BrandsDAO {
//調用數(shù)據(jù)庫
private Database database;
//初始化品牌DAO類,引入數(shù)據(jù)庫
public BrandsDAO(Database database){
this.database=database;
}
//根據(jù)品牌名稱查詢
public Brands findByName(String brandName){
Brands brands=null;
for(Brands each:database.getBrandsList()){
if(each.getBrandsName().equals(brandName)) {
brands = each;
break;
}
}
return brands;
}
//查詢所有品牌
public void findAll(){
System.out.println("現(xiàn)有品牌:");
for(Brands each:database.getBrandsList()){
System.out.println(each.getBrandsNum()+"\t"+each.getBrandsName());
}
}
//根據(jù)品牌編號查詢品牌名稱
public String findNameById(int id){
String brandName;
Brands brands=null;
for(Brands each:database.getBrandsList()){
if(each.getBrandsNum()==id){
brands=each;
}
}
return brands.getBrandsName();
}
//查詢品牌是否擁有
public boolean findBranch(String brandsName){
boolean choose=false;
for(Brands each:database.getBrandsList())
{
if(each.getBrandsName().equals(brandsName))
choose=true;
}
return choose;
}
//新建一個品牌
public void addBranch(Brands brands){
database.getBrandsList().add(brands);
}
//查找當前品牌的的數(shù)量
public int brandsNumbers(){
int num=database.getBrandsList().size();
return num;
}
//查找要刪除的品牌
public void deleteBrands(int num){
Brands brands=null;
for(Brands each:database.getBrandsList()){
if(each.getBrandsNum()==num)
brands=each;
}
database.getBrandsList().remove(brands);
}
//移動編號
public void moveBrandsNum(int brandsNum){
int index;
for(int i=0;i<database.getBrandsList().size();i++){
if(database.getBrandsList().get(i).getBrandsNum()>brandsNum)
database.getBrandsList().get(i).setBrandsNum(database.getBrandsList().get(i).getBrandsNum()-1);
}
}
}
服務類實現(xiàn)項目需要的功能,構建交互界面
public class GoodsSystem {
Scanner scanner=new Scanner(System.in);
Random random=new Random();
AccountDAO accountDAO;
BrandsDAO brandsDAO;
GoodsDAO goodsDAO;
//初始化DAO
public GoodsSystem(Database database){
accountDAO=new AccountDAO(database);
brandsDAO=new BrandsDAO(database);
goodsDAO=new GoodsDAO(database);
}
public void start(){
// 1.登陸
System.out.println("----------------商品系統(tǒng)---------------");
System.out.println("1.登錄");
// 2.注冊
System.out.println("2.注冊");
// 3.退出系統(tǒng)
System.out.println("3.退出系統(tǒng)");
System.out.println("請選擇:");
String choose=scanner.next();
switch(choose){
//登錄
case "1":
login();
break;
//注冊
case "2":
regist();
break;
//退出系統(tǒng)
case "3":
System.out.println("系統(tǒng)已經退出");
break;
default:
System.out.println("輸入錯誤,請重新輸入:");
start();
}
}
//登錄
public void login(){
System.out.println("請輸入用戶名:");
String userName=scanner.next();
System.out.println("請輸入密碼:");
String passWord=scanner.next();
Accounts accounts=accountDAO.searchAccounts(userName);
String testNum="";
if(accounts!=null){
if(accounts.getUserPassword().equals(passWord)){
for(int i=0;i<4;i++){
int num=random.nextInt(10);
testNum=testNum+num;
}
System.out.println("驗證碼:"+testNum);
System.out.println("請輸入驗證碼:");
String testNumInput=scanner.next();
if(testNumInput.equals(testNum)) {
System.out.println("登錄成功");
mainMenu();
}
else{
System.out.println("驗證碼錯誤,請重新登錄");
login();
}
}
else{
System.out.println("密碼錯誤,請重新登錄");
System.out.println("輸入任意鍵執(zhí)行操作,或輸入0返回上一層目錄");
String choose=scanner.next();
if(choose.equals("0"))
start();
else
login();
}
}
else{
System.out.println("該賬戶不存在,請重新輸入:");
System.out.println("輸入任意鍵執(zhí)行操作,或輸入0返回上一層目錄");
String choose=scanner.next();
if(choose.equals("0"))
start();
else
login();
}
}
//注冊
public void regist(){
System.out.println("----注冊----");
//用戶名
System.out.println("請輸入用戶名:");
String userName=scanner.next();
Accounts accounts=accountDAO.searchAccounts(userName);
while(accounts!=null){
System.out.println("用戶名已經被使用,請重新輸入");
userName=scanner.next();
accounts=accountDAO.searchAccounts(userName);
}
//密碼
System.out.println("請輸入密碼:");
String userPassWord=scanner.next();
System.out.println("確認密碼:");
String testPassWord=scanner.next();
while(!userPassWord.equals(testPassWord)){
System.out.println("確認密碼與注冊密碼不相符,請重新輸入密碼");
System.out.println("請輸入密碼:");
userPassWord=scanner.next();
System.out.println("確認密碼:");
testPassWord=scanner.next();
}
//驗證碼
String testNum="";
for(int i=0;i<4;i++){
int num=random.nextInt(10);
testNum=testNum+num;
}
System.out.println("驗證碼:"+testNum);
System.out.println("請輸入驗證碼:");
String testNumInput=scanner.next();
if(testNumInput.equals(testNum)) {
accountDAO.addAccount(new Accounts(userName,userPassWord));
System.out.println("注冊成功");
start();
}
else{
System.out.println("驗證碼錯誤,請重新注冊");
System.out.println("輸入任意鍵執(zhí)行操作,或輸入0返回上一層目錄");
String choose=scanner.next();
if(choose.equals("0"))
start();
else
regist();
}
}
//主菜單
public void mainMenu(){
System.out.println("-------------主菜單------------");
// 1.熱門商品
System.out.println("1.熱門商品");
// 2.商品查詢
System.out.println("2.商品查詢");
// 3.后臺管理
System.out.println("3.后臺管理");
System.out.println("4.退出系統(tǒng)");
System.out.println("請輸入你的選擇:");
String choose=scanner.next();
switch (choose){
case "1"://熱門商品
hotSell();
break;
case "2"://商品查詢
searchGoods();
break;
case "3"://后臺管理
controlGoods();
break;
case "4"://退出系統(tǒng)
System.out.println("系統(tǒng)已經退出");
break;
default:
mainMenu();
}
}
//熱賣商品
public void hotSell(){
System.out.println("------------熱銷商品------------");
List <Goods>tempor=goodsDAO.hotSell();
System.out.println("序號\t\t"+"商品"+"\t\t\t\t\t銷量\t");
int num=10;
if(tempor.size()<10)
num=tempor.size();
for(int i=0;i<num;i++){
System.out.println((i+1)+"\t\t"+tempor.get(i).getGoodsName()+"\t\t\t\t\t"+tempor.get(i).getGoodsSales()+"\t");
}
System.out.println("請輸入要查詢的商品ID或輸入0返回上一層菜單。");
String chooseEnd=scanner.next();
if(isNumeric(chooseEnd)==true)
{
int choose=Integer.parseInt(chooseEnd);
if(choose==0){
mainMenu();
}
else
{
if(choose<=num&&choose>=0) {
Goods goods = goodsDAO.searchById(choose);
System.out.println("商品名稱\t\t品牌\t\t價格\t\t類型");
System.out.println(goods.getGoodsName() + "\t\t\t" + brandsDAO.findNameById(goods.getBrandsNum()) + "\t" + goods.getGoodsPrice() + "元\t" + goods.getGoodsCategories());
mainMenu();
}
else
{
System.out.println("查詢的序號超過限定,請重新輸入");
hotSell();
}
}
}
else
{
System.out.println("輸入錯誤符號,請重新選擇");
hotSell();
}
}
//商品查詢
public void searchGoods(){
System.out.println("---------商品查詢----------");
// 1.品牌查詢
System.out.println("1.品牌查詢");
// 2.價格查詢
System.out.println("2.價格查詢");
System.out.println("3.返回上一層目錄");
System.out.println("請輸入你的選擇:");
String choose=scanner.next();
switch(choose){
case "1"://品牌查詢
searchByBranch();
break;
case "2"://價格查詢
searchByPrice();
break;
case "3":
mainMenu();
break;
default:
searchGoods();
}
}
//后臺管理
public void controlGoods(){
System.out.println("--------后臺管理--------");
// 1.新增商品
System.out.println("1.新增商品");
// 2.修改價格
System.out.println("2.修改價格");
// 3.刪除商品
System.out.println("3.刪除商品");
System.out.println("4.返回主菜單");
System.out.println("請輸入選擇:");
String choose=scanner.next();
switch (choose){
case "1"://新增商品
addGoods();
break;
case "2"://修改價格
changePrice();
break;
case "3"://刪除商品
deleteGoods();
break;
case "4"://返回主菜單
mainMenu();
break;
default:
controlGoods();
}
}
//根據(jù)品牌查詢
public void searchByBranch(){
brandsDAO.findAll();
System.out.println("請輸入要查詢的品牌編號:");
String brandsNum1=scanner.next();
if(isNumeric(brandsNum1)) {
int brandsNum=Integer.parseInt(brandsNum1);
List<Goods> temporlist = goodsDAO.searchByBranchId(brandsNum);
if (temporlist == null) {
System.out.println("沒有該品牌的商品");
searchGoods();
}
for (int i = 0; i < temporlist.size(); i++) {
System.out.println("序號" + (i + 1) + "\t" + "商品名字:" + temporlist.get(i).getGoodsName());
}
System.out.println("請輸入要查詢的商品ID或輸入0返回上一層菜單。");
String choose1 = scanner.next();
if(isNumeric(choose1)) {
int choose=Integer.parseInt(choose1);
if (choose == 0) {
searchGoods();
} else {
if(choose>=1&&choose<=temporlist.size()){
Goods goods = temporlist.get(choose - 1);
System.out.println("商品名稱:" + goods.getGoodsName() + "\t" + "品牌:" + brandsDAO.findNameById(goods.getBrandsNum()) + "\t" + "價格:" + goods.getGoodsPrice() + "元\t" + "類型:" + goods.getGoodsCategories());
searchGoods();
}
else{
System.out.println("輸入序號超過邊界范圍,請重新輸入");
searchByBranch();
}
}
}
else{
System.out.println("輸入錯誤符號,請重新選擇");
searchByBranch();
}
}
else{
System.out.println("輸入錯誤符號,請重新選擇");
searchByBranch();
}
}
//根據(jù)價格查詢
public void searchByPrice(){
System.out.println("請輸入要查詢的價格區(qū)間:最小價格 最大價格");
double minPrice=scanner.nextDouble();
double maxPrice=scanner.nextDouble();
List<Goods>temporlist=goodsDAO.searchByPrice(minPrice,maxPrice);
if(temporlist==null){
System.out.println("沒有該區(qū)間的商品");
searchGoods();
}
for(int i=0;i<temporlist.size();i++){
System.out.println("序號"+(i+1)+"\t"+"商品名字:"+temporlist.get(i).getGoodsName());
}
System.out.println("請輸入要查詢的商品ID或輸入0返回上一層菜單。");
String choose1 = scanner.next();
if(isNumeric(choose1)) {
int choose=Integer.parseInt(choose1);
if (choose == 0) {
searchGoods();
}
else {
if(choose>=1&&choose<=temporlist.size()) {
Goods goods = temporlist.get(choose - 1);
System.out.println("商品名稱:" + goods.getGoodsName() + "\t" + "品牌:" + brandsDAO.findNameById(goods.getBrandsNum()) + "\t" + "價格:" + goods.getGoodsPrice() + "元\t" + "類型:" + goods.getGoodsCategories());
searchGoods();
}
else{
System.out.println("輸入數(shù)字超過邊界,請重新輸入");
searchByPrice();
}
}
}
else{
System.out.println("輸入錯誤符號,請重新選擇");
searchByPrice();
}
}
//新增商品
public void addGoods(){
System.out.println("請輸入商品名稱:");
String goodsName=scanner.next();
System.out.println("請輸入商品價格:");
double goodsPrice=scanner.nextDouble();
System.out.println("請輸入品牌");
String brandsName=scanner.next();
int brandsNum;
if(brandsDAO.findBranch(brandsName)){
brandsNum=brandsDAO.findByName(brandsName).getBrandsNum();
}
else{
brandsNum=brandsDAO.brandsNumbers()+1;
Brands brands=new Brands(brandsName,brandsNum);
brandsDAO.addBranch(brands);
}
System.out.println("請輸入商品類型");
String goodsCate=scanner.next();
Goods goods=new Goods(goodsName,goodsPrice,0,goodsCate,brandsNum, UUID.randomUUID().toString());
goodsDAO.addGoods(goods);
System.out.println("商品添加成功");
controlGoods();
}
//改變價格
public void changePrice(){
System.out.println("--------修改價格------");
brandsDAO.findAll();
System.out.println("請輸入要查詢的品牌編號:");
String brandsNum1=scanner.next();
if(isNumeric(brandsNum1)) {
int brandsNum=Integer.parseInt(brandsNum1);
List<Goods> temporlist = goodsDAO.searchByBranchId(brandsNum);
if (temporlist == null) {
System.out.println("沒有該品牌的商品");
changePrice();
}
for (int i = 0; i < temporlist.size(); i++) {
System.out.println("序號" + (i + 1) + "\t" + "商品名字:" + temporlist.get(i).getGoodsName() + "\t價格" + temporlist.get(i).getGoodsPrice() + "元");
}
System.out.println("請輸入要修改價格的商品ID或輸入0返回上一層菜單。");
String choose1 = scanner.next();
if(isNumeric(choose1)) {
int choose=Integer.parseInt(choose1);
if (choose == 0) {
controlGoods();
}
else if(choose<=temporlist.size())
{
System.out.println("請輸入要修改的價格:");
double price = scanner.nextDouble();
System.out.println("是否確定修改價格:是/否");
String endChoose = scanner.next();
if (endChoose.equals("是")) {
goodsDAO.modify(temporlist.get(choose - 1).getGoodsNum(), price);
System.out.println("價格修改完成");
controlGoods();
} else {
controlGoods();
}
}
else{
System.out.println("輸入序號超過邊界,請重新輸入");
changePrice();
}
}
else{
System.out.println("輸入錯誤符號,請重新輸入");
changePrice();
}
}
else{
System.out.println("輸入錯誤符號,請重新輸入");
changePrice();
}
}
//刪除商品
public void deleteGoods(){
System.out.println("--------刪除商品------");
brandsDAO.findAll();
System.out.println("請輸入要查詢的品牌編號:");
String brandsNum2=scanner.next();
if(isNumeric(brandsNum2)) {
int brandsNum=Integer.parseInt(brandsNum2);
List<Goods> temporlist = goodsDAO.searchByBranchId(brandsNum);
if (temporlist == null) {
System.out.println("沒有該品牌的商品");
deleteGoods();
}
for (int i = 0; i < temporlist.size(); i++) {
System.out.println("序號" + (i + 1) + "\t" + "商品名字:" + temporlist.get(i).getGoodsName());
}
System.out.println("請輸入要刪除的商品ID或輸入0返回上一層菜單。");
String choose1 = scanner.next();
if(isNumeric(choose1)) {
int choose=Integer.parseInt(choose1);
if (choose == 0) {
controlGoods();
}
else if(choose<=temporlist.size()){
System.out.println("是否確定刪除:是/否");
String endChoose = scanner.next();
if (endChoose.equals("是")) {
int brandsNum1 = temporlist.get(choose - 1).getBrandsNum();
goodsDAO.delete(temporlist.get(choose - 1).getGoodsNum());
System.out.println("刪除成功");
if (goodsDAO.searchByBranchId(brandsNum1) == null) {
brandsDAO.deleteBrands(brandsNum1);
brandsDAO.moveBrandsNum(brandsNum1);
for (int i = brandsNum1; i <= brandsDAO.brandsNumbers(); i++)
goodsDAO.changeByBranchId(i + 1);
}
controlGoods();
} else {
controlGoods();
}
}
else{
System.out.println("輸入序號超過邊界,請重新輸入");
deleteGoods();
}
}
else{
System.out.println("輸入錯誤符號,請重新輸入");
deleteGoods();
}
}
else{
System.out.println("輸入錯誤符號,請重新輸入");
deleteGoods();
}
}
public boolean isNumeric(String str){
for (int i = str.length();--i>=0;){
if (!Character.isDigit(str.charAt(i))){
return false;
}
}
return true;
}
}
注:以上代碼部分內部類的導入未填寫
還需要一個測試類運行
暫且略過
到此這篇關于Java實現(xiàn)商品管理系統(tǒng)代碼實例講解的文章就介紹到這了,更多相關Java實現(xiàn)商品管理系統(tǒng)內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Java執(zhí)行cmd命令兩種實現(xiàn)方法解析
這篇文章主要介紹了Java執(zhí)行cmd命令兩種實現(xiàn)方法解析,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下2020-07-07
SpringCloud實戰(zhàn)之Feign聲明式服務調用
這篇文章主要介紹了SpringCloud實戰(zhàn)之Feign聲明式服務調用,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-05-05
用Java設計模式中的觀察者模式開發(fā)微信公眾號的例子
這篇文章主要介紹了用Java設計模式中的觀察者模式開發(fā)微信公眾號的例子,這里Java的微信SDK等部分便不再詳述,只注重關鍵部分和開發(fā)過程中觀察者模式優(yōu)點的體現(xiàn),需要的朋友可以參考下2016-02-02
Java 根據(jù)網絡URL獲取該網頁上面所有的img標簽并下載圖片
這篇文章主要介紹了Java 根據(jù)網絡URL獲取該網頁上面所有的img標簽并下載圖片,幫助大家更好的理解和使用Java,感興趣的朋友可以了解下2020-11-11
Flink實現(xiàn)特定統(tǒng)計的歸約聚合reduce操作
這篇文章主要介紹了Flink實現(xiàn)特定統(tǒng)計的歸約聚合reduce操作,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習吧2023-02-02

