基于Spring Annotation的控制器在jar文件中不起作用 [英] Spring Annotation-based controllers not working if it is inside jar file

查看:90
本文介绍了基于Spring Annotation的控制器在jar文件中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在子模块中有一些基于注释的控制器。这些模块被部署为jar文件。



来自jar文件的基于注释的控制器没有被加载到弹簧配置。



我使用eclipse中的导出工具手动导出jar文件。



有没有人面临这个问题?

解决方案

使用eclipse中的export实用程序导出jar文件时,会出现一个名为Add directory entries的选项。检查此选项并导出jar文件,这将解决问题。


I've some annotation-based controller inside a sub module. These modules are deployed as jar files.

The annotation-based controllers from the jar file is not getting loaded to the spring configuration.

I'm manually exporting the jar file using the export utility in eclipse.

Did any one faced this problem?

解决方案

When you export the jar file using the export utility in eclipse there is a option called Add directory entries. Check this option and export the jar file, this will solve the problem.

这篇关于基于Spring Annotation的控制器在jar文件中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