package com.zit.springboot;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.zit.springboot.entity.User;
import com.zit.springboot.mapper.UserMapper;
@SpringBootApplication
public class Application implements CommandLineRunner {
@Autowired
private UserMapper userMapper;
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
public void run(String... args) throws Exception {
List<User> userList = userMapper.selectAll();
for (User user : userList) {
System.out.println("用户名:"+user.getName());
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
SpringBoot集成MyBatisEclipse工程代码入门案例
共31个文件
xml:6个
java:5个
class:5个
需积分: 12 8 下载量 200 浏览量
2018-11-27
21:26:44
上传
评论
收藏 22KB ZIP 举报
温馨提示
SpringBoot集成MyBatisEclipse工程代码入门案例,此工程的Maven工程,下载后导入Eclipse即可使用。
资源推荐
资源详情
资源评论
收起资源包目录
springboot-web-hello-mybatis.zip (31个子文件)
springboot-web-hello
.project 1KB
src
main
webapp
WEB-INF
jsp
hello.jsp 434B
web.xml 222B
resources
application.properties 523B
mapper
UserMapper.xml 318B
java
com
zit
springboot
AppStart.java 304B
controller
HelloSpringBoot.java 399B
mapper
UserMapper.java 259B
Application.java 845B
entity
User.java 311B
target
m2e-wtp
web-resources
META-INF
MANIFEST.MF 282B
maven
com.zit
springboot-web-hello
pom.properties 253B
pom.xml 2KB
classes
application.properties 523B
mapper
UserMapper.xml 318B
com
zit
springboot
controller
HelloSpringBoot.class 906B
mapper
UserMapper.class 324B
AppStart.class 716B
Application.class 2KB
entity
User.class 818B
test-classes
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 252B
org.eclipse.m2e.core.prefs 90B
org.eclipse.jdt.core.prefs 543B
org.eclipse.wst.validation.prefs 50B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.core.resources.prefs 183B
org.eclipse.wst.common.component 725B
.jsdtscope 639B
pom.xml 2KB
.classpath 1KB
共 31 条
- 1
资源评论
铁汉柔情li
- 粉丝: 52
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功