在跑spring cloud 项目时遇到个错误:
Exception in thread "main" java.lang.IllegalStateException:Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.action.NestedBasicPropertyIA -Unexpected aggregationType AS_BASIC_PROPERTY_COLLECTION
查找后发现是logback的一个bug,在1.1.8版本后解决,因此升级logback版本到1.1.8版本之后,或者使用推荐的springcloud 的版本,此时logbak的版本是1.1.11:
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath /> <!--lookup parent from repository -->
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>