Home > Software engineering >  Spring Boot in Maven: "No auto configuration classes found in META-INF/spring.factories"
Spring Boot in Maven: "No auto configuration classes found in META-INF/spring.factories"

Time:09-17

I am learning Java and Spring Boot (I'm pretty new at programming). I have made a simple API app that I can run from IntelliJ and which responds correctly to requests made to it. Now I want to package it as an executable .jar file so that I can try to have it hosted on a remote server, but the jar file I make doesn't run properly. The error is: 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.

This is a Maven project and I think this is probably a problem with my pom.xml file, but after several hours of trying, I can't figure out what the solution might be. Can someone help me please?

My pom.xml is here: https://github.com/NickRoach/simple-spring-API/blob/main/demo/pom.xml The rest of the project is available there too.

CodePudding user response:

Solved. Rather than set intelliJ to make the .jar file as an artifact, I gave the command "./mvnw package -DskipTests" in the project directory in gitbash (a mentor gave me this advice). This built the project and the resulting jar file runs and works properly

  • Related