0

Is it possible to use nested mapper interface?:

package com.sample.package;

public class SampleService{

  public interface SampleMapper{
    public List<MyEntity> selectAllEntities();
  }
}

And if yes:

  • where to put mapper xml file?
  • what should be the name of xml file?
  • what namespace shoud I put in mapper xml file for interface?

1 Answer 1

0

It works.

  • The name of mapper must be SampleService$SampleMapper.xml.
  • It must be placed in the SampleService dir.
  • Namespace is com.sample.package.SampleService$SampleMapper.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.