摘要: Spring的注解形式:@Repository、@Service、@Controller,它们分别对应存储层Bean,业务层Bean,和展示层Bean。 @Repository、@Service、@Controller 和 @Component 将类标识为Bean Spring 自 2.0 版本开始 阅读全文
posted @ 2021-12-09 10:40 zrzero 阅读(353) 评论(1) 推荐(0)
摘要: 问题描述: Test类>>@RunWith(SpringRunner.class)这个注解>>爆红 import爆红>> import org.junit.Test; import org.junit.runner.RunWith; 解决>> import爆红>>一般是pom.xml的问题 meth 阅读全文
posted @ 2021-12-09 09:09 zrzero 阅读(1521) 评论(2) 推荐(0)
摘要: 不需要修改任何东西, 在文件夹空白处,按住shift同时鼠标右击 还可以在文件资源管理器的地址栏中输入cmd,powershell,回车会自动打开相应终端,并且是当前目录。 阅读全文
posted @ 2021-12-09 08:27 zrzero 阅读(521) 评论(1) 推荐(0)
摘要: @RestController注解相当于@ResponseBody + @Controller合在一起的作用 1)如果只是使用@RestController注解Controller,则Controller中的方法无法返回jsp页面,配置的视图解析器InternalResourceViewResolv 阅读全文
posted @ 2021-12-07 08:31 zrzero 阅读(37) 评论(1) 推荐(0)
摘要: 参考链接: https://blog.csdn.net/weixin_45790068/article/details/110682320?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2% 阅读全文
posted @ 2021-12-06 14:06 zrzero 阅读(42) 评论(0) 推荐(0)
摘要: instanceof instanceof是Java的一个保留关键字,左边是对象,右边是类,返回类型是Boolean类型。它的具体作用是测试左边的对象是否是右边类或者该类的子类创建的实例对象,是,则返回true,否则返回false。 instanceof使用注意事项 先有继承关系,再有instanc 阅读全文
posted @ 2021-12-06 08:56 zrzero 阅读(2166) 评论(2) 推荐(0)