在@SpringBootApplication中使用exclude后,无法启动Spring Boot 2.0.5.RELEASE

时间:2018-10-19 11:41:06

标签: java spring hibernate spring-mvc spring-boot

我正在使用Spring Boot 2.0.5.RELEASE并使用maven .gitignore插件。

tomcat7-maven-plugin

当我使用mvn tomcat7:deploy按应用程序部署时

@Configuration
@SpringBootApplication(scanBasePackages = { "com.online", "com.online.dao", "com.online.service",
        "com.online.exception", "com.online.filter", "com.online.interceptor", "com.online.validator",
        "com.online.component" }, exclude = { HibernateJpaAutoConfiguration.class })
public class SpringBootWebApplication
        extends org.springframework.boot.web.servlet.support.SpringBootServletInitializer {

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

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SpringBootWebApplication.class);
    }

}

如果我成功删除了[INFO] tomcatManager status code:200, ReasonPhrase: [INFO] FAIL - Deployed application at context path [/online-web] but context failed to start [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] online-test 0.0.1-SNAPSHOT ......................... SUCCESS [ 0.708 s] [INFO] online-data ........................................ SUCCESS [ 2.314 s] [INFO] online-service ..................................... SUCCESS [ 1.244 s] [INFO] online-web 0.0.1 ................................... SUCCESS [ 18.471 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 23.193 s [INFO] Finished at: 2018-10-19T16:37:04+05:00 [INFO] ------------------------------------------------------------------------ 应用程序部署,但是我还面临其他一些问题。

0 个答案:

没有答案