Method main should have no parameters
Posted 奔跑的布吉
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Method main should have no parameters相关的知识,希望对你有一定的参考价值。
代码 main 中不需要添加@Test
public class MyTest {
public static void main(String[] args) {
// 1.获取SqlSession
SqlSession sqlSession = MyBatisUtils.getSqlSession();
// UserMapper mapper = sqlSession.getMapper(UserMapper.class);
// List<User> userList = mapper.getUserList();
// 2.方式一:getMapper
UserMapper mapper = sqlSession.getMapper(UserMapper.class);
List<User> userList = mapper.getUserList();
for (User user : userList) {
System.out.println(user);
}
}
以上是关于Method main should have no parameters的主要内容,如果未能解决你的问题,请参考以下文章
Stream A method annotated with @StreamListener having a return type should also have an outbound tar
“page.should_not have_content”和“page.should have_no_content”之间的区别
Jmeter执行java脚本结束时提示:The JVM should have exited but did not.
E/MediaPlayer: Should have subtitle controller already set