Build and run SpringBoot+Vue project (student information management system)

Project Address: Student Information Management System

Front-end part (Vue)

First run terminal as administrator

Otherwise, some errors will be reported when running the command

image-20230121153316433

1. First download node.js

2. Open and install node.js

3. The installation is complete, open the console, enter node -v to check whether the installation is complete, if the version number is displayed, the installation is successful

image-20230121152729697

4. Enter the Taobao mirror address:

npm install -g cnpm -registry-https://registry.npm.taobao.org

image-20230121152847963

5. Install vue-cli:

cnpm install -g @vue/cli

After installing the scaffolding, you can maintain other people's projects

Running this command may report an error:

image-20230121153517877

Solution:

1. Run powershell as an administrator
2. Execute in powershell: get-ExecutionPolicy, showing Restricted (indicating that the status is prohibited).
3. Execute in powershell: set-ExecutionPolicy RemoteSigned, select Y or A.
4. Execute in powershell: get-ExecutionPolicy, display RemoteSigned.

image-20230121153628572

image-20230121153714933

Then continue to run the command

6. Enter the project directory

First, open the project in the compiler. If you already have the following two folders, delete them first. This is generated after running other people’s compilers, so don’t be afraid to delete them.

image-20230121171605776
Enter the project from the command line: student_client
image-20230121154016382

Type in terminal:

npm install
或者
npm i

npm load project dependency reportnpm WARN deprecatedquestion
insert image description here

Solution:

Upgrade npm version

npm install -g npm	-- 默认升级为最新版本

Continue to report an error:
insert image description here

The node.js version is too high to install certain dependencies

Solution:

Reduce node and npm versions – I uninstalled and reinstalled, here I drop to

image-20230121165814188

Note that the node and npm versions must match

Then continue to execute the command

image-20230121165921925

7. Inputnpm run devornpm run serverun project

The difference between npm run serve or npm run dev in the npm operation of the Vue project

Find the package.json file in the project, check the "script" object, and see whether it is serve or dev in the script

image-20230121170553320

image-20230121170622333

Run successfully:
insert image description here

If an exception is thrown when npm run serve: error:0308010C
insert image description here

Input set NODE_OPTIONS=--openssl-legacy-provider
can run successfully,
the main reason is that the version is not compatible

Then enter the address in the browser:
image-20230121170846489

Backend part (SpringBoot)

Open student_server with IDEA, run

If the error is similar to this: java: warning: source release 11 requires target release 11

image-20230121192456870

Solution:

1. Click File->Settings->Build, Execution, Deployment->java Compiler in the upper left corner, and then find the project that reported the error (if it is not displayed, click +), and select version 8 in the drop-down box on the right

image-20230121192625802

2. Click Project Structure -> Module in the upper left corner, find the project that reported the error, select 8 in the source, and then select your own jdk version in the dependency, mine is jdk1.8, and finally click Apply to confirm.

image-20230121192701280

3. In addition to changing the above two places, the following sentence should be added to the configuration file pom.xml

<properties>
    <java.version>8</java.version>
</properties>

4. Rerun the project successfully.

image-20230121192839549
Then you can enter the system
insert image description here
Happy New Year's Eve

Guess you like

Origin blog.csdn.net/weixin_55988897/article/details/128747000