![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java框架
Dismay十二
这个作者很懒,什么都没留下…
展开
-
Spring AOP
文章目录1.JDK动态代理1.1使用1.2局限性2.CGLIB生成代理3.小结4.AspectJAOP(Aspect-OrientedProgramming,面向切面编程),采用横向抽取机制,取代了传统纵向继承体系重复性代码(性能监视,事物管理,安全检测,缓存)Spring AOP使用纯java实现,不需要专门的编译过程和类加载器,在运行期通过代理方式向目标类织入增强代码。1.JDK动态代理1.1使用可参考链接:http://c.biancheng.net/view/4269.html1.原创 2020-07-06 10:35:32 · 167 阅读 · 0 评论 -
Spring容器中Bean的生命周期,实际代码角度(非源码)
初始代码情况:配置文件:类文件:第一步:bean对象实例化。即执行Man中的Man方法进行初始化。第二步:封装属性。配置文件:第三步:如果Bean实现BeanNameAware则执行setBeanName()方法重写里面的setBeanName并执行。第四步,第五步与第三步相同,实现接口,执行方法。第六步:如果存在类实现BeanPostProcessor,即该Bean关联了BeanPostProcessor。注意:1.不是man Bean实现了BeanPostProcess.原创 2020-07-04 17:34:48 · 144 阅读 · 0 评论 -
SpringMVC实现文件下载的两种方式
本文转载自Asher1----CSDN原文链接1.常规方法@RequestMapping("/download") public String download( String fileName ,String filePath, HttpServletRequest request, HttpServletResponse response){ response.setCo...转载 2019-09-26 11:02:48 · 854 阅读 · 0 评论 -
mvc读取、写入yaml文件详细讲解
一.读取YAML文件引言核心就是导包,然后读取是直接使用 yaml 对象中的load方法,会返回一个map对象的.然后遍历这个map得到自己想要的数据就可以了。然后是写入,直接调用yaml对象的一个dump方法,他是可以把一个map写入为yaml格式文件的。写入需要注意的地方是,要先把文件中的内容读取出来,然后添加 或 修改 map中的内容,然后把修改后的map在写入到文件.。【2】如果不读...原创 2019-09-07 15:21:38 · 1413 阅读 · 0 评论 -
SpringMVC获取页面表单参数的几种方式,setAttribute,addAttribute,modelAttribute,path
学习链接转自励志的狼—博客园。mvc获取页面表单参数的几种方式原创 2019-09-07 12:18:22 · 2785 阅读 · 0 评论 -
mvc获取前端传递的参数为NULL The server cannot or will not process the request
错误信息The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive re网上查阅到的可...原创 2019-09-07 12:13:44 · 214 阅读 · 0 评论 -
The origin server did not find a current representation for the target resource or is not willing to
我这里这个问题很简单。原创 2019-09-04 15:20:26 · 105 阅读 · 0 评论 -
mapper.xml映射文件位置,出现找不到这个文件
<bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="typeAliasesPackage" value=...原创 2019-09-04 15:05:03 · 798 阅读 · 0 评论 -
IDEA更改jdk版本,`Error:java: 无效的源发行版: 10错误`
今天编译java程序时出现Error:java: 无效的源发行版: 10错误解决方案使用Ctrl+Alt+Shift+s打开Project Structure查看Project Language Level,发现是10下图中标红位置全部改到想要版本。还有java complier也要更改。作者:dadeity来源:CSDN原文:https://blog.csdn.net/gi...转载 2019-07-14 20:58:12 · 578 阅读 · 0 评论 -
Spring注入中byType和byName
Spring注入中byType和byName1.首先,区分清楚什么是byType,什么是byName。<bean id="userServiceImpl" class="cn.com.bochy.service.impl.UserServiceImpl" autowire="byName"> </bean> ...原创 2019-04-19 09:54:12 · 1017 阅读 · 0 评论 -
idea导入外部项目后重新导入依赖问题
1.在idea首页 File–>setting–>build,execution,deployment–>buildTool–>maven–>work offine勾选,apply,ok2.点击右侧Maven Project–>lifecycle–>install,下载jar包;没有的话自己先点+号添加pom文件。3.FIle–>setting...原创 2019-05-13 15:45:37 · 6669 阅读 · 1 评论