OnlineSchoolShop Documentation

repository·master·Indexed 20 days ago

https://github.com/codingxin/onlineschoolshop

A Spring Boot-based e-commerce template for graduation projects and custom shop implementations. Features include product management, order processing, and admin controls. Built with SpringBoot, Swagger, Docker, JSP, and MySQL, running on JDK 1.8.

Tokens
592
Snippets
2
Records
4
Agent score
21%

What's inside OnlineSchoolShop

  1. Access the OnlineSchoolShop application

    master

    Once the application is running, you can access the different interfaces using the following URLs:

    • API Documentation (Swagger UI): http://127.0.0.1:8081/shop/swagger-ui.html
    • Admin Portal: http://127.0.0.1:8081/shop/admin/login
    • User Frontend: http://127.0.0.1:8081/shop/

    Default Credentials:

    • Admin Account: admin / 12345678
    • User Accounts: root, codingzx, or admin (all use password 12345678)
    Admin URL: http://127.0.0.1:8081/shop/admin/login
    User URL: http://127.0.0.1:8081/shop/
    Swagger UI: http://127.0.0.1:8081/shop/swagger-ui.html
  2. Configure image storage paths

    master

    The application uses a local file system for storing uploaded images. You may need to update these paths in the source code to match your environment. Search the codebase for the current path and replace it.

    Default Paths:

    • Windows: D:/upload
    • Linux: /usr/upload
    • macOS: Requires manual modification. Search for the // todo mac需要修改地址 comment in the code. You should update the WebMvcConfig class to point to a directory within your user folder (e.g., /Users/your_username/upload) to avoid permission issues.
    // Example for macOS modification in WebMvcConfig
    // Change D:/upload to a path like /Users/your_username/upload
  3. Troubleshoot image display issues

    master

    If images are not appearing in the application, it is likely because the storage directory does not exist or the virtual mapping is incorrect.

    Solutions:

    1. Create the directory: Ensure the storage path (e.g., D:/upload or /usr/upload) exists on your system.
    2. For SSM version: You must manually update the Tomcat configuration file to add a virtual mapping that links the local image directory to the web path /pictures.
    3. For Spring Boot (macOS): Modify the WebMvcConfig class to map the correct local directory and ensure the application has permission to write to that folder.