摘要: Spring容器第一次启动时,初始化管理员账户 使用ApplicationListener监听器,ApplicationEvent:监听Spring容器的所有事件 ContextRefreshedEvent:容器启动事件 @Component public class InitAdminListen 阅读全文
posted @ 2022-03-18 12:13 1131012 阅读(37) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/redos/p/14945483.html 方式一 使用@Autowired或者写在Controller的处理方法中,Spring容器会帮忙注入 @Controller public class HelloController { @Autowired 阅读全文
posted @ 2022-03-18 11:52 1131012 阅读(656) 评论(0) 推荐(0)
摘要: 一、src下的.xml没有拷贝到classpath下 问题:IDEA运行maven项目,启动后调用功能,mybatis模块在查询数据时发生了异常,org.apache.ibatis.binding.BindingException,查询到是所有的mapper.xml没有编译并拷贝到calsses目录 阅读全文
posted @ 2022-02-26 10:23 1131012 阅读(116) 评论(0) 推荐(0)
摘要: 下载地址:https://az764295.vo.msecnd.net/stable/f80445acd5a3dadef24aa209168452a3d97cc326/VSCodeUserSetup-x64-1.64.2.exe 如果下载慢,将地址中的az76.net改成vscode.cdn.azu 阅读全文
posted @ 2022-02-25 23:12 1131012 阅读(54) 评论(0) 推荐(0)
摘要: 1、Assert.assertNotNull 为Null则报NullpointerException 阅读全文
posted @ 2022-02-25 23:08 1131012 阅读(31) 评论(0) 推荐(0)
摘要: Git的配置 下载地址:https://git-scm.com/, 详细安装教程参考:https://www.cnblogs.com/xueweisuoyong/p/11914045.html 安装完成后,打开Git Bash,输入 $ git config --global user.name " 阅读全文
posted @ 2022-02-21 14:53 1131012 阅读(523) 评论(0) 推荐(0)
摘要: maven是个项目管理工具,如果不告诉它代码要使用什么样的jdk版本编译,它就会用编译插件maven-compiler-plugin默认的jdk版本来处理,这样就容易出现版本不匹配的问题,以至于可能导致编译不通过的问题。例如代码中要是使用上了Java 8的新特性,比如函数式编程,但是maven在编译 阅读全文
posted @ 2021-07-01 12:38 1131012 阅读(721) 评论(0) 推荐(0)