You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
I am trying to create the presistence layer via Spring JPA but when I try to start the application the error below is thrown. If I start the module with the Spring part on its own, everything is working.
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' available [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:863) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
application.properties is present in resources folder
Main class does look like this:
`
public class BansPlugin extends JavaPlugin {
private ConfigurableApplicationContext context;
@Override
public void onEnable() {
saveDefaultConfig();
try {
context = SpringSpigotBootstrapper.initialize(this, new SpringApplicationBuilder().bannerMode(Banner.Mode.OFF).sources(BanApplication.class));
} catch (ExecutionException | InterruptedException e) {
e.printStackTrace();
}
}
@Override
public void onDisable() {
context.close();
context = null;
}
}
`
and the application class does look like this:
@SpringBootApplication public class BanApplication { }
I am trying to create the presistence layer via Spring JPA but when I try to start the application the error below is thrown. If I start the module with the Spring part on its own, everything is working.
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' available [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:863) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [18:05:44] [Server thread/WARN]: at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
application.properties is present in resources folder
Main class does look like this:
`
}
`
and the application class does look like this:
@SpringBootApplication public class BanApplication { }
I have no clue why its not working with spigot
Edit:
Dependencies:
implementation 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' runtimeOnly 'mysql:mysql-connector-java' implementation 'dev.alangomes:spigot-spring-boot-starter:0.20.7'
The text was updated successfully, but these errors were encountered: