wkennedy / swagger4spring-web

Swagger support for Spring MVC
89 stars 46 forks source link

Scanning packages in jar #30

Closed jgerlier closed 10 years ago

jgerlier commented 10 years ago

Hi,

I managed to set up the swagger4springweb-example project with success, but I didn't manage to scan the controller and model packages when they are in a dependency and not in the source spath.

With the debugger I had a look at the code used to scan the classes (which I am not really able to understand), and I figured out that the ClassLoader used scan the classes in /WEB-INF/classes/, so I assume that it is mendatory to put the scanned classes in the source path of the swagger4spring project. Is there a way to scan classes in a dependency ?

That would be really interesting for me as the webservice and model layers are in separated projects.

Thanks,

Julien

jgerlier commented 10 years ago

Sorry I checked again today and it appeared that the problem came from the fact that I was not properly importing the dependency as a jar with maven.

Thanks,

Julien