Exporter un projet Spring boot vers jar executable
Bonjour,
Je souhaite exporter mon projet Spring boot vers un jar exécutable avec Eclipse, pour l'envoyer à des testeurs, et en attendant d'avoir une solution d'hébergement .
J'ai fait
- menu contextuel sur mon projet
- puis exporter
- j'ai pris l'option "runable jar file"
- et j'ai choisi mon projet dans le wizard
- puis finiish
Il n'y a pas beaucoup d'options proposé.
J'ai lancé le jar généré avec
java -jar monprojet
Et j'ai les erreurs suivants
Citation:
09:34:18.523 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Activating profiles []
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::
09:34:18.737 [main] INFO fr.repete.RepeteAvecMoi - Starting RepeteAvecMoi on DESKTOP-82FR04F with PID 14488 (P:\RepeteAvecMoi.jar started by Fabrice in P:\)
09:34:18.737 [main] DEBUG fr.repete.RepeteAvecMoi - Running with Spring Boot, Spring
09:34:18.737 [main] INFO fr.repete.RepeteAvecMoi - No active profile set, falling back to default profiles: default
09:34:18.737 [main] DEBUG org.springframework.boot.SpringApplication - Loading source class fr.repete.RepeteAvecMoi
09:34:18.794 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1c1bbc4e
09:34:18.806 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
09:34:18.862 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/configuration/WebSecurityConfig.class]
09:34:18.870 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/general/MainController.class]
09:34:18.873 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Ignored because not a concrete top-level class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/membre/MembreRepository.class]
09:34:18.876 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/membre/MembreService.class]
09:34:18.876 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/membre/MembreController.class]
09:34:18.876 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/musique/MorceauService.class]
09:34:18.883 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Ignored because not a concrete top-level class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/musique/MorceauRepository.class]
09:34:18.885 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/musique/MorceauController.class]
09:34:18.886 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Ignored because not a concrete top-level class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/musique/ArtisteRepository.class]
09:34:18.887 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/musique/ArtisteController.class]
09:34:18.888 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/musique/ArtisteService.class]
09:34:18.889 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/repetition/RepetitionController.class]
09:34:18.889 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/repetition/RepetitionService.class]
09:34:18.891 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Ignored because not a concrete top-level class: URL [jar:file:/P:/RepeteAvecMoi.jar!/fr/repete/repetition/RepetitionRepository.class]
09:34:18.933 [main] ERROR org.springframework.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)
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getCandidateConfigurations(AutoConfigurationImportSelector.java:173)
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getAutoConfigurationEntry(AutoConfigurationImportSelector.java:116)
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.process(AutoConfigurationImportSelector.java:396)
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:878)
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:808)
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:779)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at fr.repete.RepeteAvecMoi.main(RepeteAvecMoi.java:17)
09:34:18.939 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1c1bbc4e, started on Wed Oct 07 09:34:18 CEST 2020
J'ai cherché sur le web.
J'ai trouvé des post sur des forums qui parle de construire le projet en ligne de commandes avec maven, mais la procédure n'est pas listée entièrement
Cordialement