0915
)
1)spring中的p命名空间和c命名空间
推荐链接:https://blog.csdn.net/lianjiww/article/details/54031386
2)三种代理方式
推荐链接:https://segmentfault.com/a/1190000011291179
3)AOP理解
推荐链接:https://zhuanlan.zhihu.com/p/24565766
4)AspectJ的理解
推荐链接:https://juejin.im/entry/5a40abb16fb9a0451e400886
5)spring的@autowired为什么注入的是接口
推荐链接:https://blog.csdn.net/weixin_30839881/article/details/96735844
6)spring中DAO中继承JdbcDaoSupport与不继承的套路
推荐链接:https://blog.csdn.net/llussize/article/details/79444104
7)在servlet中获取项目路径
-
this.getServletConfig().getServletContext().getRealPath("/");
-
根目录所对应的绝对路径:request.getServletPath();
-
文件的绝对路径 request.getSession().getServletContext().getRealPath(request.getRequestURI())
-
当前web应用的绝对路径 :servletConfig.getServletContext().getRealPath("/");
-
ServletContext对象获得几种方式: Javax.servlet.http.HttpSession.getServletContext()
Javax.servlet.jsp.PageContext.getServletContext()
Javax.servlet.ServletConfig.getServletContext()
- 文件的绝对路径 :request.getSession().getServletContext().getRealPath(request.getRequestURI())
- 当前web应用的绝对路径 :servletConfig.getServletContext().getRealPath("/");
8)session的创建
获取session:
因为session是由服务器自动管理的,因此session的获取不可以直接new,而是要通过request或者servletcontext的方法获得,一般是:
HttpSession session=request.getSession();
这样就拿到session了。我们知道不同的客户端有自己的session,这个没有影响,只要通过上面的方法我们就可以获取到当前访问的request的session
9)SpringMVC中MultipartResolver 获取文件内容为空问题
原文链接:https://www.jianshu.com/p/f31fc9b90d1b
原文链接:https://blog.csdn.net/smithallenyu/article/details/80515296
10)item.getName()
游览器有些名字的获取会存在问题
/**
* Returns the original filename in the client's filesystem, as provided by
* the browser (or other client software). In most cases, this will be the
* base file name, without path information. However, some clients, such as
* the Opera browser, do include path information.
*
* @return The original filename in the client's filesystem.
* @throws InvalidFileNameException The file name contains a NUL character,
* which might be an indicator of a security attack. If you intend to
* use the file name anyways, catch the exception and use
* InvalidFileNameException#getName().
*/
String getName();
11)拦截器和过滤器的区别
过滤器是 servlet 规范中的一部分,任何 java web 工程都可以使用。
拦截器是 SpringMVC 框架自己的,只有使用了 SpringMVC 框架的工程才能用。
过滤器在 url-pattern 中配置了**/***之后,可以对所有要访问的资源拦截。
拦截器它是只会拦截访问的控制器方法,如果访问的是 jsp,html,css,image 或者 js 是不会进行拦
截的。
它也是 AOP 思想的具体应用。
我们要想自定义拦截器, 要求必须实现:HandlerInterceptor 接口
12)jdk1.8接口
在springmvc的拦截器中体现
13)mysql的数据类型double
double(16,2) 16位长度,小数点后2位
14)servlet-api
servlet.jar 是servlet 3.0 版本之前的地址
javax.servlet-api.jar 是servlet 3.0 版本之后的地址
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-jChj6x8k-1569754943235)(C:\Users\15566\AppData\Roaming\Typora\typora-user-images\1569693596818.png)]
15)日志介绍
https://my.oschina.net/pingpangkuangmo/blog/410224
16)junit5学习
推荐原文:https://blog.csdn.net/ryo1060732496/article/details/80792246