永无止境I
2018-02-06 02:51
采纳率: 50%
浏览 3.8k
已采纳

spring boot start error

2018-02-06 09:59:24.084 |-INFO  [restartedMain] tv.seei.manage.ManageApplication [48] -| Starting ManageApplication on USER-PC with PID 6588 (E:\ideaWorkspace\manage\target\classes started by Administrator in E:\ideaWorkspace\SpringBootSample01)
2018-02-06 09:59:24.087 |-INFO  [restartedMain] tv.seei.manage.ManageApplication [597] -| The following profiles are active: dev
2018-02-06 09:59:24.276 |-INFO  [background-preinit] org.hibernate.validator.internal.util.Version [30] -| HV000001: Hibernate Validator 5.3.6.Final
2018-02-06 09:59:25.267 |-INFO  [restartedMain] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext [583] -| Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@c74731: startup date [Tue Feb 06 09:59:25 CST 2018]; root of context hierarchy
2018-02-06 09:59:28.826 |-INFO  [restartedMain] org.springframework.data.repository.config.RepositoryConfigurationDelegate [165] -| Multiple Spring Data modules found, entering strict repository configuration mode!
2018-02-06 09:59:28.976 |-INFO  [restartedMain] org.springframework.data.repository.config.RepositoryConfigurationDelegate [165] -| Multiple Spring Data modules found, entering strict repository configuration mode!
2018-02-06 09:59:29.085 |-INFO  [restartedMain] org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport [270] -| Spring Data Redis - Could not safely identify store assignment for repository candidate interface tv.seei.manage.authorization.dao.UserDao.
2018-02-06 09:59:31.695 |-WARN  [restartedMain] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext [551] -| Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NullPointerException
2018-02-06 09:59:31.714 |-INFO  [restartedMain] org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer [101] -| 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-02-06 09:59:31.745 |-ERROR [restartedMain] org.springframework.boot.SpringApplication [771] -| Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NullPointerException
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
    at tv.seei.manage.ManageApplication.main(ManageApplication.java:12)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.NullPointerException: null
    at org.springframework.boot.autoconfigure.web.ServerProperties$Tomcat$1.customize(ServerProperties.java:878)
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.configureContext(TomcatEmbeddedServletContainerFactory.java:498)
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.prepareContext(TomcatEmbeddedServletContainerFactory.java:234)
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:178)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
    ... 13 common frames omitted
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

6条回答 默认 最新

  • sd1209286540 2018-02-06 03:17
    已采纳

    把enableautoconfiguration注解去掉再启动

    点赞 打赏 评论
  • fst018666 2018-02-06 02:59

    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
    Caused by: java.lang.NullPointerException: null
    at tv.seei.manage.ManageApplication.main(ManageApplication.java:12)
    主要看这2个地方,有空指针

    点赞 打赏 评论
  • 永无止境I 2018-02-06 02:59

    这是ManageApplication 启动类

     @SpringBootApplication
    @EnableAutoConfiguration
    public class ManageApplication {
    
        public static void main(String[] args) {
            SpringApplication.run(ManageApplication.class, args);
        }
    }
    
    点赞 打赏 评论
  • 小肥猪。 2018-02-06 03:02

    空指针错误,请查看你的 spring配置文件是否在web。xml里配置了,是否成功加载

    点赞 打赏 评论
  • 永无止境I 2018-02-06 03:24

    pox.xml 配置文件

    <?xml version="1.0" encoding="UTF-8"?>
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    4.0.0

    <groupId>tv.seei</groupId>
    <artifactId>manage</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    
    <name>manage</name>
    <description>Demo project for Spring Boot</description>
    
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.9.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-web</artifactId>
        </dependency>
    
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>
    
        <!--redis-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
    
        <!-- mongodb -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
        </dependency>
    
        <!--thymeleaf  -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
    
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <version>RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
    
        <!--swagger 接口文档生成-->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.7.0</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.7.0</version>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
    </build>
    

    
    
    点赞 打赏 评论
  • Victor枫 2018-02-06 03:30

    注解只要加@SpringBootApplication就够了
    pom.xml可能写错了
    建议用工具生成或者去自动生成spring boot demo 网站里按需要生成就不会有错了
    其次是可能maven下载的包由于网络或者种种原因有问题(我学习的时候第一次就出现这种情况,另一台电脑就好好的)
    把项目先关了再maven仓库删除了打开项目重新更新下maven就可以解决

    点赞 打赏 评论

相关推荐 更多相似问题