Java compilation tools and environment preparation:
##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 Step 2: Configure maven steps Case 1: If maven has not been configured locally, you can keep the following default configuration (case 2 is ignored if not configured) Case 2: If the maven warehouse address has been configured locally, you need to change the red box above to your local maven addressIf I have configured the maven warehouseIDEA JDK1.8 MySQL8.0 Maven
The maven warehouse has been configured locally: the following three configuration reference casesOne is the directory, one is the xml file, and the other is the jar package address There is a maven environment locally, so the configuration modification and local adaptation hereStep 2: Configure the JDK environment1. If the code becomes popular, remember Check whether the Java running environment is configured 2. Find the place where jdk is configured and configure the jdk environment of your computer 3. Check some related directories and modify them to something related to jdk1.8 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 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 itStep 3: Check the configuration of the database[Configuration file] SpringBoot project finds applicationyml File 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 ConfigurationSteps Four: Database connectionUse the database connection tool to connect to MySQL (I use Navicat) Run the project You're done, enter http://localhost:2281/ to access the pagespring:
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
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!