springboot main方法启动报错

Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.springframework.core.convert.support.DefaultConversionService.addCollectionConverters(Lorg/springframework/core/convert/converter/ConverterRegistry;)V from class org.springframework.boot.bind.RelaxedConversionService
at org.springframework.boot.bind.RelaxedConversionService.(RelaxedConversionService.java:52)
at org.springframework.boot.bind.RelaxedDataBinder.modifyProperties(RelaxedDataBinder.java:148)
at org.springframework.boot.bind.RelaxedDataBinder.doBind(RelaxedDataBinder.java:128)
at org.springframework.validation.DataBinder.bind(DataBinder.java:631)
at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:269)
at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:241)
at org.springframework.boot.context.config.ConfigFileApplicationListener.bindToSpringApplication(ConfigFileApplicationListener.java:230)
at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:181)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:166)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:152)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:111)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:65)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:305)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1124)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1113)
at com.demo.Application.main(Application.java:21)
图片说明

图片说明

1个回答

http://start.spring.io/初始化一个Spring Boot再运行试试,

或者看我刚初始化的项目:

pom.xml

 <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>demo</name>
    <description>Demo project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>


</project>

java:

 package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
SpringBoot启动报错
SpringBoot启动报错 “C:\Program Files\Java\jdk1.8.0_162\bin\java.exe” -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.por...
springboot启动报错
首先贴出报错信息: 然后我在网上百度了一大堆问题,说是Controller包必须在Application包里才能被扫描到,说我的Controller包和启动类处于平行位置 ,导致Controller包没有被启动类扫描到,但是我检查发现我的启动类和controller并不是处在同一层级上,后来看到底部报错信息说我没有加入数据库驱动,才知道原来springboot在启动时会自动注入数据源和配置jpa...
springboot 启动报错
利用课余时间自学springboot的时候,启动的时候就遇到了问题,各种网上类似问题都搜遍了,也都试了一遍,都不行,结果在启动类上加上一行@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})就可以了说是有maven依赖包冲突,有重复的依赖。搭建springboot项目,两次都是这样解决的,记录下!!!!...
Springboot启动报错
SpringBoot启动的时候报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) 开始的时候有点纳闷为什么会报这个异常,其实我已经配置了的,后来发现...
Spring boot 启动报错 Failed to auto-configure a DataSource
在使用spring boot做项目时出现错误:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2018-04-15 22:49:12.724 ERROR 15472 --- [           main] o.s.b....
springboot 启动报错
启动异常 *************************** APPLICATION FAILED TO START ***************************   Description:   Failed to configure a DataSource: no embedded datasource could be configured.   Reaso...
springboot项目启动报错
报错:新建的springboot项目,单击启动类报如下错误 原因: 这是因为添加了数据库组件,所以autoconfig会去读取数据源配置,而新建的项目还没有配置数据源,所以会导致异常出现。 解决办法: 第一种:去掉数据库依赖 第二种:在启动类上添加注解排除此依赖 在启动类的@SpringBootApplication中添加exclude= {DataSourceAutoCon...
springboot项目第一次启动报错
最近,看了一下spring-boot,做了一个demo的工程,启动时居然报错,报错信息:Unregistering JMX-exposed beans on shutdown。 原来是新版本的spring-boot工程在建立的时,改变了依赖的jar包: 原来的依赖 org.springframework.boot spring-boot-starter-web
springboot 测试启动报错:
错误类型:springboot测试启动的时候报错,说的就是缺少这两个注解,但是我的测试类明明就有这个@springBootTest这个注解 解决办法:  先建一个包,在在测试类上面添加   问题已经解决...
springboot 启动报错端口占用
Description: The Tomcat connector configured to listen on port 8012 failed to start. The port may already be in use or the connector may be misconfigured. Action:   Verify the connector's configurati...
springBoot整合activiti5.22启动报错
[code=java]rn2017-10-23 11:45:52,597 [restartedMain] DEBUG org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - Application failed to start due to an exceptionrnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1486) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]rnrnDescription:rnrnParameter 1 of method springProcessEngineConfiguration in org.activiti.spring.boot.JpaProcessEngineAutoConfiguration$JpaConfiguration required a bean of type 'javax.persistence.EntityManagerFactory' that could not be found.rnrnrnAction:rnrnConsider defining a bean of type 'javax.persistence.EntityManagerFactory' in your configuration.rn[/code]rnrnrnpom如下rn[code=text]rnrnrn 4.0.0rnrn com.hzysrn hzysrn 0.0.1-SNAPSHOTrn jarrnrn hzysrn Demo project for Spring Bootrnrn rn org.springframework.bootrn spring-boot-starter-parentrn 1.5.3.RELEASErn rn rnrn rn UTF-8rn UTF-8rn 1.8rn 1.3.2rn 5.22.0rn rnrn rn rn org.springframework.bootrn spring-boot-starter-webrn rn rn org.springframework.bootrn spring-boot-starter-aoprn rn rn org.springframework.bootrn spring-boot-starterrn rn rn rn org.springframework.bootrn spring-boot-starter-loggingrn rn rn rn rn rn org.springframework.bootrn spring-boot-starter-log4j2rn rn rnrn rn org.mybatis.spring.bootrn mybatis-spring-boot-starterrn 1.3.0rn rnrn rn com.oraclern ojdbc14rn 10.2.0.4.0rn rn rn rn mysqlrn mysql-connector-javarn 6.0.6rn rn rn rn com.alibabarn druidrn 1.1.1rn rnrn rn org.springframework.bootrn spring-boot-starter-testrn testrn rn rn com.alibabarn fastjsonrn 1.2.33rn rn rn org.apache.commonsrn commons-lang3rn 3.6rn rn rn commons-iorn commons-iorn 2.5rn rn rn commons-fileuploadrn commons-fileuploadrn 1.3.3rn rn rn net.sf.dozerrn dozerrn 5.5.1rn rnrn rn rn org.apache.shirorn shiro-corern $shiro.versionrn rn rn org.apache.shirorn shiro-webrn $shiro.versionrn rn rn org.apache.shirorn shiro-ehcachern $shiro.versionrn rn rn org.apache.shirorn shiro-springrn $shiro.versionrn rn rnrn rn javax.persistencern persistence-apirn 1.0.2rn rnrnrn rn io.springfoxrn springfox-swagger2rn 2.2.2rn rn rn io.springfoxrn springfox-swagger-uirn 2.2.2rn rnrn rn rn org.springframework.bootrn spring-boot-starter-thymeleafrn rn rn org.activitirn activiti-spring-boot-starter-basicrn $activiti.versionrn rn rn org.activitirn activiti-spring-boot-starter-actuatorrn $activiti.versionrn rn rn org.activitirn activiti-restrn $activiti.versionrn rnrn rn org.apache.xmlgraphicsrn batik-codecrn 1.7rn rn rn org.apache.xmlgraphicsrn batik-cssrn 1.7rn rn rn org.apache.xmlgraphicsrn batik-svg-domrn 1.7rn rn rn org.apache.xmlgraphicsrn batik-svggenrn 1.7rn rn rn org.activitirn activiti-explorerrn $activiti.versionrn rn rn org.activitirn activiti-diagram-restrn $activiti.versionrn rn rn org.activitirn activiti-simple-workflowrn $activiti.versionrn rn rn org.activitirn activiti-springrn $activiti.versionrn rn rnrn[/code]
Springboot集成ES启动报错
报错内容 None of the configured nodes are available elasticsearch.yml配置 cluster.name: fans node.name: node-72 node.master: true node.data: true network.host: 112.122.245.212 http.port: 39200 transp...
Springboot启动报错问题
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-09-27 17:45:07.350 |-ERROR [restartedMain] org.springframework.boot.diagnostics...
springboot tomcat单独启动报错
29-Apr-2019 19:55:20.493 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.40 29-Apr-2019 19:55:20.497 淇℃伅 [main] org.apache.catalina.startup.Ve...
springboot整合mybatis 启动报错
[code=text]rnjava.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation.MapperScan.factoryBean()rn at java.lang.reflect.Method.getDefaultValue(Method.java:612) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationType.(AnnotationType.java:132) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:85) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:266) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_131]rn at java.lang.Class.createAnnotationData(Class.java:3521) ~[na:1.8.0_131]rn at java.lang.Class.annotationData(Class.java:3510) ~[na:1.8.0_131]rn at java.lang.Class.getAnnotations(Class.java:3446) ~[na:1.8.0_131]rn at org.springframework.core.type.StandardAnnotationMetadata.(StandardAnnotationMetadata.java:70) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition.(AnnotatedGenericBeanDefinition.java:58) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.doRegisterBean(AnnotatedBeanDefinitionReader.java:216) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:145) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register(AnnotatedBeanDefinitionReader.java:135) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:158) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:135) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:127) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.load(SpringApplication.java:704) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:393) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:328) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at com.example.TestDemoApplication.main(TestDemoApplication.java:12) [classes/:na]rn[/code]rnspringboot版本 2.0.4.RELEASE mybatis版本 3.4.6 mybatis-spring版本 1.3.2
Springboot 项目启动报错
新建Springboot后,启动报错   java.lang.IllegalArgumentException: Not a managed type: class com.example.demo.myproject.domain.Entity.User 报错信息如下 Caused by: java.lang.IllegalArgumentException: Not a managed...
springBoot启动报错log4j冲突
  先上一段报错内容 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/D:/soft/apache-tomcat-8.5.31/webapps/ui/WEB-INF/lib/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticL...
