exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make su re that file is correct.

spring cloud 项目使用maven 打包报错“No auto configuration classes found in META-INF/spring.factories”

在pom.xml中加入以下配置

  <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <fork>true</fork>
                            <mainClass>com.lv.DiscoveryApplicaion</mainClass>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

原文地址:https://www.cnblogs.com/lvlv/p/9114494.html

时间: 2024-08-30 11:40:40

exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make su re that file is correct.的相关文章

解决nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList问题

一.背景 最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回List<对象>的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList错误,就细细

spring3.2.0与mybatis3.2.7整合出错--Failed to read candidate component class--nested exception is java.lang.IllegalArgumentException

错误信息如下: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\myworkspace\javaweb\20160530-spring_mybatis\bin\com\dzq\ssm\mapper\UserMapper.class]; nested exception is java.lang.IllegalArgu

异常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException

这个异常是出现在注入配置文件中配置好的属性时报错的: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'my.name' in value "${my.name}" 此时配置文件默认的名称为:application.properties 解决方法: 将配置文件名改为:appli

HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute.

1 HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute. 2 type Exception report 3 4 message Request processing failed; nested exception is java.lang.Illega

【错误解决】BeanDefinitionStoreException: Failed to read candidate component class: file [mapper.class文件]; nested exception is java.lang.IllegalArgumentException

问题描述: "spring-mybatis整合,使用mapper代理开发,通过MapperScannerConfigurer进行mapper扫描"的练习中,出现异常: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [E:\项目\mybatis_spring\bin\cn\itheima\ssm\mapper\Us

jpa语句报 org.springframework.dao.InvalidDataAccessApiUsageException: Parameter with that position [2] did not exist; nested exception is java.lang.IllegalArgumentException: Parameter with that position

@Query("SELECT area from Area AS area WHERE area.state=0 AND area.name like %?1% ")Area findByIsCityAndNameLike(int iscity,String name); 第一反应: 将 AND area.name like %?1% 后的 1要改成2 但是依然报错仔细反应了 @Query("SELECT area from Area AS area WHERE area.s

java.lang.IllegalArgumentException: &#39;sessionFactory&#39; or &#39;hibernateTemplate&#39; is required

java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.facto

出现java.lang.IllegalArgumentException异常

严重: Servlet.service() for servlet [office] in context with path [/office] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: class com.office.Entity.BusinessBuildManager declares multiple JSON fields n

java.lang.IllegalArgumentException: clusterListener can not be null

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: clusterListener can not be null at org.s