Home Ask Login Register

Developers Planet

Your answer is one click away!

user1162239 February 2016

Spring injecting interface in multi module project

one question for spring developers:

I am working on multi module project using spring framework.


parent (parent maven pom project)

all (ear project used to build ear from multiple modules)

catalog as parent of

catalog-ejb (implementation)

catalog-api (interface)

there is also a rest module which has dependency to catalog-api and uses autowired interface from catalog-api.

Problem is that during deployment i get "No qualifying bean of type found" exception.

api module is deployed as jar library within ear

ejb module is deployed as ejbModule

rest module is deployed as webModule (war).


user1162239 February 2016

Actually there was a problem with ejb module packaged as ejb in ear. In result duplicate webinitializers were executed at startup resulting exceptions.

Spring didn't found any implementations because componentscan was assigned to *.api package but implementation is in *.ejb package.

Post Status

Asked in February 2016
Viewed 3,618 times
Voted 14
Answered 1 times


Leave an answer

Quote of the day: live life