java實(shí)現(xiàn)工資管理簡單程序
本文為大家分享了java實(shí)現(xiàn)工資管理簡單程序的具體代碼,供大家參考,具體內(nèi)容如下
程序總體說明(ReadMe):
總體分為四部分:
管理程序(staffmanagment.java):
- 在這里面使用了arraylist泛型來存放數(shù)據(jù)
- 博主正在想辦法把數(shù)據(jù)放進(jìn)mysql,這樣讀取會(huì)更方便,而且數(shù)據(jù)不會(huì)消失
- 當(dāng)然(也可以把數(shù)據(jù)存入txt文件)
import java.util.ArrayList; //員工管理 public class staffmanagement { ? ? ArrayList al = null;//員工信息在這里面建立 ? ? public staffmanagement() ? ? { ? ? ? ? al = new ArrayList(); ? ? } ? ? //成員方法 ? ? //添加新員工 ? ? public void addstaff(staff staff) ? ? { ? ? ? ? al.add(staff); ? ? } ? ? //根據(jù)工號(hào)查詢員工的信息 ? ? public void showInfo(String no) ? ? { ? ? ? ? int flag = 0; ? ? ? ? for(int i=0; i<al.size(); i++) ? ? ? ? { ? ? ? ? ? ? staff staff= (staff)al.get(i); ? ? ? ? ? ? if(staff.getNo().equals(no)) ? ? ? ? ? ? { ? ? ? ? ? ? ? ? flag = 1; ? ? ? ? ? ? ? ? System.out.println("員工"+(i+1)+"的信息是:"); ? ? ? ? ? ? ? ? System.out.print("姓名:"+staff.getName()); ? ? ? ? ? ? ? ? System.out.print(" ?性別:"+staff.getSex()); ? ? ? ? ? ? ? ? System.out.print(" ?年齡:"+staff.getAge()); ? ? ? ? ? ? ? ? System.out.print(" ?工號(hào):"+staff.getNo()); ? ? ? ? ? ? ? ? System.out.print(" ?薪資:"+staff.getSalary()); ? ? ? ? ? ? ? ? System.out.print(" ?工作:"); ? ? ? ? ? ? ? ? if(staff.getWork() == 1) System.out.println("common staff"); ? ? ? ? ? ? ? ? else if(staff.getWork() == 2) System.out.println("common manager"); ? ? ? ? ? ? ? ? else if(staff.getWork() == 3) System.out.println("head manager"); ? ? ? ? ? ? ? ? System.out.println(staff); ? ? ? ? ? ? } ? ? ? ? } ? ? ? ? if(flag == 0) ? ? ? ? ? ? System.out.println("該工號(hào)不存在"); ? ? } ? ? //顯示所有員工信息 ? ? public void ?showAllInfo() ? ? { ? ? ? ? for(int i=0; i<al.size(); i++) ? ? ? ? { ? ? ? ? ? ? staff staff= (staff)al.get(i); ? ? ? ? ? ? System.out.println("staff"+(i+1)+"的信息是:"); ? ? ? ? ? ? System.out.print("姓名:"+staff.getName()); ? ? ? ? ? ? System.out.print(" ?性別:"+staff.getSex()); ? ? ? ? ? ? System.out.print(" ?年齡:"+staff.getAge()); ? ? ? ? ? ? System.out.print(" ?工號(hào):"+staff.getNo()); ? ? ? ? ? ? System.out.print(" ?薪資:"+staff.getSalary()); ? ? ? ? ? ? System.out.print(" ?工作:"); ? ? ? ? ? ? if(staff.getWork() == 1) System.out.println("common staff"); ? ? ? ? ? ? else if(staff.getWork() == 2) System.out.println("common manager"); ? ? ? ? ? ? else if(staff.getWork() == 3) System.out.println("head manager"); ? ? ? ? ? ? System.out.println(staff); ? ? ? ? } ? ? } ? ? //修改員工的薪水 ? ? public void ?modifySal(String no, double sal) //員工工號(hào) ? 最新的薪資 ? ? { ? ? ? ? int flag = 0; ? ? ? ? for(int i=0; i<al.size(); i++) ? ? ? ? { ? ? ? ? ? ? staff staff= (staff)al.get(i); ? ? ? ? ? ? if(staff.getNo().equals(no)) ? ? ? ? ? ? { ? ? ? ? ? ? ? ? flag = 1; ? ? ? ? ? ? ? ? staff.setSalary(sal); ? ? ? ? ? ? } ? ? ? ? } ? ? ? ? if(flag == 0) ? ? ? ? ? ? System.out.println("找不到所查工號(hào)"); ? ? } ? ? //根據(jù)工號(hào)刪除該員工的信息 ? ? public void deleteInfo(String no) ? ? { ? ? ? ? int flag = 0; ? ? ? ? for(int i=0; i<al.size(); i++) ? ? ? ? { ? ? ? ? ? ? staff staff= (staff)al.get(i); ? ? ? ? ? ? if(staff.getNo().equals(no)) ? ? ? ? ? ? { ? ? ? ? ? ? ? ? flag = 1; ? ? ? ? ? ? ? ? al.remove(i); ? ? ? ? ? ? } ? ? ? ? } ? ? ? ? if(flag == 0) ? ? ? ? ? ? System.out.println("找不到所查工號(hào)"); ? ? } ? ? //統(tǒng)計(jì)當(dāng)前公司的三個(gè)水平工資線 ? ? public void calSalary() { ? ? ? ? if (al.isEmpty()) { ? ? ? ? ? ? System.out.println("the stafflist is empty,please input the staff infomation"); ? ? ? ? ? ? System.out.println("please input the No 1 to add the staffinfo"); ? ? ? ? } else { ? ? ? ? ? ? double totalSal = 0; ? ? ? ? ? ? double minSal = ((staff) al.get(0)).getSalary(); ? ? ? ? ? ? double maxSal = ((staff) al.get(0)).getSalary(); ? ? ? ? ? ? for (int i = 0; i < al.size(); i++) { ? ? ? ? ? ? ? ? staff staff = (staff) al.get(i); ? ? ? ? ? ? ? ? totalSal += staff.getSalary(); ? ? ? ? ? ? ? ? if (minSal > staff.getSalary()) { ? ? ? ? ? ? ? ? ? ? minSal = staff.getSalary(); ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? if (maxSal < staff.getSalary()) { ? ? ? ? ? ? ? ? ? ? maxSal = staff.getSalary(); ? ? ? ? ? ? ? ? } ? ? ? ? ? ? } ? ? ? ? ? ? System.out.println(al.size() + "個(gè)人的平均薪資為:" + totalSal / al.size()); ? ? ? ? ? ? System.out.println(al.size() + "個(gè)人的最低薪資為:" + minSal); ? ? ? ? ? ? System.out.println(al.size() + "個(gè)人的最高薪資為:" + maxSal); ? ? ? ? } ? ? } }
界面模塊(SalarySystem.java)
- 對(duì)不同員工的工資最低進(jìn)行了限制,畢竟法律規(guī)定了不能給太低
- 年齡也是(至少得成年吧——你懂的)
- 職位還可以安排更多
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; /* * @antuor:jeffw * 員工界面為博主清風(fēng)追夢的寫法 * 清風(fēng)大大的blogs:http://www.cnblogs.com/qingfengzhuimeng/p/6509965.html * io輸入輸出 * 在員工的類別上加入員工的職業(yè)區(qū)分別建立不同的類 * 程序使用英語+中文方式= =順便練習(xí)英語 */ public class SalarySystem { ? ? public static void main(String[] args) throws IOException //使用bufferreader讀取更加的安全,當(dāng)讀取不到的返回錯(cuò)誤拋出 ? ? { ? ? ? ? staffmanagement sys = new staffmanagement(); ? ? ? ? InputStreamReader isr = new InputStreamReader(System.in);//輸入流為系統(tǒng),也可以從文本讀取,一次讀取一個(gè)字符 ? ? ? ? BufferedReader br = new BufferedReader(isr);//讀取,對(duì)輸入流的封裝,可以讀取一行,一個(gè)字符或者是一個(gè)數(shù)字 ? ? ? ? //這里以isr讀取到的傳給br ? ? ? ? while(true) ? ? ? ? { ? ? ? ? ? ? //簡易菜單 ? ? ? ? ? ? System.out.println("簡單管理菜單" ); ? ? ? ? ? ? System.out.println("---------------------------------------"); ? ? ? ? ? ? System.out.println("1.添加新員工"); ? ? ? ? ? ? System.out.println("2.根據(jù)工號(hào)顯示員工的信息"); ? ? ? ? ? ? System.out.println("3.顯示所有員工信息"); ? ? ? ? ? ? System.out.println("4.修改員工的薪水"); ? ? ? ? ? ? System.out.println("5.根據(jù)工號(hào)刪除員工的信息"); ? ? ? ? ? ? System.out.println("6.統(tǒng)計(jì)員工的平均工資、最高工資和最低工資"); ? ? ? ? ? ? System.out.println("7.查看具體工作名稱"); ? ? ? ? ? ? System.out.println("8.最低工資說明"); ? ? ? ? ? ? System.out.println("9.清屏"); ? ? ? ? ? ? System.out.println("0.退出"); ? ? ? ? ? ? System.out.println("---------------------------------------"); ? ? ? ? ? ? System.out.println("請(qǐng)選擇序號(hào):"); ? ? ? ? ? ? String no = br.readLine(); ? ? ? ? ? ? if(no.equals("1")) { ? ? ? ? ? ? ? ? System.out.println("添加新員工:"); ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入姓名:"); ? ? ? ? ? ? ? ? String name = br.readLine(); ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入性別(男or女):"); ? ? ? ? ? ? ? ? String sex = br.readLine(); ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入工作:"); ? ? ? ? ? ? ? ? System.out.println("目前共有三種職位:\n" + ? ? ? ? ? ? ? ? ? ? ? ? "1.common_staff\n" + ? ? ? ? ? ? ? ? ? ? ? ? "2.common_manager\n" + ? ? ? ? ? ? ? ? ? ? ? ? "3.head_manager"); ? ? ? ? ? ? ? ? System.out.println("please input the work id:"); ? ? ? ? ? ? ? ? int work = Integer.parseInt(br.readLine()); ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入年齡:"); ? ? ? ? ? ? ? ? Scanner sc = new Scanner(System.in); ? ? ? ? ? ? ? ? int age = sc.nextInt(); ? ? ? ? ? ? ? ? if( age < 18 ){ ? ? ? ? ? ? ? ? ? ? System.out.println("the age is too small,please input again"); ? ? ? ? ? ? ? ? ? ? sc = new Scanner(System.in); ? ? ? ? ? ? ? ? ? ? age = sc.nextInt(); ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入工號(hào):"); ? ? ? ? ? ? ? ? String staffNo = br.readLine(); ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入工資:"); ? ? ? ? ? ? ? ? double salary = Double.parseDouble(br.readLine()); ? ? ? ? ? ? ? ? if( work == 1 ) { ? ? ? ? ? ? ? ? ? ? while (salary < 2000) { ? ? ? ? ? ? ? ? ? ? ? ? System.out.println("the common staff's salary is too low"); ? ? ? ? ? ? ? ? ? ? ? ? System.out.println("請(qǐng)重新輸入"); ? ? ? ? ? ? ? ? ? ? ? ? salary = Double.parseDouble(br.readLine()); ? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? else if( work == 2 ) { ? ? ? ? ? ? ? ? ? ? while (salary < 5000) { ? ? ? ? ? ? ? ? ? ? ? ? System.out.println("the manager's salary is too low"); ? ? ? ? ? ? ? ? ? ? ? ? System.out.println("請(qǐng)重新輸入"); ? ? ? ? ? ? ? ? ? ? ? ? salary = Double.parseDouble(br.readLine()); ? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? else if( work == 3 ) { ? ? ? ? ? ? ? ? ? ? while (salary < 8000) { ? ? ? ? ? ? ? ? ? ? ? ? System.out.println("the head manager's salary is too low"); ? ? ? ? ? ? ? ? ? ? ? ? System.out.println("請(qǐng)重新輸入"); ? ? ? ? ? ? ? ? ? ? ? ? salary = Double.parseDouble(br.readLine()); ? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? staff staff = null; ? ? ? ? ? ? ? ? if (work == 1) { ? ? ? ? ? ? ? ? ? ? staff = new staff(name, sex, age, staffNo, salary, work); ? ? ? ? ? ? ? ? } else if(work == 2){ ? ? ? ? ? ? ? ? ? ? staff = new manager(name, sex, age, staffNo, salary, work); ? ? ? ? ? ? ? ? }else if(work == 3 ) { ? ? ? ? ? ? ? ? ? ? staff = new manager(name, sex, age, staffNo, salary, work); ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? sys.addstaff(staff); ? ? ? ? ? ? }else if(no.equals("2")){ ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入員工號(hào):"); ? ? ? ? ? ? ? ? String staffNo = br.readLine(); ? ? ? ? ? ? ? ? sys.showInfo(staffNo); ? ? ? ? ? ? }else if(no.equals("3")){ ? ? ? ? ? ? ? ? System.out.println("顯示所有員工信息:"); ? ? ? ? ? ? ? ? sys.showAllInfo(); ? ? ? ? ? ? }else if(no.equals("4")){ ? ? ? ? ? ? ? ? System.out.println("修改員工的薪水:"); ? ? ? ? ? ? ? ? System.out.println("輸入員工工號(hào):"); ? ? ? ? ? ? ? ? String staffNo = br.readLine();//接收輸入的工號(hào) ? ? ? ? ? ? ? ? System.out.println("修改后的員工工資:"); ? ? ? ? ? ? ? ? String sal = br.readLine(); ? ? ? ? ? ? ? ? double salary = Double.parseDouble(sal); ? ? ? ? ? ? ? ? sys.modifySal(staffNo, salary); ? ? ? ? ? ? }else if(no.equals("5")){ ? ? ? ? ? ? ? ? System.out.println("根據(jù)工號(hào)刪除該員工的信息:"); ? ? ? ? ? ? ? ? System.out.println("輸入員工工號(hào):"); ? ? ? ? ? ? ? ? String staffNo = br.readLine();//接收輸入的工號(hào) ? ? ? ? ? ? ? ? sys.deleteInfo(staffNo); ? ? ? ? ? ? }else if(no.equals("6")){ ? ? ? ? ? ? ? ? System.out.println("統(tǒng)計(jì)員工的平均工資、最高工資和最低工資:"); ? ? ? ? ? ? ? ? sys.calSalary(); ? ? ? ? ? ? }else if(no.equals("7")) { ? ? ? ? ? ? ? ? System.out.println("查看具體工作名稱:\n" + ? ? ? ? ? ? ? ? ? ? ? ? "序號(hào)1為common staff\n" + ? ? ? ? ? ? ? ? ? ? ? ? "序號(hào)2為conmmon manager\n" + ? ? ? ? ? ? ? ? ? ? ? ? "序號(hào)3為head manger"); ? ? ? ? ? ? }else if(no.equals("8")) { ? ? ? ? ? ? ? ? System.out.println("最低工資說明:\n" + ? ? ? ? ? ? ? ? ? ? ? ? "1.common staff 最低工資為2000\n" + ? ? ? ? ? ? ? ? ? ? ? ? "2.conmmon manager 最低工資為5000\n" + ? ? ? ? ? ? ? ? ? ? ? ? "3.head manager 最低工資為8000\n"); ? ? ? ? ? ? }else if(no.equals("9")){ ? ? ? ? ? ? ? ? int i=0; ? ? ? ? ? ? ? ? while( i < 80) { ? ? ? ? ? ? ? ? ? ? System.out.println("********"); ? ? ? ? ? ? ? ? ? ? i++; ? ? ? ? ? ? ? ? }//java因?yàn)閕de的原因沒有提供內(nèi)置類似c++的方法,所以只能簡陋的使用***來清屏了= ?= ? ? ? ? ? ? ? ? System.out.println("如果覺得看著麻煩的話,可以在console里面鼠標(biāo)右擊->clear"); ? ? ? ? ? ? }else if(no.equals("0")){ ? ? ? ? ? ? ? ? System.exit(0); ? ? ? ? ? ? }else{ ? ? ? ? ? ? ? ? System.out.println("請(qǐng)輸入正確的序號(hào)"); ? ? ? ? ? ? } ? ? ? ? } ? ? } }
普通職位模塊(staff.java)
所有的員工模塊通過此模塊進(jìn)行擴(kuò)展
//普通員工類 public class staff { ? ? private String name; ? ? private String sex; ? ? private int age; ? ? private String no; ? ? private double salary; ? ? private int work; ? ? public staff(){} ? ? public staff(String name, String sex, int age, String no, double salary,int work) ? ? { ? ? ? ? this.name = name; ? ? ? ? this.sex = sex; ? ? ? ? this.age = age; ? ? ? ? this.no = no; ? ? ? ? this.salary = salary; ? ? ? ? this.work = work; ? ? } ? ? @Override ? ? public String toString() { // ? ? ? ?return "this is a common staff\n" // ? ? ? ? ? ? ? ?+"name:"+name+"\n" // ? ? ? ? ? ? ? ?+"sex :"+sex+"\n" // ? ? ? ? ? ? ? ?+"age :"+age+"\n" // ? ? ? ? ? ? ? ?+"no :"+no+"\n" // ? ? ? ? ? ? ? ?+"salary :"+salary+"\n" // ? ? ? ? ? ? ? ?+"work :"+work+"\n"; ? ? ? ? return getWork()+" the common staff is working and the salary is "+getSalary()+"\n" + ? ? ? ? ? ? ? ? "his/her workid is 1 and he/she needs handle with the company's common situations"; ? ? } ? ? public String getName() { ? ? ? ? return name; ? ? } ? ? public void setName(String name) { ? ? ? ? this.name = name; ? ? } ? ? public String getSex() { ? ? ? ? return sex; ? ? } ? ? public void setSex(String sex) { ? ? ? ? this.sex = sex; ? ? } ? ? public int getAge() { ? ? ? ? return age; ? ? } ? ? public void setAge(int age) { ? ? ? ? this.age = age; ? ? } ? ? public String getNo() { ? ? ? ? return no; ? ? } ? ? public void setNo(String no) { ? ? ? ? this.no = no; ? ? } ? ? public double getSalary() { ? ? ? ? return salary; ? ? } ? ? public void setSalary(double salary) { ? ? ? ? this.salary = salary; ? ? } ? ? public void setWork(int work){ ? ? ? ? this.work = work; ? ? } ? ? public ?int getWork(){ ? ? ? ? return work; ? ? } }
擴(kuò)展職位模塊
1.common manager
public class manager extends staff{ ? ? public manager(String name, String sex, int age, String no, double salary, int work) { ? ? ? ? setName(name); ? ? ? ? setSalary(salary); ? ? ? ? setAge(age); ? ? ? ? setNo(no); ? ? ? ? setSex(sex); ? ? ? ? setWork(work); ? ? } ? ? public manager(){ ? ? ? ? System.out.println("this is a manager"); ? ? } ? ? @Override ? ? public String toString() { ? ? ? ? return "the manager is working and the salary is "+getSalary()+"\n" + ? ? ? ? ? ? ? ? "his workid is 3 and he needs handle with the company's emergency situations"; ? ? } }
2.head manager
public class headmanager extends ?manager{ ? ? public headmanager(String name, String sex, int age, String no, double salary, int work) { ? ? ? ? setName(name); ? ? ? ? setSalary(salary); ? ? ? ? setAge(age); ? ? ? ? setNo(no); ? ? ? ? setSex(sex); ? ? ? ? setWork(work); ? ? } ? ? public headmanager(){ ? ? ? ? System.out.println("this is a headmanager"); ? ? ? ? System.out.println("his workid is 3 " + ? ? ? ? ? ? ? ? ? ? "and he needs handle with " + ? ? ? ? ? ? ? ? ? ? "the company's emergency situations"); ? ? } ? ? @Override ? ? public String toString() { ? ? ? ? return "the headmanager is working and the salary is "+getSalary()+getSalary()+"\n" + ? ? ? ? ? ? ? ? "his/her workid is 2 and he/she needs hanle whih the compant's main development"; ? ? } }
運(yùn)行展示
2018.12.15更新:
現(xiàn)在還沒有想到怎么用數(shù)據(jù)庫連接,不過新學(xué)習(xí)了file文件操作模式,現(xiàn)在把這種方式加入到員工管理里面:
以下是增加內(nèi)容:
else if(no.equals("10")) { ? ? ? ? ? ? ? ? System.out.println("正在讀取中,請(qǐng)稍候..."); ? ? ? ? ? ? ? ? File file = new File("1.txt"); ? ? ? ? ? ? ? ? Scanner input = new Scanner(file); ? ? ? ? ? ? ? ? while(input.hasNext()){ ? ? ? ? ? ? ? ? ? ? String name = input.nextLine(); ? ? ? ? ? ? ? ? ? ? String sex = input.nextLine(); ? ? ? ? ? ? ? ? ? ? int work = input.nextInt(); ? ? ? ? ? ? ? ? ? ? int age =input.nextInt(); ? ? ? ? ? ? ? ? ? ? input.nextLine(); ? ? ? ? ? ? ? ? ? ? String staffNo = input.nextLine(); ? ? ? ? ? ? ? ? ? ? double salary = input.nextDouble(); ? ? ? ? ? ? ? ? ? ? staff staff = null; ? ? ? ? ? ? ? ? ? ? if (work == 1) { ? ? ? ? ? ? ? ? ? ? ? ? staff = new staff(name, sex, age, staffNo, salary, work); ? ? ? ? ? ? ? ? ? ? } else if(work == 2){ ? ? ? ? ? ? ? ? ? ? ? ? staff = new manager(name, sex, age, staffNo, salary, work); ? ? ? ? ? ? ? ? ? ? }else if(work == 3 ) { ? ? ? ? ? ? ? ? ? ? ? ? staff = new manager(name, sex, age, staffNo, salary, work); ? ? ? ? ? ? ? ? ? ? }else{ ? ? ? ? ? ? ? ? ? ? ? ? System.out.println("不存在此職業(yè)"); ? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? ? ? sys.addstaff(staff); ? ? ? ? ? ? ? ? ? ? System.out.println("導(dǎo)入成功"); ? ? ? ? ? ? ? ? }
接下來的想法是把重復(fù)的員工去除,想先通過提醒使用者導(dǎo)入員工后,刪除原有員工文件,然后在使用者退出前提示導(dǎo)入員工名單進(jìn)行解決可能出現(xiàn)的員工重復(fù)問題
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
Java創(chuàng)建隨機(jī)數(shù)的四種方式總結(jié)
這篇文章主要介紹了java的四種隨機(jī)數(shù)生成方式的實(shí)現(xiàn)方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,,需要的朋友可以參考下2022-07-07在spring-boot工程中添加spring mvc攔截器
這篇文章主要介紹了在spring-boot工程中添加spring mvc攔截器,Spring MVC的攔截器(Interceptor)不是Filter,同樣可以實(shí)現(xiàn)請(qǐng)求的預(yù)處理、后處理。,需要的朋友可以參考下2019-06-06一篇文章帶你學(xué)習(xí)JAVA MyBatis底層原理
近來想寫一個(gè)mybatis的分頁插件,但是在寫插件之前肯定要了解一下mybatis具體的工作原理吧,本文就詳細(xì)總結(jié)了MyBatis工作原理,,需要的朋友可以參考下2021-09-09Spring動(dòng)態(tài)管理定時(shí)任務(wù)之ThreadPoolTaskScheduler解讀
這篇文章主要介紹了Spring動(dòng)態(tài)管理定時(shí)任務(wù)之ThreadPoolTaskScheduler解讀,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-12-12MyBatis 添加元數(shù)據(jù)自定義元素標(biāo)簽的實(shí)現(xiàn)代碼
這篇文章主要介紹了MyBatis 添加元數(shù)據(jù)自定義元素標(biāo)簽的實(shí)現(xiàn)代碼,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-07-07深入理解Java中的volatile關(guān)鍵字(總結(jié)篇)
volatile這個(gè)關(guān)鍵字,不僅僅在Java語言中有,在很多語言中都有的,而且其用法和語義也都是不盡相同的。這篇文章主要介紹了Java中的volatile關(guān)鍵字,需要的朋友可以參考下2018-10-10