項目啓動時檢查環境,若認證未通過,彈框提示,且終止運行

package com.hhwy.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import javax.swing.*; @SpringBootApplication public class FtDemoApplication { public static void main(String[] args) { if("500".equals("code")){ JOptionPane.showConfirmDialog(null, "認證失敗" , "錯誤", JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE); System.exit(-1); } SpringApplication.run(FtDemoApplication.class, args); } }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章