In order for certain frameworks to initialize objects in such a way, you have to provide a default constructor (a constructor that takes no arguments), even if it doesn't do anything.
This is due to the fact you probably have another constructor in there that takes at least one argument. Logically, the library doesn't know what arguments to pass to every arbitrary class you pass it.
This is indicated in the error where it says java.lang.NoSuchMethodException: [Lmain.java.com.springapp.mvc.model.DSLR;.<init>()
:
NoSuchMethodException
means it can't find a method it expects at runtime (through reflection).<init>()
refers to the constructor (constructors don't technically have names, since they're always just the name of the class itself; therefore, the JVM refers to them as<init>()
).