![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA spring
一个松
这个作者很懒,什么都没留下…
展开
-
spring transaction 注解方法报错Can not set field to proxy
应用Spring典型场景:接口+实现,初始化时自动注入。应用transaction注解方法的典型场景:接口+实现,在实现整个类上加注解或一个特定方法上加注解。运行时出现这样的错误:Caused by: java.lang.IllegalArgumentException: Can not set xxxxxx field yyyyyy to com.sun.proxy.$ProxyNN原创 2015-08-27 14:54:57 · 7048 阅读 · 0 评论 -
spring security + thymeleaf 判断登录用户的权限
spring security的UserDetailService是我自己定义的。@Componentpublic class MyUserDetailsService implements UserDetailsService { @Autowired private UserRepository userRepository; @Override原创 2017-03-01 15:26:27 · 12619 阅读 · 0 评论 -
junit4
@RunWith(MockitoJUnitRunner.class) // could be replace by MockitoAnnotations.initMocks(this)public class FooTest { final String finalField; // new object for every @Test method. String ordina原创 2018-02-05 17:30:37 · 201 阅读 · 0 评论