[Spring+springmvc+mybatis practice] Student Community management system

Source: Internet
Author: User

First, Introduction

The SSM framework is now the most popular MVC mainstream framework. MyBatis is responsible for interacting with the database, Springmvc is perfectly adapted to spring and is responsible for controller and view rendering. Prior to the initial study of the SSM framework, this time to borrow the school's web-based practice, and summed up some problems. The front end uses the bootstrap framework.

Ii. Introduction of the project

The Society is the comprehensive practice course of the individualized setting of the school, it is also an effective way to train students ' comprehensive quality and personal interest. In order to provide students with information on all aspects of the community, so that students understand the community dynamics, and actively participate in community activities, the system intends to develop and implement the school community enrollment course management system, including the reception of the various associations information display, registration and backstage of the Community curriculum management, the selection of students management, teacher management, Community information Management and the registration statistics of each society and other functions. Select: To distinguish between the school year or semester (i.e., by the school year or semester), statistical functions to achieve a histogram or pie chart.

Third, the database design

This time the database design is relatively simple, not using foreign keys, but redundant design.

1. Student Table (Student)

2. Course Schedule (Course)

Description: The Time field is the start semester, credit for credits, belong for the association, amount for the total number of courses, selected for the selected number of people.

3. Administrator table (Admin)

4. Selected timetable (study)

Description: S begins with the associated field in the student table, and C begins with the associated field in the curriculum

Four, the Operation effect

V. Structure of the Code

The completion of the relatively hasty, the code structure is not clear, there are many redundant or unreasonable part of the logic, welcome to propose changes.

Vi. Source Code

Https://github.com/verlen/webBigProject

Vii. problems encountered (incomplete statistics)

1. Maven compilation error Webxml attribute is required (or pre-existing web-inf/web.xml if executing in update mode)

The default webroot for MAVEN Web projects is at Src\main\webapp. If the Web. XML is not found in this directory, the above exception is thrown.
<build> <plugins> <plugin> <groupId>org.eclipse.jetty</groupId>            <artifactId>jetty-maven-plugin</artifactId> <version>9.2.8.v20150217</version>                <configuration> true</allowDuplicateFragmentNames> </webAppConfig> </configuration> &LT;/PL ugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifact                 Id>maven-war-plugin</artifactid> <version>2.1.1</version> <configuration> <webResources> <resource> <directory>${basedir }/web</directory> </resource> </webResources> </configur Ation> </plugin> </plugins></build>

2, springmvc static resources processing

<mvc:annotation-driven/><MVC:default-servlet-handler/>

The above configuration maps the/meta-inf/directory under the Web root path "/" and the Classpath to the/resources path. Suppose the Web root path has images, JS these two resources directory, under images there are bg.gif pictures, under JS test.js file, you can/resources/images/bg.gif and/resources/js/ Test.js accesses these two static resources.  Assuming that Webroot also has images/bg1.gif and js/test1.js, it can also be referenced in Web pages through/resources/images/bg1.gif and/resources/js/test1.js. 3. SPRINGMVC use Sevlet to do welcome pageAdd to Web. xml
<servlet-mapping>    <servlet-name>dispatcher</servlet-name>    <url-pattern>/index </url-pattern></servlet-mapping><servlet-mapping>    <servlet-name>dispatcher</ Servlet-name>    <url-pattern>*.mvc</url-pattern></servlet-mapping><welcome-file-list >    <welcome-file>index</welcome-file></welcome-file-list>

[Spring+springmvc+mybatis practice] Student Community management system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.