Student Comprehensive Evaluation System Based on SSM Framework and JSP

System Architecture Overview

The student comprehensive evaluation system employs a traditional Java EE architecture combining Spring, Spring MVC, and MyBatis (SSM) with JSP for the presentation layer. This section details the core implementation components and configuration.

Backend Configuration

The application leverages MyBatis-Plus for data access layer abstraction. Below is the complete application configuration:

server:
    tomcat:
        uri-encoding: UTF-8
    port: 8080
    servlet:
        context-path: /springbootoiz2b

spring:
    datasource:
        driverClassName: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://127.0.0.1:3306/springbootoiz2b?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
        username: root
        password: 123456
    servlet:
      multipart:
        max-file-size: 300MB
        max-request-size: 300MB
    resources:
      static-locations: classpath:static/,file:static/

mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  type-aliases-package: com.entity
  global-config:
    id-type: 1
    field-strategy: 1
    db-column-underline: true
    refresh-mapper: true
    logic-delete-value: -1
    logic-not-delete-value: 0
    sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
    call-setters-on-nulls: true
    jdbc-type-for-null: 'null'

Configuration Highlights

The MyBatis-Plus configuration enables automatic驼峰命名转换 (camelCase mapping), which eliminates the need for manual result mapping between database columns and entity properties. The logical deletion strategy uses -1 for deleted records and 0 for active records, providing a soft delete mechanism that preserves data integrity.

Data Access Layer Implemantation

The mapper interface uses MyBatis-Plus annotation-based query methods alongside custom XML-defined queries for complex operations:

<?xml version="1.0" encoding="UTF-8"?>
<mapper namespace="com.dao.StudentDao">
    <resultMap type="com.entity.StudentEntity" id="studentMap">
        <result property="studentNumber" column="student_number"/>
        <result property="password" column="password"/>
        <result property="studentName" column="student_name"/>
        <result property="gender" column="gender"/>
        <result property="grade" column="grade"/>
        <result property="major" column="major"/>
        <result property="enrollmentDate" column="enrollment_date"/>
        <result property="contactPhone" column="contact_phone"/>
        <result property="email" column="email"/>
        <result property="idCard" column="id_card"/>
    </resultMap>

    <select id="selectListVO" resultType="com.entity.vo.StudentVO">
        SELECT * FROM student WHERE 1=1 ${ew.sqlSegment}
    </select>
    
    <select id="selectVO" resultType="com.entity.vo.StudentVO">
        SELECT student.* FROM student WHERE 1=1 ${ew.sqlSegment}
    </select>

    <select id="selectListView" resultType="com.entity.view.StudentView">
        SELECT student.* FROM student WHERE 1=1 ${ew.sqlSegment}
    </select>
    
    <select id="selectView" resultType="com.entity.view.StudentView">
        SELECT * FROM student WHERE 1=1 ${ew.sqlSegment}
    </select>
</mapper>

Query Layer Design

The mapper defines three distinct result types:

  • VO (View Object): Optimized for API responses, containing only necessary fields
  • Entity: Full domain model with all database columns mapped
  • View: Composite queries potentially joining multiple tables for dashboard display

The dynamic SQL segment ${ew.sqlSegment} integrates with MyBatis-Plus's QueryWrapper for building flexible WHERE conditions without writing explicit SQL for each query scenario.

Database Schema Design

The system typically includes tables for student information, evaluation criteria, evaluation records, and administrative users. Foreign key relationships ensure referential integrity between evaluation submissions and student profiles.

Evaluation Record Structure

CREATE TABLE evaluation_record (
    id BIGINT PRIMARY KEY AUTO_INCREMENT,
    student_id BIGINT NOT NULL,
    evaluator_id BIGINT,
    evaluation_category VARCHAR(50),
    score DECIMAL(5,2),
    evaluation_date DATE,
    comments TEXT,
    is_deleted TINYINT DEFAULT 0,
    create_time DATETIME,
    update_time DATETIME,
    FOREIGN KEY (student_id) REFERENCES student(id)
);

System Flow

  1. User authenticates through the JSP-based login interface
  2. Spring MVC controller processes the request and validates input
  3. Service layer executes business logic and transaction management
  4. MyBatis-Plus handles CRUD operations with automatic SQL generation
  5. Results are rendered back through JSP templates

The architecture separates concerns effectively: JSP handles presentation, Spring MVC manages web-layer logic, Spring provides dependency injection and transaction management, and MyBatis-Plus simplifies data access with minimal configuration.

Build and Deployment

The project compiles to a standard WAR file deployable to any Servlet 3.0+ compatible container such as Apache Tomcat. MySQL 5.7+ or MySQL 8.0+ serves as the persistent data store, with connection pooling managed through HikariCP (the default datasource provider in Spring Boot).

Tags: SSM JSP mybatis-plus MySQL Java EE

Posted on Sat, 29 Aug 2026 16:35:34 +0000 by xhitandrun