首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
问与答
spring aop 不能切 @Controller 或者说要做特殊的配置?一切则被 @Autowired 的 @Service 类成员变量就注入不进来
Newyorkcity
·
2020 年 2 月 2 日
· 764 次点击
这是一个创建于 2259 天前的主题,其中的信息可能已经有所发展或是发生改变。
我把切点改到 @
Service
的方法上,也一切正常,@Service 也要依靠 Spring 注入 @
Repository
的 mapper 的呀,可是没任何问题。。
然后一改回 @
Controller
的方法上,需要 Spring 注入的 @
Service
类的成员变量就 null 了,好生奇怪,咋回事儿啊?
看样子像是 spring mvc 拒绝了切 @
Controller
的编程,有什么考虑在其中么?
谢谢
目前尚无回复
spring
注入
变量
MVC
关于
·
帮助文档
·
自助推广系统
·
博客
·
API
·
FAQ
·
Solana
·
2689 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 29ms ·
UTC 15:15
·
PVG 23:15
·
LAX 08:15
·
JFK 11:15
♥ Do have faith in what you're doing.
❯