Bug01
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘edocEntryCtrl’: Unsatisfied dependency expressed through field ‘edocEntryService’; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named ‘edocEntryServiceImpl’ is expected to be of type ‘com.htb.service.impl.EdocEntryServiceImpl’ but was actually of type ‘com.sun.proxy.$Proxy30’
上面的大致意思是说代理出了问题,导致获取bean的时候出现了歧义,想要得到的是EdocEntryServiceImpl,但是spring容器认为它拿到的 是 ‘com.sun.proxy.$Proxy30’
解决方案:
1)找到 applicationContext.xml(本项目是ssm项目)
<!-- =开启基于注解的事务-->
<aop:config>
<!-- .. 任意参数-->
<aop:pointcut id="pointcut" expression="execution(* com.htb.service..*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="pointcut"/>
</aop:config>
在aop config下面加一个配置
<aop:aspectj-autoproxy proxy-target-class="true"/>
Bug02
利用jquery画页面元素的时候的小bug
出现在画 input textArea 的时候
//添加 input 的正确方式
let righTtitleTd=$("<td></td>").append($("<input>").val(title));
//错误的方式
//写两个写习惯了,多加了一个
let righTtitleTd=$("<td></td>").append($("<input><input>").val(title));