title: mybatis + spring boot 1.4.2 : MybatisAutoConfiguration$$EnhancerBySpringCGLIB Constructor threw exception NoUniqueBeanDefinitionException
body: <p>I am getting this error while trying to deploy spring boot 1.4.2 application to tomcat 7 :</p>
  
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'applicationServiceImpl': Unsatisfied dependency expressed through field 'applicationDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'applicationDao' defined in file [E:\sources\apache-tomcat-7.0.86\webapps\OnlineChannelBackend-0.0.1-SNAPSHOT\WEB-INF\classes\com\pack\dao\ApplicationDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$f214bdd7]: Constructor threw exception; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'java.lang.Object' available: expected single matching bean but found 4: &amp;applicationDao,systemEnvironment,contextParameters,contextAttributes
  </code></pre>
  
  <p>my related build gradle : </p>
  
  <pre><code>sourceCompatibility = 1.6 //java6
  targetCompatibility = 1.6
  
  dependencies {
      compile('org.springframework.boot:spring-boot-legacy:1.1.0.RELEASE')
      compile('org.springframework.boot:spring-boot-starter-web:1.4.2.RELEASE')
      compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2')
      compile('com.oracle:ojdbc6:11.1.0.7.0') //java6
      providedRuntime('org.apache.tomcat:tomcat-juli:7.0.59') // java6
      compile group: 'org.apache.tomcat', name: 'tomcat-jdbc', version: '7.0.59'
  </code></pre>
  
  <p>and In com.pack.dao I have 3 mapper interfaces annotated with <code>@Mapper</code> and corresponding xml files in corresponding folder in resources ... the application was running fine with spring boot 2 but once I started changing it to spring boot 1.4.2 I couldn't get it to work</p>