Skip to content

VJSP Local Development Environment Setup and Project Startup Guide

Step 1: Download Basic Project Files

Get the project basic file package and extract it to a local directory.

Step 2: Open the Project in VS Code

Start VSCode, select the extracted project root directory via "File > Open Folder".

Step 3: Environment Dependency Installation

The project requires the following dependency environments to run. Configuration with the specified versions is recommended:

  • JDK 1.8 or higher
  • Maven 3.6 or higher (This guide uses version 3.8.1 as an example)
  • Database (Choose one: PostgreSQL/MySQL)
  • Redis Server

Maven Installation Steps

  1. Download the Installation Package Visit the Maven official website and download the latest version of the binary zip package (e.g., apache-maven-3.8.1-bin.zip).

  2. Extract Files Extract the zip package to a local directory (e.g., C:\Apache\maven). Ensure the path contains no Chinese characters, spaces, or special characters.

  3. Configure System Variables

    • Open "Control Panel > System > Advanced system settings > Environment Variables".
    • In the "System variables" section, click "New" and configure:
      • Variable name: MAVEN_HOME
      • Variable value: Maven extraction root directory (e.g., C:\Apache\maven-3.8.1)
    • Click "OK" to save.
  4. Add to Path Variable

    • In the "System variables" section, find the Path variable and click "Edit".
    • Click "New", enter %MAVEN_HOME%\bin, then click "OK" to complete the configuration.
  5. Verify Installation Open Command Prompt (CMD), type mvn -v. If the Maven version and Java environment information are output, the installation is successful. maven_version

  6. VS Code Configuration Configure the Maven extension path in VSCode to ensure it matches the local installation directory. maven configuration

Step 4: Project Startup Process

  1. Import Local Dependency Packages

    • Open Command Prompt, navigate to the lib folder under the project root directory (execute cd lib).
    • Run the following command to install the JAR package into the local Maven repository:
      bash
      mvn install:install-file -Dfile="vjsp-form-3.0-RELEASE.jar" -DpomFile="pom.xml"
      Import to local maven repository
    • In the VSCode "MAVEN" panel, expand vjsp-boot-form > Lifecycle:
      • First, execute the clean command to clean the project (Can also enter mvn clean in the terminal).
      • Then, execute the install command to build the project (Can also enter mvn install in the terminal). Execute commands
  2. Start the Project

    • Find the startup class in the project directory: /src/main/java/net/vjsp/VjspApplication.java
    • Click the "Debug" button above the file to start the project. Debug
    • After the project starts successfully, you can access http://localhost:8080/vjsp/ in your browser to view the project homepage.

Common Issues

Container "Maven Dependencies" references a non-existent library

Reference non-existent library

Solution:

Check the local repository path in the Maven configuration file settings.xml. It must be explicitly set to:

xml
<localRepository>C:\Users\CR7\.m2\repository</localRepository>

Ensure Maven dependencies are read from or downloaded to this path. settings configuration