GradleCN / GradleSide

Gradle 示例大全
MIT License
209 stars 61 forks source link

ERROR [org.springframework.boot.SpringApplication] SpringApplication.java:821 - Application run failed #23

Open kenvinsuxun opened 4 years ago

kenvinsuxun commented 4 years ago

2019-12-20 10:03:25,922 [main] INFO [org.fisco.bcos.Application] StartupInfoLogger.java:50 - Starting Application on macdeMacBook-Pro-2.local with PID 938 (/usr/local/var/www/Java_project/spring-boot-starter/out/production/classes started by kevinsu in /usr/local/var/www/Java_project/spring-boot-starter) 2019-12-20 10:03:25,956 [main] INFO [org.fisco.bcos.Application] SpringApplication.java:646 - No active profile set, falling back to default profiles: default 2019-12-20 10:03:26,275 [main] ERROR [org.springframework.boot.SpringApplication] SpringApplication.java:821 - Application run failed org.springframework.core.annotation.AnnotationConfigurationException: Attribute 'proxyBeanMethods' in annotation [org.springframework.boot.autoconfigure.SpringBootApplication] is declared as an @AliasFor nonexistent attribute 'proxyBeanMethods' in annotation [org.springframework.context.annotation.Configuration].; nested exception is java.lang.NoSuchMethodException: org.springframework.context.annotation.Configuration.proxyBeanMethods() at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.(AnnotationUtils.java:2187) at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.from(AnnotationUtils.java:2155) at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.getOtherDescriptors(AnnotationUtils.java:2319) at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.getAttributeAliasNames(AnnotationUtils.java:2306) at org.springframework.core.annotation.AnnotationUtils.getAttributeAliasNames(AnnotationUtils.java:1820) at org.springframework.core.annotation.AnnotationUtils.getAttributeAliasMap(AnnotationUtils.java:1729) at org.springframework.core.annotation.AnnotationUtils.postProcessAnnotationAttributes(AnnotationUtils.java:1345) at org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(AnnotatedElementUtils.java:365) at org.springframework.core.type.StandardAnnotationMetadata.getAnnotationAttributes(StandardAnnotationMetadata.java:121) at org.springframework.context.annotation.AnnotationConfigUtils.attributesFor(AnnotationConfigUtils.java:285) at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:93) at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:72) at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.doRegisterBean(AnnotatedBeanDefinitionReader.java:224) at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:145) at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register(AnnotatedBeanDefinitionReader.java:135) at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:156) at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:135) at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:127) at org.springframework.boot.SpringApplication.load(SpringApplication.java:686) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:384) at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202) at org.fisco.bcos.Application.main(Application.java:15) Caused by: java.lang.NoSuchMethodException: org.springframework.context.annotation.Configuration.proxyBeanMethods() at java.lang.Class.getDeclaredMethod(Class.java:2130) at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.(AnnotationUtils.java:2180) ... 23 common frames omitted

kenvinsuxun commented 4 years ago

plugins { id 'org.springframework.boot' version '2.1.6.RELEASE' id 'java' id 'com.github.sherter.google-java-format' version '0.8' id "io.freefair.lombok" version "3.8.0" }

apply plugin: 'io.spring.dependency-management' apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'groovy' description = 'spring-boot-starter'

group = 'com.webank.blockchain' version = '0.0.1-SNAPSHOT' sourceCompatibility = 1.8 targetCompatibility = 1.8

googleJavaFormat { options style: 'AOSP' source = sourceSets*.allJava include '/*.java' exclude '*/temp/.java' exclude '/solidity/*.java' }

verifyGoogleJavaFormat { source = sourceSets*.allJava include '/*.java' exclude '*/temp/.java' exclude '/solidity/*.java' }

check.dependsOn.remove(test) check.dependsOn.remove(verifyGoogleJavaFormat)

repositories { maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } maven { url "https://dl.bintray.com/ethereum/maven/" } maven { url "https://oss.sonatype.org/content/repositories/snapshots" } maven { url "http://repo.spring.io/libs-snapshot" } mavenCentral() }

dependencies { compile 'org.springframework.boot:spring-boot-starter-logging' compile 'org.codehaus.groovy:groovy-all:2.5.6' implementation 'org.springframework.boot:spring-boot-starter-actuator' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' testImplementation 'org.springframework.boot:spring-boot-starter-test' testCompile group: 'junit', name: 'junit', version: '4.12'

compile 'org.fisco-bcos:web3sdk:2.1.0'
compile 'org.projectlombok:lombok:1.18.6'

//引入spring依赖
testCompile group: 'org.springframework', name: 'spring-test', version: '5.1.8.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version: '5.1.8.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.2.2.RELEASE'
compile group: 'org.springframework.security', name: 'spring-security-core', version: '5.1.8.RELEASE'
//compile group: 'org.springframework.boot', name: 'spring-boot', version: '2.1.6.RELEASE'
//引入spring-web依赖
compile group: 'org.springframework', name: 'spring-web', version: '5.1.8.RELEASE'
//引入spring-webmvc依赖
compile group: 'org.springframework', name: 'spring-webmvc', version: '5.1.8.RELEASE'
compile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0'
compile 'org.apache.poi:poi:RELEASE'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile 'org.springframework.boot:spring-boot-starter-security'
compile 'org.springframework.boot:spring-boot-starter-thymeleaf'
compile 'org.springframework.boot:spring-boot-starter-tomcat'

//redis缓存
compile group: 'redis.clients', name: 'jedis', version: '2.9.0'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-redis', version: '1.3.5.RELEASE'
compile group: 'org.springframework.data', name: 'spring-data-redis', version: '1.7.2.RELEASE'
//jwt
compile 'io.jsonwebtoken:jjwt:0.7.0'
//GSON
compile 'com.google.code.gson:gson:2.8.2'
//mybatis
compile group: 'com.gitee.sunchenbin.mybatis.actable', name: 'mybatis-enhance-actable', version: '1.0.4'
compile group: 'tk.mybatis', name: 'mapper-spring-boot-starter', version: '2.1.5'
//web3j
compile 'org.web3j:core:3.6.0'
//pagehelper
compile group: 'com.github.pagehelper', name: 'pagehelper-spring-boot-starter', version: '1.2.13'
//org.json
compile 'org.json:json:20141113'
//cn.jpush
compile group: 'cn.jpush.api', name: 'jpush-client', version: '3.2.3'
//JSCH
compile group: 'dev.galasa', name: 'com.jcraft.jsch', version: '0.1.55'
//添加Spring Data Elasticsearch依赖
compile 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
//ftp
compile 'commons-net:commons-net:3.6'
//hutool
compile group: 'cn.hutool', name: 'hutool-all', version: '5.0.7'
//poi
compile group: 'org.apache.poi', name: 'poi', version: '4.1.1'
compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: '2.2.2.RELEASE'
compile group: 'io.github.qyvlik', name: 'io.eblock.eos-eos4j', version: '1.0.1'

}

configurations { all { exclude group: 'org.slf4j', module: 'slf4j-log4j12' } compileOnly { extendsFrom annotationProcessor } }

test { systemProperty "jdk.tls.namedGroups", "secp256k1" }

mysterin commented 4 years ago

proxyBeanMethods 这个方法是 spring 5.2 版本新加的,你的是 5.1.8 的