• 大小: 36KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-03
  • 语言: Java
  • 标签: springboot  mybatis  

资源简介

springboot+mybatis 实现对mysql数据的增删改查。可以直接导入项目使用启动springboot的启动类run.java,在浏览器中输入localhost:8080回车即可

资源截图

代码片段和文件信息

package org.hsweb.demo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Configuration
@EnableAutoConfiguration
@ComponentScan(“org.hsweb.demo“)
@MapperScan(“org.hsweb.demo.dao“)
@Controller
public class Run {

    public static void main(String[] args) {
        SpringApplication.run(Run.class args

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-09-15 14:26  spring-boot-mybatis-demo-master\
     文件        1195  2018-09-15 14:23  spring-boot-mybatis-demo-master\.classpath
     文件         272  2016-11-19 06:08  spring-boot-mybatis-demo-master\.gitignore
     文件        1103  2018-09-15 14:23  spring-boot-mybatis-demo-master\.project
     目录           0  2018-09-15 14:23  spring-boot-mybatis-demo-master\.settings\
     文件         120  2018-09-15 14:23  spring-boot-mybatis-demo-master\.settings\org.eclipse.core.resources.prefs
     文件         238  2018-09-15 14:23  spring-boot-mybatis-demo-master\.settings\org.eclipse.jdt.core.prefs
     文件          86  2018-09-15 14:21  spring-boot-mybatis-demo-master\.settings\org.eclipse.m2e.core.prefs
     文件         141  2018-09-15 14:23  spring-boot-mybatis-demo-master\.settings\org.eclipse.wst.common.project.facet.core.xml
     目录           0  2018-09-15 14:26  spring-boot-mybatis-demo-master\data\
     文件       12288  2018-09-15 14:26  spring-boot-mybatis-demo-master\data\h2db.mv.db
     文件        4587  2018-09-15 14:32  spring-boot-mybatis-demo-master\pom.xml
     文件        1110  2016-11-19 06:08  spring-boot-mybatis-demo-master\README.md
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\controller\
     文件        1209  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\controller\UserController.java
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\dao\
     文件         309  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\dao\UserDao.java
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\po\
     文件         613  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\po\User.java
     文件         937  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\Run.java
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\service\
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\service\impl\
     文件        1313  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\service\impl\SimpleUserService.java
     文件         322  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\java\org\hsweb\demo\service\UserService.java
     目录           0  2016-11-19 06:08  spring-boot-mybatis-demo-master\src\main\resources\
............此处省略52个文件信息

评论

共有 条评论