Issue
This Content is from Stack Overflow. Question asked by Tyler
Im trying to run a Spring App in Kotlin that was built using gradle, without the use of the main method. I have generated the project using start.spring.io
I do not have access to run spring via the main method of a jar, because it is a plugin esk system. In this system, I place the generated jar file from gradle into a “plugins folder” (only contains jar files) and start the application from the main jar file outside of the plugins folder. This main jar then loads all the other jar files from the plugins folder.
I am trying to build a Spring app for various reasons on top of this third party platform for building Minecraft Server Proxies called Velocity MC
This is the main class of the Velocity Plugin where I am attempting to start the Spring App, and here is the error I am getting.
@Plugin(id = "my-plugin", name = "My Plugin", version = "v1",
url = "https://example.org", description = "Its a plugin", authors = {"Me"})
class VelocityPlugin {
val server: ProxyServer;
val logger: Logger;
@Inject
constructor(server: ProxyServer, logger: Logger) {
this.server = server;
this.logger = logger;
runApplication<SpringApp>() // Trying to start Spring from here
}
}
@SpringBootApplication
class SpringApp
[22:16:12 ERROR] [org.springframework.boot.SpringApplication]:
Application run failed java.lang.IllegalArgumentException: No auto
configuration classes found in META-INF/spring.factories nor in
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports.
If you are using a custom packaging, make sure that file is correct.
This is a general issue for Spring and after a couple of hours of research, I have found next to nothing on. Any help is appreciated. Thank you.
Solution
This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.
This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.