1
我有一个使用JavaFX的Spring Boot项目。当我运行这个项目的想法,一切工作正常,但经过使用Maven我包项目我得到尝试运行jar文件创建一个bean时出错“entityManagerFactory”
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory'
Invocation of init method failed;nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
的pom.xml此异常时此
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
其实帮忙,谢谢!也许你也知道为什么方法注释@PostConstruct不运行?同样的问题,在想法中工作,在jar文件中不起作用。 – EmberTraveller
@EmberTraveller我不认为这个问题与第一个有关...试着问一个新的问题。但可能有一些依赖关系丢失... – davioooh