1.POJO:Plain Ordinary Java Object,简单的Java对象,实际就是普通JavaBeans,是为了避免和EJB混淆所创造的简称。有一些属性及其getter setter方法的类,没有业务逻辑。
当一个POJO可序列化,有一个无参的构造函数,使用getter和setter方法来访问属性时,他就是一个JavaBean。
2.DI—Dependency Injection,即“依赖注入”
3.execute:执行
4.config:配置
5.spring中tx:advice中的tx是Transaction的缩写,因为读音相似。
6.dispatcher调度 dispatcherServlet 前端核心控制器
7.interceptor拦截器
8.context 背景,情境
9.archetype 典型
10.exclusion 不包括在内的 ;排除
11.security 安保 保护措施
12.Profile 待解决
== 在线教育遇到的问题 ==
测试:报告异常
AbstractHandlerExceptionResolver.java:194 |org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver |Resolved exception caused by handler execution: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.guli.edu.mapper.CourseMapper.getCoursePublishVoById
问题分析:
dao层编译后只有class文件,没有mapper.xml,因为maven工程在默认情况下src/main/java目录下的所有资源文件是不发布到target目录下的,
只会加载resources的配置文件。在别处写配置文件maven并不会加载
解决方案:
1、在guli_edu的pom中配置如下节点
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
重新打包项目会发现target目录下出现了xml文件夹
2、在Spring Boot配置文件中添加配置
mybatis-plus.mapper-locations=classpath:com/online/edu/eduservice/mapper/xml/*.xml
nginx上传遇到413问题
配置nginx上传文件大小,否则上传时会有 413 (Request Entity Too Large) 异常
打开nginx主配置文件nginx.conf,找到http{},添加