search
HomeJavajavaTutorialHow IntelliJ IDEA runs the SpringBoot project

How IntelliJ IDEA runs the SpringBoot project

May 20, 2023 pm 05:07 PM
springbootintellij idea

Java compilation tools and environment preparation:

IDEA JDK1.8 MySQL8.0 Maven

How IntelliJ IDEA runs the SpringBoot project

##Step 1: Configure maven

Step one: Open the project with IDEA and start configuring the maven environment. If maven is not configured locally in advance, just use IDEA's default configuration

How IntelliJ IDEA runs the SpringBoot project

Step 2: Configure maven steps

How IntelliJ IDEA runs the SpringBoot project

Case 1: If maven has not been configured locally, you can keep the following default configuration (case 2 is ignored if not configured)

How IntelliJ IDEA runs the SpringBoot project

Case 2: If the maven warehouse address has been configured locally, you need to change the red box above to your local maven address

If I have configured the maven warehouse

How IntelliJ IDEA runs the SpringBoot project

The maven warehouse has been configured locally: the following three configuration reference cases

One is the directory, one is the xml file, and the other is the jar package address

How IntelliJ IDEA runs the SpringBoot project

There is a maven environment locally, so the configuration modification and local adaptation here

Step 2: Configure the JDK environment

1. If the code becomes popular, remember Check whether the Java running environment is configured

How IntelliJ IDEA runs the SpringBoot project

2. Find the place where jdk is configured and configure the jdk environment of your computer

How IntelliJ IDEA runs the SpringBoot project

3. Check some related directories and modify them to something related to jdk1.8

How IntelliJ IDEA runs the SpringBoot project

4. Remember to click Apply for the above configuration and then click OK

to complete the execution Click the refresh button on the right side of the picture below multiple times

How IntelliJ IDEA runs the SpringBoot project

If it becomes popular, click the refresh symbol multiple times, and you can also perform pre-compilation. After execution, the dependencies will be downloaded to the local normally

Reason for popularity: The local dependency package is missing and needs to be downloaded. Click the refresh symbol to download it

Step 3: Check the configuration of the database

[Configuration file] SpringBoot project finds applicationyml File

How IntelliJ IDEA runs the SpringBoot project

Check whether the database name, database account, and database password are consistent with the local MySQL and MySQL library

Required when using druid connection pool Configuration

spring:
datasource:
username: root
password: root
url: jdbc:mysql://127.0.0.1:3307/property_db_copyautoReconnect=true&useUnicode=true&characterEncoding=utf8
driver-class-name: com.mysql.jdbc.Driver
Note: Change SpringBoot’s default DataSource to DruidDataSource
type: com.alibaba.druid.pool.DruidDataSource

Steps Four: Database connection

Use the database connection tool to connect to MySQL (I use Navicat)

How IntelliJ IDEA runs the SpringBoot project

Run the project

How IntelliJ IDEA runs the SpringBoot project

You're done, enter http://localhost:2281/ to access the page

Please see the database initialization data for the login account and password

The above is the detailed content of How IntelliJ IDEA runs the SpringBoot project. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:亿速云. If there is any infringement, please contact admin@php.cn delete
How do I use Maven or Gradle for advanced Java project management, build automation, and dependency resolution?How do I use Maven or Gradle for advanced Java project management, build automation, and dependency resolution?Mar 17, 2025 pm 05:46 PM

The article discusses using Maven and Gradle for Java project management, build automation, and dependency resolution, comparing their approaches and optimization strategies.

How do I create and use custom Java libraries (JAR files) with proper versioning and dependency management?How do I create and use custom Java libraries (JAR files) with proper versioning and dependency management?Mar 17, 2025 pm 05:45 PM

The article discusses creating and using custom Java libraries (JAR files) with proper versioning and dependency management, using tools like Maven and Gradle.

How do I implement multi-level caching in Java applications using libraries like Caffeine or Guava Cache?How do I implement multi-level caching in Java applications using libraries like Caffeine or Guava Cache?Mar 17, 2025 pm 05:44 PM

The article discusses implementing multi-level caching in Java using Caffeine and Guava Cache to enhance application performance. It covers setup, integration, and performance benefits, along with configuration and eviction policy management best pra

How can I use JPA (Java Persistence API) for object-relational mapping with advanced features like caching and lazy loading?How can I use JPA (Java Persistence API) for object-relational mapping with advanced features like caching and lazy loading?Mar 17, 2025 pm 05:43 PM

The article discusses using JPA for object-relational mapping with advanced features like caching and lazy loading. It covers setup, entity mapping, and best practices for optimizing performance while highlighting potential pitfalls.[159 characters]

How does Java's classloading mechanism work, including different classloaders and their delegation models?How does Java's classloading mechanism work, including different classloaders and their delegation models?Mar 17, 2025 pm 05:35 PM

Java's classloading involves loading, linking, and initializing classes using a hierarchical system with Bootstrap, Extension, and Application classloaders. The parent delegation model ensures core classes are loaded first, affecting custom class loa

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment