Spring框架
miao2385951
这个作者很懒,什么都没留下…
展开
-
AOP异常"error at ::0 formal unbound in pointcut"
在学习Spring的AOP的注解和xml配置使用方式的时候,遇到异常:配置的切面类:可以发现前置增强和后置增强都是没有参数的,代码编译没有问题;环绕增强必须要加一个参数(ProceedingJoinPoint),才可以执行目标方法,否侧只会执行本例中的"环绕前执行"和"环绕后执行".(题外话)造成本例中异常的原因在异常增强部分,异常增强的方法是带有参数的(Excepti原创 2018-01-10 18:02:23 · 10162 阅读 · 0 评论 -
There is no getter for property named 'ItemsCustomer' in 'class cn.itcast.ssm.pojo.ItemsCustomerVo'
mybatis动态sql查询的时候报错!There is no getter for property named 'ItemsCustomer' in 'class cn.itcast.ssm.pojo.ItemsCustomerVo',mapper是这样的:前台属性值:初学mybatis,其实也是对mapper中的内容理解不深才会犯这种低级错误.动态sql查询的时候,无论是if语句中的属性还是...原创 2018-03-15 16:44:01 · 768 阅读 · 0 评论 -
一个实用的注解,用来加载properties文件中的值到controller中 @Value
properties中的值:controller中取出的操作:这个注解是在这个包下,.开发中我们难免会在后台代码写死数据,虽然代码跑起来没有,但是如果以后需要修改这个值,找起来那是相当麻烦了,所以就可以把这个变量存储到propertie文件中,然后在spring配置文件中配置加载外部peoperties文件:在xml中取出值的格式:"${变量名}"在class中取出的格式:@Value("${变量...原创 2018-03-16 20:07:25 · 2609 阅读 · 0 评论