Closed plaird closed 4 years ago
I could not repro, following these steps:
load("//tools/springboot:springboot.bzl", "springboot",)
springboot_deps = [ "//tools/springboot/import_bundles:springboot_required_deps", "//tools/springboot/import_bundles:springboot_jetty_starter_deps", "//tools/springboot/import_bundles:springboot_web_starter_deps", ]
java_library( name = "lib", srcs = glob(["*.java"]), visibility = ["//src/test:subpackages"], deps = springboot_deps, )
springboot( name = "helloworld_springboot", boot_app_class = "hello.Application", java_library = ":lib", deps = springboot_deps, )
Closing, please reopen if this is seen again.
Reported from the community:
$ java -jar bazel-bin/src/main/java/hello/app_deploy.jar
. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot ::
2019-12-19 22:39:36.964 INFO 52947 --- [ main] hello.Application : Starting Application on jingwen-macbookpro1.roam.corp.google.com with PID 52947 (/private/var/tmp/_bazel_jingwen/520ef5ee3324f7f06fb7919a7112f262/execroot/main/bazel-out/darwin-fastbuild/bin/src/main/java/hello/app_deploy.jar started by jingwen in /Users/jingwen/code/rules_jvm_external/examples/spring_boot) 2019-12-19 22:39:36.966 INFO 52947 --- [ main] hello.Application : No active profile set, falling back to default profiles: default 2019-12-19 22:39:37.172 ERROR 52947 --- [ main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct. at org.springframework.util.Assert.notEmpty(Assert.java:464) ~[app_deploy.jar:na] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getCandidateConfigurations(AutoConfigurationImportSelector.java:183) ~[app_deploy.jar:na] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getAutoConfigurationEntry(AutoConfigurationImportSelector.java:119) ~[app_deploy.jar:na] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.process(AutoConfigurationImportSelector.java:420) ~[app_deploy.jar:na] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:878) ~[app_deploy.jar:na] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:804) ~[app_deploy.jar:na] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:774) ~[app_deploy.jar:na] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:185) ~[app_deploy.jar:na] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315) ~[app_deploy.jar:na] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) ~[app_deploy.jar:na] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[app_deploy.jar:na] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[app_deploy.jar:na] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) ~[app_deploy.jar:na] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[app_deploy.jar:na] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[app_deploy.jar:na] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [app_deploy.jar:na] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [app_deploy.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [app_deploy.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [app_deploy.jar:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [app_deploy.jar:na] at hello.Application.main(Application.java:15) [app_deploy.jar:na]