资源简介

mongoDB+javaSpring实现的选课系统demo,使用了MongoTemplate工具库,实现课程、教师信息、学生信息增删改查、实现简单的选课功能。

资源截图

代码片段和文件信息

/*
 * Copyright 2012-2019 the original author or authors.
 *
 * Licensed under the Apache License Version 2.0 (the “License“);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing software
 * distributed under the License is distributed on an “AS IS“ BASIS
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;

public class MavenWrapperDownloader {

    private static final String WRAPPER_VERSION = “0.5.5“;
    /**
     * Default URL to download the maven-wrapper.jar from if no ‘downloadUrl‘ is provided.
     */
    private static final String DEFAULT_DOWNLOAD_URL = “https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/“
        + WRAPPER_VERSION + “/maven-wrapper-“ + WRAPPER_VERSION + “.jar“;

    /**
     * Path to the maven-wrapper.properties file which might contain a downloadUrl property to
     * use instead of the default one.
     */
    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
            “.mvn/wrapper/maven-wrapper.properties“;

    /**
     * Path where the maven-wrapper.jar will be saved to.
     */
    private static final String MAVEN_WRAPPER_JAR_PATH =
            “.mvn/wrapper/maven-wrapper.jar“;

    /**
     * Name of the property which should be used to override the default download url for the wrapper.
     */
    private static final String PROPERTY_NAME_WRAPPER_URL = “wrapperUrl“;

    public static void main(String args[]) {
        System.out.println(“- Downloader started“);
        File baseDirectory = new File(args[0]);
        System.out.println(“- Using base directory: “ + baseDirectory.getAbsolutePath());

        // If the maven-wrapper.properties exists read it and check if it contains a custom
        // wrapperUrl parameter.
        File mavenWrapperPropertyFile = new File(baseDirectory MAVEN_WRAPPER_PROPERTIES_PATH);
        String url = DEFAULT_DOWNLOAD_URL;
        if(mavenWrapperPropertyFile.exists()) {
            FileInputStream mavenWrapperPropertyFileInputStream = null;
            try {
                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
                Properties mavenWrapperProperties = new Properties();
                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL url);
            } catch (IOException e) {
                System.out.println(“- ERROR loading ‘“ + MAVEN_WRAPPER_PROPERTIES_PATH + “‘“);
            } finally {
                try {
                    if(mavenWrapperPropertyFileInputStream != null) {
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-11-20 11:24  nosqllab-master\
     文件         333  2019-11-20 11:24  nosqllab-master\.gitignore
     目录           0  2019-11-20 11:24  nosqllab-master\.mvn\
     目录           0  2019-11-20 11:24  nosqllab-master\.mvn\wrapper\
     文件        4939  2019-11-20 11:24  nosqllab-master\.mvn\wrapper\MavenWrapperDownloader.java
     文件       50710  2019-11-20 11:24  nosqllab-master\.mvn\wrapper\maven-wrapper.jar
     文件         218  2019-11-20 11:24  nosqllab-master\.mvn\wrapper\maven-wrapper.properties
     文件       10079  2019-11-20 11:24  nosqllab-master\mvnw
     文件        6610  2019-11-20 11:24  nosqllab-master\mvnw.cmd
     文件        4326  2019-11-20 11:24  nosqllab-master\pom.xml
     目录           0  2019-11-20 11:24  nosqllab-master\src\
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\
     文件         303  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\MainApplication.java
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\config\
     文件        2073  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\config\DruidConfiguration.java
     文件         984  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\config\MvcConfig.java
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\controller\
     文件        1519  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\controller\LabController.java
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\entity\
     文件         282  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\entity\Course.java
     文件         491  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\entity\Student.java
     文件         307  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\entity\Teacher.java
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\exception\
     文件         468  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\exception\GlobalException.java
     文件        1348  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\exception\GlobalExceptionHandler.java
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\mapper\
     文件        1512  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\mapper\LabMapper.java
     目录           0  2019-11-20 11:24  nosqllab-master\src\main\java\com\nosqllab\rabbitmq\
............此处省略31个文件信息

评论

共有 条评论