Home>

I get an error though it should be in the correct position.
I do n’t know what ’s wrong.

Description:

Field mapper in com.example.service.DBMogipuroInfoservice required a bean of type 'com.example.persistence.MogipuroMapper' that could not be found.

The injection point has the following annotations:

  • @ org.springframework.beans.factory.annotation.Autowired (required = true)

  • Answer # 1

    The code is not described, so it is judged only from the content of the output error.

    mapper in com.example.service.DBMogipuroInfoservice required a bean of type 'com.example.persistence.MogipuroMapper' that could not be found.

    , so it is not@Autowiredto MogipuroMapper in MogipuroInfoService, or@Mapperis not listed in MogipuroMapper, so it cannot be used from DBMogipuroInfoservice. That's right.

    Register all the Controller and Service classes to be used as Spring Beans.