springboot(一)启动报错
Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Dec 14 11:26:45 CST 2019 There was an unexpected error (type=Not Found, status=404)...
springboot 项目首次启动报错
rnError starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.rn[16:20:12.783] ERROR org.springframework.boot.SpringApplication 858 reportFailure - Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource [org/springframework/boot/autoconfigure/session/RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1762) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]rn at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]rn at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]rn at com.chn.frameweb.FrameWebApplication.main(FrameWebApplication.java:33) [classes/:?]rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]rn at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]rn at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.3.RELEASE.jar:2.1.3.RELEASE]rnCaused by: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1092) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1065) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:865) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:340) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet(RedisHttpSessionConfiguration.java:302) ~[spring-session-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1821) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1758) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn ... 21 morernCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379rn at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78) ~[lettuce-core-5.1.4.RELEASE.jar:?]rn at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56) ~[lettuce-core-5.1.4.RELEASE.jar:?]rn at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:234) ~[lettuce-core-5.1.4.RELEASE.jar:?]rn at io.lettuce.core.RedisClient.connect(RedisClient.java:204) ~[lettuce-core-5.1.4.RELEASE.jar:?]rn at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:113) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at java.util.Optional.orElseGet(Optional.java:267) ~[?:1.8.0_77]rn at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:113) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1085) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1065) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:865) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:340) ~[spring-data-redis-2.1.5.RELEASE.jar:2.1.5.RELEASE]rn at org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet(RedisHttpSessionConfiguration.java:302) ~[spring-session-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1821) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1758) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]rn ... 21 morernCaused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost/127.0.0.1:6379rn at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_77]rn at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:1.8.0_77]rn at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:665) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) ~[netty-common-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.33.Final.jar:4.1.33.Final]rn at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_77]rnCaused by: java.net.ConnectException: Connection refused: no further informationrn at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_77]rn at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:1.8.0_77]rn at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[netty-transport-4.1.33.Final.jar:4.1.33.Final]rn at io.netty.channel.nio.NioEventLoop.processSelect
新建springboot项目启动报错
新建springboot项目启动报错如下 Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. 2018-09-13 15:43:37.061 ERROR 3056 — [ main] o.s.b.d....
SpringBoot工程启动报错
SpringBoot启动报错 &quot;D:\Program Files\Java\jdk1.8.0_152\bin\java.exe&quot; -ea -Didea.test.cyclic.buffer.size=1048576 &quot;-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2\lib\idea_...
SpringBoot源码解析之main方法推断
在《SpringBoot源码解析之应用类型识别》一文中我们已经了解了SpringBoot是如何推断出应用类型的。在推断出应用类型之后,SpringBoot又进行了main方法的推断。 在进行main方法的推断时,主要使用了堆栈信息一层层的判断,来获得main方法。具体源代码如下: private Class&lt;?&gt; deduceMainApplicationClass() { try ...
sts搭建springboot项目,springBoot启动报错
1.If you want an embedded database please put a supported one on the classpath. 2.springCloud com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect ...
SpringBoot使用JdbcTemplate 项目启动报错:
报错详情:rnrnError starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.rn2019-03-13 15:31:51.932 ERROR 31060 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : rnrn***************************rnAPPLICATION FAILED TO STARTrn***************************rnrnDescription:rnrnField jdbcTemplate in com.lmy.demo.service.UserService required a bean of type 'org.springframework.jdbc.core.JdbcTemplate' that could not be found.rnrnThe injection point has the following annotations:rn - @org.springframework.beans.factory.annotation.Autowired(required=true)rnrnrnAction:rnrnConsider defining a bean of type 'org.springframework.jdbc.core.JdbcTemplate' in your configuration.
springboot整合没有batis启动报错!
我用springboot整合mybatis启动时报错,数据库用的是mysql!rn这是我的yml配置文件:rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549001_22080.png)rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549042_774378.png)rnrn启动时报的错误:rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549097_455256.png)rnrnrn之后我上网百度了一下,有人说是springboot的启动项里少加了一个(exclude=DataSourceAutoConfiguration.class)rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549181_300854.png)rnrn加上之后再运行,就报如下错误了:rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549250_447681.png)rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549260_480467.png)rnrn有哪位大神可以为我解答一下?
springboot freeMark 正式环境启动报错
启动jar的springboot应用时发现错误如下: (开发工具没有问题 , 启动方式java -jar xxx.jar ) 但是不影响正式使用 2019-03-21 14:33:52.606 DEBUG 2236 --- [main] o.s.w.s.v.f.FreeMarkerConfigurer : Cannot resolve template loader path [c...
springboot启动报错Application startup failed
除了是包依赖,还有可能是别的问题吗nn这是pom,我也没看到一样的啊n4.0.0nn xxmyn n n org.springframeworkn spring-contextn 3.2.8.RELEASEn n n org.springframeworkn spring-contextn 4.3.7.RELEASEn n n org.springframeworkn spring-webmvcn 3.2.8.RELEASEn n n XZCYn pomn 0.0.1n n backendn domainn frontendn nnn n org.springframework.bootn spring-boot-starter-parentn 1.5.2.RELEASEn n n n n UTF-8n n 1.8n n 1.5.2.RELEASEn n 1.0.23n n 2.8.4n n 0.0.1n n 3.4.8n n 2.1.2.RELEASEn n 1.3.3n n 5.1.38n n 1.16.6n n 2.24.0n 0.26nn n n n n n n n com.alibaban fastjsonn LATESTn nn n n com.alibaban druidn $druid.versionn nn n n mysqln mysql-connector-javan $mysql.cnnector.java.driver.versionn nn n n org.springframework.bootn spring-boot-starter-mailn $springboot.versionn nn n n org.webjarsn momentjsn LATESTn nn n org.webjarsn Eonasdan-bootstrap-datetimepickern LATESTn nn n n n n n n n org.springframework.bootn spring-boot-starter-thymeleafn $springboot.versionn n n nz.net.ultraq.thymeleafn thymeleaf-layout-dialectn $nz.net.ultraq.thymeleaf.dialect.versionn n nn n n org.springframework.bootn spring-boot-starter-mailn $springboot.versionn n n n com.alibaban dubbon $com.alibaba.dubbo.versionn n n n com.esotericsoftware.kryon kryon $kryo.versionn n n de.javakaffeen kryo-serializersn $kryoSerializers.versionn nn n n org.apache.zookeepern zookeepern $zookeeper.versionn pomn nn n n com.github.sgroschupfn zkclientn LATESTn nn n com.101tecn zkclientn 0.9n nn n n org.projectlombokn lombokn $lombok.versionn nnn n n joda-timen joda-timen $joda-time.versionn nn n com.github.axetn kaptchan 0.0.9n n n nn n n n n n org.apache.maven.pluginsn maven-compiler-pluginn 3.2n n 1.8n 1.8n UTF-8n n nn n n org.apache.maven.pluginsn maven-source-pluginn n n attach-sourcesn n jarn n n n n n n
springboot 启动报错, @Autowired注入不进去!
2018-04-13 09:20:49.188 ERROR 10444 --- [ost-startStop-1] o.a.c.loader.WebappClassLoaderBase : The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.rn2018-04-13 09:20:49.199 ERROR 10444 --- [ restartedMain] o.s.boot.SpringApplication : Application startup failedrnrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private service.UserService com.gbq.controller.LoginController.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [service.UserService] 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)rn
springboot整合cxf框架启动报错
异常信息: *************************** APPLICATION FAILED TO START *************************** Description: Parameter 1 of constructor in org.springframework.boot.autoconfigure.web.servlet.error.ErrorMv...
解决一些Springboot启动报错问题
项目启动报错比调bug更加难受 概要:近日在学习Springcloud微服务。配置服务注册中心,一切妥妥当当,但还是报了一个让我崩溃的问题:org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat 翻译一下这句话:启动内置tomcat失败。 具体报错信息如下: org.spring...
SpringBoot整合redis启动报错'org.springframework.data.redis.connection.RedisConnectionF
rnSpringBoot版本为1.5.7rnPom.xml:[code=java]rn rn org.springframework.bootrn spring-boot-starter-webrn rn rn rn org.springframework.bootrn spring-boot-starter-data-jparn rn rn rn mysqlrn mysql-connector-javarn runtimern rn rn rn redis.clientsrn jedisrn rn rn org.springframework.bootrn spring-boot-starter-data-redisrn rn rn org.apache.commonsrn commons-pool2rn [/code]rnrnRedisConfig:rn[code=java]@Autowiredrn private RedisConnectionFactory redisConnectionFactory;rn rn /**rn * 默认情况下bean的名称和方法名称相同,你也可以使用name属性来指定。rn * IOC容器中注册了ID为 redisTemplate的 bean。rn * @returnrn */rn @Beanrn public RedisTemplate redisTemplate()rn StringRedisTemplate redisTemplate = new StringRedisTemplate(redisConnectionFactory);rn return redisTemplate;rn [/code]
springboot整合es启动报错的问题
今天打算用springboot整合es创建一个索引并往索引里面写数据的时候,项目启动的时候一直报下面的这个错误,错误大概如下, Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClie...
springboot整合pagehelper的时候启动报错
springboot启动报错 Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/boot/bind/RelaxedPropertyResolver; at java.lang.Class.getDeclaredFields0(Native Method) ~[na:1.8.0_144] at java.lang.C...
springboot整合activit第二次启动报错
springboot第一次启动的时候可以正常创建表,第二次启动就开始报错。表已经存在,求解。rnrnrnrn2018-04-03 14:06:08.230 INFO 8284 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.11rn2018-04-03 14:06:08.391 INFO 8284 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/attence] : Initializing Spring embedded WebApplicationContextrn2018-04-03 14:06:13.482 INFO 8284 --- [ main] com.alibaba.druid.pool.DruidDataSource : dataSource-1 initedrn2018-04-03 14:06:13.495 INFO 8284 --- [ main] o.activiti.engine.impl.db.DbSqlSession : performing create on engine with resource org/activiti/db/create/activiti.mysql.create.engine.sqlrn2018-04-03 14:06:13.497 INFO 8284 --- [ main] o.activiti.engine.impl.db.DbSqlSession : Found MySQL: majorVersion=5 minorVersion=5rn2018-04-03 14:06:13.630 ERROR 8284 --- [ main] druid.sql.Statement : conn-10001, stmt-20000 execute error. create table ACT_GE_PROPERTY ( rnNAME_ varchar(64), rnVALUE_ varchar(300), rnREV_ integer, rnprimary key (NAME_) rn) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
springboot +mybatis,配置了数据源,启动报错
2.1.3版本会报错,2.0.5正常运行 yml文件如下: server: port: 8080 spring: datasource: name: seckill type: com.alibaba.druid.pool.DruidDataSource #druid相关配置 druid: #监控统计拦截的filters filte...
springboot项目中多个main方法启动问题
SpringBoot项目通过扫描整个项目查找main方法来启动整个web。但是当项目中含有不止一个标准main方法时,项目打包成jar包时可能无法正常启动,找不到要启动的main; 1 修改pom.xml文件,用如下方式实现 修改pom.xml文件,用如下方式实现 &amp;amp;lt;properties&amp;amp;gt; &amp;amp;lt;!-- The main class to start by execu...
个人学习SpringBoot 之main方法推断和应用类型推断
个人学习SpringBoot 之main方法推断和应用类型推断 在SpringApplication初始化的时候我们可以看到这么一段代码 /** * Create a new {@link SpringApplication} instance. The application context will load * beans from the specified primary...
main方法
/* 理解main方法的调用 */ class Person  { //每一个类都可以有main()主函数 //在编译的时候,编译器会编译每一个class成为一个字节码文件 //当你有多个类的时候,你可以选择执行 你指定的字节码文件 //注意:如果你选择的 字节码文件中 没有找到main方法, 那么程序执行的时候会出现没有入口的错误 //正常就算有十个类,代码执行是从你指定的类开
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件