亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

java實(shí)現(xiàn)簡(jiǎn)易飛機(jī)大戰(zhàn)

 更新時(shí)間:2022年05月08日 14:40:49   作者:編程夜游神  
這篇文章主要為大家詳細(xì)介紹了java實(shí)現(xiàn)簡(jiǎn)易飛機(jī)大戰(zhàn),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了java實(shí)現(xiàn)簡(jiǎn)易飛機(jī)大戰(zhàn)的具體代碼,供大家參考,具體內(nèi)容如下

整體思路

1.創(chuàng)建游戲窗體,添加面板JPanel,重寫(xiě)JPanel中的paint方法,遍歷所有飛機(jī)和子彈繪制,用定時(shí)器進(jìn)行重繪,實(shí)現(xiàn)動(dòng)畫(huà)效果
2.添加敵機(jī)和發(fā)射子彈用的是多線程
3.碰撞檢測(cè)采用的是矩形類Rectangle中的intersects方法

代碼實(shí)現(xiàn)

用手機(jī)查看代碼好像只顯示62行

英雄戰(zhàn)機(jī)類

package com.cml.model;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseEvent;
import java.util.ArrayList;

import com.cml.util.ImageUtil;

public class Hero {
?? ?private int x, y;// 坐標(biāo)
?? ?private int width, height;?? ?//寬高
?? ?private Image heroImage; // 圖片
?? ?private boolean isAlive = true;
?? ?private ArrayList<Bullet> bullets = new ArrayList<>();
?? ?public Hero() {
?? ??? ?this.x = 180;
?? ??? ?this.y = 600;
?? ??? ?this.heroImage = ImageUtil.hero;
?? ??? ?width = heroImage.getWidth(null);
?? ??? ?height = heroImage.getHeight(null);
?? ??? ?initBullets();
?? ?}
?? ?private void initBullets() {
?? ??? ?//用線程發(fā)射子彈
?? ??? ?new Thread() {
?? ??? ??? ?@Override
?? ??? ??? ?public void run() {
?? ??? ??? ??? ?while (isAlive) {
?? ??? ??? ??? ??? ?bullets.add(new Bullet(Hero.this));
?? ??? ??? ??? ??? ?try {
?? ??? ??? ??? ??? ??? ?sleep(200);
?? ??? ??? ??? ??? ?} catch (InterruptedException e) {
?? ??? ??? ??? ??? ??? ?// TODO Auto-generated catch block
?? ??? ??? ??? ??? ??? ?e.printStackTrace();
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ?}
?? ??? ??? ?}
?? ??? ?}.start();
?? ?}

?? ?public Hero(int x, int y, Image heroImage) {
?? ??? ?super();
?? ??? ?this.x = x;
?? ??? ?this.y = y;
?? ??? ?this.heroImage = heroImage;
?? ?}

?? ?public int getX() {
?? ??? ?return x;
?? ?}

?? ?public void setX(int x) {
?? ??? ?this.x = x;
?? ?}

?? ?public int getY() {
?? ??? ?return y;
?? ?}

?? ?public void setY(int y) {
?? ??? ?this.y = y;
?? ?}

?? ?public Image getHeroImage() {
?? ??? ?return heroImage;
?? ?}

?? ?public void setHeroImage(Image heroImage) {
?? ??? ?this.heroImage = heroImage;
?? ?}

?? ?//繪制英雄戰(zhàn)機(jī)
?? ?public void paint(Graphics g) {
?? ??? ?if (!isAlive) {
?? ??? ??? ?heroImage = ImageUtil.hero_destory;
?? ??? ?}
?? ??? ?g.drawImage(heroImage, x, y, null);
?? ??? ?for (int i = 0; i < bullets.size(); i++) {
?? ??? ??? ?Bullet bullet = bullets.get(i);
?? ??? ??? ?if (bullet.getY() < 0) {
?? ??? ??? ??? ?bullets.remove(bullet);
?? ??? ??? ?}
?? ??? ??? ?bullet.paint(g);
?? ??? ?}
?? ?}

?? ?public int getWidth() {
?? ??? ?return width;
?? ?}

?? ?public void setWidth(int width) {
?? ??? ?this.width = width;
?? ?}

?? ?public int getHeight() {
?? ??? ?return height;
?? ?}

?? ?public void setHeight(int height) {
?? ??? ?this.height = height;
?? ?}

?? ?//鼠標(biāo)拖拽移動(dòng)
?? ?public void mouseDragged(MouseEvent e) {
?? ??? ?if (isAlive) {
?? ??? ??? ?int x0 = e.getX();
?? ??? ??? ?int y0 = e.getY();
?? ??? ??? ?if (isInScopePanel(x0, y0)) {
?? ??? ??? ??? ?if (isInScopeImageWidth(x0) && isInScopeImageheigth(y0)) {
?? ??? ??? ??? ??? ?this.x = x0 - width / 2;
?? ??? ??? ??? ??? ?this.y = y0 - height / 2;
?? ??? ??? ??? ?}
?? ??? ??? ?} else {
?? ??? ??? ??? ?if (isInScopeImageWidth(x0)) {
?? ??? ??? ??? ??? ?this.x = x0 - width / 2;
?? ??? ??? ??? ?}
?? ??? ??? ??? ?if (isInScopeImageheigth(y0)) {
?? ??? ??? ??? ??? ?this.y = y0 - height / 2;
?? ??? ??? ??? ?}
?? ??? ??? ?}

?? ??? ?}
?? ??? ?
?? ?}

?? ?private boolean isInScopePanel(int x0, int y0) {
?? ??? ?if (x0 > 10 && x0 < 460 && y0 > 140 && y0 < 730) {
?? ??? ??? ?return true;
?? ??? ?}
?? ??? ?return false;
?? ?}

?? ?private boolean isInScopeImageheigth(int y0) {
?? ??? ?if (y0 >= y && y0 <= y + height) {
?? ??? ??? ?if (y0 > 140 && y0 < 730) {
?? ??? ??? ??? ?return true;
?? ??? ??? ?}
?? ??? ?}
?? ??? ?return false;
?? ?}

?? ?private boolean isInScopeImageWidth(int x0) {
?? ??? ?if (x0 >= x && x0<= x + width) {
?? ??? ??? ?if (x0 > 10 && x0 < 460) {
?? ??? ??? ??? ?return true;
?? ??? ??? ?}
?? ??? ?}
?? ??? ?return false;
?? ?}
?? ?public ArrayList<Bullet> getBullets() {
?? ??? ?return bullets;
?? ?}
?? ?public void setAlive(boolean isAlive) {
?? ??? ?this.isAlive = isAlive;
?? ?}
?? ?public boolean isAlive() {
?? ??? ?return isAlive;
?? ?}
}

敵機(jī)類

package com.cml.model;

import java.awt.Graphics;
import java.awt.Image;
import java.util.Random;

import com.cml.util.ImageUtil;

public class Enemy {
?? ?private Random random = new Random();

?? ?private int x, y;// 坐標(biāo)
?? ?private int width, height; // 寬高
?? ?private boolean isAlive = true;
?? ?private static final int SPEED = 4;
?? ?private Image enemyImage; // 圖片

?? ?public Enemy() {
?? ??? ?RandomEnemyXY();
?? ??? ?enemyImage = ImageUtil.enemy;
?? ??? ?width = enemyImage.getWidth(null);
?? ??? ?height = enemyImage.getHeight(null);
?? ?}

?? ?private void RandomEnemyXY() {
?? ??? ?x = random.nextInt(430);
?? ??? ?y = 0;
?? ?}

?? ?public void paint(Graphics g) {
?? ??? ?if (!isAlive) {
?? ??? ??? ?enemyImage = ImageUtil.bomb;
?? ??? ?}
?? ??? ?g.drawImage(enemyImage, x, y, null);
?? ??? ?move();
?? ?}

?? ?public boolean isAlive() {
?? ??? ?return isAlive;
?? ?}

?? ?public void setAlive(boolean isAlive) {
?? ??? ?this.isAlive = isAlive;
?? ?}

?? ?private void move() {
?? ??? ?if (isAlive) {
?? ??? ??? ?y += SPEED;
?? ??? ?}
?? ??? ?
?? ?}

?? ?public int getX() {
?? ??? ?return x;
?? ?}

?? ?public void setX(int x) {
?? ??? ?this.x = x;
?? ?}

?? ?public int getY() {
?? ??? ?return y;
?? ?}

?? ?public void setY(int y) {
?? ??? ?this.y = y;
?? ?}

?? ?public int getWidth() {
?? ??? ?return width;
?? ?}

?? ?public void setWidth(int width) {
?? ??? ?this.width = width;
?? ?}

?? ?public int getHeight() {
?? ??? ?return height;
?? ?}

?? ?public void setHeight(int height) {
?? ??? ?this.height = height;
?? ?}
}

子彈類

package com.cml.model;

import java.awt.Graphics;
import java.awt.Image;

import com.cml.util.ImageUtil;

public class Bullet {
?? ?private int x, y;// 坐標(biāo)
?? ?private int width, height; // 寬高
?? ?private static final int SPEED = 10; // 速度
?? ?private Image bulletImage; // 圖片

?? ?public Bullet(Hero hero) {
?? ??? ?bulletImage = ImageUtil.bullet;
?? ??? ?width = bulletImage.getWidth(null);
?? ??? ?height = bulletImage.getHeight(null);
?? ??? ?this.x = hero.getX() + hero.getWidth() / 2 - width / 2;
?? ??? ?this.y = hero.getY();
?? ?}

?? ?public int getX() {
?? ??? ?return x;
?? ?}

?? ?public void setX(int x) {
?? ??? ?this.x = x;
?? ?}

?? ?public int getY() {
?? ??? ?return y;
?? ?}

?? ?public void setY(int y) {
?? ??? ?this.y = y;
?? ?}

?? ?public int getWidth() {
?? ??? ?return width;
?? ?}

?? ?public void setWidth(int width) {
?? ??? ?this.width = width;
?? ?}

?? ?public int getHeight() {
?? ??? ?return height;
?? ?}

?? ?public void setHeight(int height) {
?? ??? ?this.height = height;
?? ?}

?? ?public void paint(Graphics g) {
?? ??? ?g.drawImage(bulletImage, x, y, null);
?? ??? ?move();
?? ?}

?? ?private void move() {
?? ??? ?y -= SPEED;
?? ?}
}

圖片工具類

package com.cml.util;

import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ImageUtil {
?? ?public static BufferedImage hero;
?? ?public static BufferedImage enemy;
?? ?public static BufferedImage bullet;
?? ?public static BufferedImage bg;
?? ?public static BufferedImage bomb;
?? ?public static BufferedImage hero_destory;
?? ?public static BufferedImage login;
?? ?
?? ?static {
?? ??? ?try {
?? ??? ??? ?hero = ImageIO.read(ImageUtil.class.getResource("/img/hero.png"));
?? ??? ??? ?enemy = ImageIO.read(ImageUtil.class.getResource("/img/enemy.png"));
?? ??? ??? ?bullet = ImageIO.read(ImageUtil.class.getResource("/img/bullet.png"));
?? ??? ??? ?bg = ImageIO.read(ImageUtil.class.getResource("/img/bg.png"));
?? ??? ??? ?bomb = ImageIO.read(ImageUtil.class.getResource("/img/bomb.png"));
?? ??? ??? ?hero_destory = ImageIO.read(ImageUtil.class.getResource("/img/hero_destory.png"));
//?? ??? ??? ?login = ImageIO.read(new File("img/login.png"));
?? ??? ?} catch (IOException e) {
?? ??? ??? ?// TODO Auto-generated catch block
?? ??? ??? ?e.printStackTrace();
?? ??? ?}
?? ?}
}

游戲窗體類

package com.cml.frame;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

import com.cml.model.Bullet;
import com.cml.model.Enemy;
import com.cml.model.Hero;
import com.cml.util.ImageUtil;
import com.sun.java.swing.plaf.windows.resources.windows;

public class GameFrame extends JFrame {

?? ?private JPanel gamePanel;

?? ?private Hero hero;
?? ?private ArrayList<Enemy> enemies = new ArrayList<Enemy>();
?? ?private ArrayList<Bullet> hero_bullet;
?? ?private Timer timer;

?? ?public GameFrame() {
?? ??? ?// 初始化游戲窗體
?? ??? ?initGameFrame();
?? ??? ?// 初始化英雄戰(zhàn)機(jī)
?? ??? ?initHero();
?? ??? ?// 初始化游戲面板
?? ??? ?initGamePanel();
?? ??? ?// 初始化定時(shí)器
?? ??? ?initTimer();
?? ??? ?// 初始化敵軍戰(zhàn)機(jī)
?? ??? ?initEnemies();
?? ?}

?? ?private void initEnemies() {
?? ??? ?new Thread() {
?? ??? ??? ?@Override
?? ??? ??? ?public void run() {
?? ??? ??? ??? ?while (true) {
?? ??? ??? ??? ??? ?try {
?? ??? ??? ??? ??? ??? ?Thread.sleep(1000);
?? ??? ??? ??? ??? ?} catch (InterruptedException e) {
?? ??? ??? ??? ??? ??? ?// TODO Auto-generated catch block
?? ??? ??? ??? ??? ??? ?e.printStackTrace();
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?enemies.add(new Enemy());
?? ??? ??? ??? ?}

?? ??? ??? ?}
?? ??? ?}.start();

?? ?}

?? ?private void initTimer() {
?? ??? ?timer = new Timer();
?? ??? ?TimerTask task = new TimerTask() {

?? ??? ??? ?@Override
?? ??? ??? ?public void run() {
?? ??? ??? ??? ?gamePanel.repaint();
?? ??? ??? ?}
?? ??? ?};
?? ??? ?timer.scheduleAtFixedRate(task, 0, 20);
?? ?}

?? ?private void initHero() {
?? ??? ?hero = new Hero();
?? ??? ?hero_bullet = hero.getBullets();
?? ?}

?? ?private void initGameFrame() {
?? ??? ?setTitle("打飛機(jī)");
?? ??? ?setSize(480, 800);
?? ??? ?setLocationRelativeTo(null);
?? ??? ?setDefaultCloseOperation(EXIT_ON_CLOSE);
?? ??? ?setResizable(false);
?? ?}

?? ?private void initGamePanel() {
?? ??? ?gamePanel = new JPanel() {
?? ??? ??? ?private int score = 0;
?? ??? ??? ?/**
?? ??? ??? ? * 判斷敵機(jī)與子彈相撞
?? ??? ??? ? * @param enemy
?? ??? ??? ? * @param bullet
?? ??? ??? ? * @return
?? ??? ??? ? */
?? ??? ??? ?public boolean isHit(Enemy enemy, Bullet bullet) {
?? ??? ??? ??? ?Rectangle r1 = new Rectangle(enemy.getX(), enemy.getY(), enemy.getWidth(), enemy.getHeight());
?? ??? ??? ??? ?Rectangle r2 = new Rectangle(bullet.getX(), bullet.getY(), bullet.getWidth(), bullet.getHeight());
?? ??? ??? ??? ?return r1.intersects(r2);
?? ??? ??? ?}
?? ??? ??? ?
?? ??? ??? ?/**
?? ??? ??? ? * 判斷英雄戰(zhàn)機(jī)與敵機(jī)相撞
?? ??? ??? ? * @param enemy
?? ??? ??? ? * @param hero
?? ??? ??? ? * @return
?? ??? ??? ? */
?? ??? ??? ?public boolean isHit(Enemy enemy, Hero hero) {
?? ??? ??? ??? ?Rectangle r1 = new Rectangle(enemy.getX(), enemy.getY(), enemy.getWidth(), enemy.getHeight());
?? ??? ??? ??? ?Rectangle r2 = new Rectangle(hero.getX() + hero.getWidth() / 3, hero.getY() + hero.getHeight() / 3,
?? ??? ??? ??? ??? ??? ?hero.getWidth() / 3, hero.getHeight() / 3);
?? ??? ??? ??? ?return r1.intersects(r2);
?? ??? ??? ?}

?? ??? ??? ?@Override
?? ??? ??? ?public void paint(Graphics g) {
?? ??? ??? ??? ?super.paint(g);
?? ??? ??? ??? ?g.drawImage(ImageUtil.bg, 0, 0, 480, 800, null);
?? ??? ??? ??? ?for (int i = 0; i < enemies.size(); i++) {
?? ??? ??? ??? ??? ?Enemy enemy = enemies.get(i);
?? ??? ??? ??? ??? ?for (int j = 0; j < hero_bullet.size(); j++) {
?? ??? ??? ??? ??? ??? ?Bullet bullet = hero_bullet.get(j);
?? ??? ??? ??? ??? ??? ?if (isHit(enemy, bullet) && enemy.isAlive()) {
?? ??? ??? ??? ??? ??? ??? ?enemy.setAlive(false);
?? ??? ??? ??? ??? ??? ??? ?hero_bullet.remove(bullet);
?? ??? ??? ??? ??? ??? ??? ?new Thread() {
?? ??? ??? ??? ??? ??? ??? ??? ?public void run() {
?? ??? ??? ??? ??? ??? ??? ??? ??? ?score += 10;
?? ??? ??? ??? ??? ??? ??? ??? ??? ?try {
?? ??? ??? ??? ??? ??? ??? ??? ??? ??? ?sleep(200);
?? ??? ??? ??? ??? ??? ??? ??? ??? ?} catch (InterruptedException e) {
?? ??? ??? ??? ??? ??? ??? ??? ??? ??? ?// TODO Auto-generated catch block
?? ??? ??? ??? ??? ??? ??? ??? ??? ??? ?e.printStackTrace();
?? ??? ??? ??? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ??? ??? ??? ?enemies.remove(enemy);
?? ??? ??? ??? ??? ??? ??? ??? ?};
?? ??? ??? ??? ??? ??? ??? ?}.start();
?? ??? ??? ??? ??? ??? ??? ?break;
?? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?if (isHit(enemy, hero)) {
?? ??? ??? ??? ??? ??? ?timer.cancel();
?? ??? ??? ??? ??? ??? ?hero.setAlive(false);
?? ??? ??? ??? ??? ??? ?enemy.setAlive(false);
?? ??? ??? ??? ??? ??? ?JOptionPane.showMessageDialog(this, "游戲結(jié)束,您的得分是:" + score);
?? ??? ??? ??? ??? ??? ?System.exit(0);
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?if (enemy.getY() > 800) {
?? ??? ??? ??? ??? ??? ?enemies.remove(enemy);
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?enemy.paint(g);
?? ??? ??? ??? ?}
?? ??? ??? ??? ?if (hero != null) {
?? ??? ??? ??? ??? ?hero.paint(g);
?? ??? ??? ??? ?}
?? ??? ??? ??? ?g.setFont(new Font("宋體", Font.BOLD, 24));
?? ??? ??? ??? ?g.drawString("得分:" + score, 350, 30);

?? ??? ??? ?}
?? ??? ?};
?? ??? ?add(gamePanel);
?? ??? ?// 設(shè)置拖拽監(jiān)聽(tīng)事件
?? ??? ?gamePanel.addMouseMotionListener(new MouseAdapter() {

?? ??? ??? ?@Override
?? ??? ??? ?public void mouseDragged(MouseEvent e) {
?? ??? ??? ??? ?if (hero != null) {
?? ??? ??? ??? ??? ?hero.mouseDragged(e);
?? ??? ??? ??? ?}
?? ??? ??? ?}
?? ??? ?});
?? ?}

}

啟動(dòng)游戲類

package com.cml.main;

import com.cml.frame.GameFrame;

public class Start {

?? ?public static void main(String[] args) {
?? ??? ?/**
?? ??? ? * 初始化窗體
?? ??? ? */
?? ??? ?new GameFrame().setVisible(true);
?? ?}
}

運(yùn)行效果圖

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • IDEA中Translation使用及問(wèn)題解決

    IDEA中Translation使用及問(wèn)題解決

    本文主要介紹了IDEA中Translation使用及問(wèn)題解決,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-06-06
  • Spring5新特性之Reactive響應(yīng)式編程

    Spring5新特性之Reactive響應(yīng)式編程

    這篇文章主要介紹了Spring5新特性之Reactive響應(yīng)式編程,響應(yīng)式編程是一種編程范式,通用和專注于數(shù)據(jù)流和變化的,并且是異步的,下文更多詳細(xì)內(nèi)容,需要的小伙伴可以參考一下,希望對(duì)你有所幫助
    2022-03-03
  • Servlet+JavaBean+JSP打造Java Web注冊(cè)與登錄功能

    Servlet+JavaBean+JSP打造Java Web注冊(cè)與登錄功能

    比作MVC的話,控制器部分采用Servlet來(lái)實(shí)現(xiàn),模型部分采用JavaBean來(lái)實(shí)現(xiàn),而大部分的視圖采用Jsp頁(yè)面來(lái)實(shí)現(xiàn),接下來(lái)我們就來(lái)詳細(xì)看看如何用Servlet+JavaBean+JSP打造Java Web注冊(cè)與登錄功能
    2016-05-05
  • SpringCloud-Gateway轉(zhuǎn)發(fā)WebSocket失敗問(wèn)題及解決

    SpringCloud-Gateway轉(zhuǎn)發(fā)WebSocket失敗問(wèn)題及解決

    這篇文章主要介紹了SpringCloud-Gateway轉(zhuǎn)發(fā)WebSocket失敗問(wèn)題及解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-09-09
  • Spring Boot實(shí)戰(zhàn)之靜態(tài)資源處理

    Spring Boot實(shí)戰(zhàn)之靜態(tài)資源處理

    這篇文章主要介紹了Spring Boot實(shí)戰(zhàn)之靜態(tài)資源處理,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2018-01-01
  • springboot 多數(shù)據(jù)源的實(shí)現(xiàn)(最簡(jiǎn)單的整合方式)

    springboot 多數(shù)據(jù)源的實(shí)現(xiàn)(最簡(jiǎn)單的整合方式)

    這篇文章主要介紹了springboot 多數(shù)據(jù)源的實(shí)現(xiàn)(最簡(jiǎn)單的整合方式),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-11-11
  • Maven安裝與配置及Idea配置Maven的全過(guò)程

    Maven安裝與配置及Idea配置Maven的全過(guò)程

    Maven是一個(gè)項(xiàng)目管理工具,可以對(duì)Java項(xiàng)目進(jìn)行自動(dòng)化的構(gòu)建和依賴管理,下面這篇文章主要給大家介紹了關(guān)于Maven安裝與配置及Idea配置Maven的相關(guān)資料,文中通過(guò)圖文介紹的非常詳細(xì),需要的朋友可以參考下
    2023-02-02
  • SpringBoot結(jié)合SpringSecurity實(shí)現(xiàn)圖形驗(yàn)證碼功能

    SpringBoot結(jié)合SpringSecurity實(shí)現(xiàn)圖形驗(yàn)證碼功能

    這篇文章主要介紹了SpringBoot + SpringSecurity 實(shí)現(xiàn)圖形驗(yàn)證碼功能,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2018-05-05
  • springboot 在idea中實(shí)現(xiàn)熱部署的方法

    springboot 在idea中實(shí)現(xiàn)熱部署的方法

    這篇文章主要介紹了springboot 在idea中實(shí)現(xiàn)熱部署的方法,實(shí)現(xiàn)了熱部署,在每一次作了修改之后,都會(huì)自動(dòng)的重啟,非常節(jié)約時(shí)間,感興趣的小伙伴們可以參考一下
    2018-10-10
  • JAVA多線程的使用場(chǎng)景與注意事項(xiàng)總結(jié)

    JAVA多線程的使用場(chǎng)景與注意事項(xiàng)總結(jié)

    這篇文章主要給大家介紹了關(guān)于JAVA多線程的使用場(chǎng)景與注意事項(xiàng)的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者使用java具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-03-03

最新評(píng)論