问题描述:
sprint tool suite开发工具,在springboot的启动类中,如果在class上指定了@Controller注解,在类中的方法上无法使用自动代码提示提示其他注解,这带来非常大的不方便。如果改成RestController就不会出现这个问题。
解决办法:
在sts的设置里去掉“spring Annotation Proposals”问题可以得到解决。
如下图所示,把两个红框中的复选框的勾去掉。

sts中class类上有@Controller上注解,方法上无代码提示的解决办法
最新推荐文章于 2021-03-05 04:31:34 发布
本文介绍在SpringBoot项目中,使用sprinttoolsuite时遇到的问题:当在启动类上使用@Controller注解时,类中方法上的注解无法获得代码提示。文章提供了简单有效的解决方案,只需在STS设置中关闭'springAnnotationProposals'即可。
576

被折叠的 条评论
为什么被折叠?



