• Springboot使用步骤


    1.导入jar包

        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.0.1.RELEASE</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
            <dependency>
                <groupId>org.mybatis.spring.boot</groupId>
                <artifactId>mybatis-spring-boot-starter</artifactId>
                <version>2.1.0</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>8.0.17</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-jdbc</artifactId>
                <version>2.1.6.RELEASE</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <version>2.1.6.RELEASE</version>
                <scope>test</scope>
            </dependency>
    
        </dependencies>
        <!--这个插件,可以将应用打包成一个可执行的jar包-->
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
    

    2.分层

    配置文件:application.properties

     dao

    service

    serviceimpl

     

    控制层

  • 相关阅读:
    宾得镜头资料
    先感动自己才能感动别人
    关于单反相机中的APSC
    K10D和凤凰镜头
    Vista的新快捷键
    微软雅黑字体“演”字变“漠”字的bug
    Windows XP无线零配置服务
    剑走偏锋,用XP的启动管理来搞定Vista、XP双系统
    BCB中的目录选择对话框的实现
    MagicAjax 使用
  • 原文地址:https://www.cnblogs.com/yangHS/p/11377463.html
Copyright © 2020-2023  润新知