---
title: "项目中某一个package打成jar包时，然后引用时无法找到的"
author: "wangbin118"
date: "2017-08-07T18:05:43Z"
tags: []
categories: ["开源软件"]
slug: "package-jar"
draft: false
lastmod: "2017-08-07T18:04:15Z"
id: 2388589
url: "https://wangbin118.iteye.com/blog/2388589"
---

异常信息：  
Spring MVC Autowired – No qualifying bean of type \[] found for dependency: expected at least 1 bean which qualifies  
No qualifying bean of type \[...Service] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework. beans.factory.annotation.Autowired (required=true)}

说的很清楚了了，自动注入的时候，找不到对应的bean；

 

![](http://dl2.iteye.com/upload/attachment/0126/4394/af8d9c29-feaa-3c3c-8cc0-4470b5fdf427.png)

**用eclipse的export导出时，选中那个folder entries复选框。否则的话你导出的jar包没有目录结构，从而造成你的问题。**

 

**http://blog.sina.com.cn/s/blog\_7d86c66c0102xprx.html**