mardi 31 mars 2015

Java MyBatis Configuration AddMappers(String packageName)


Vote count:

0




First of all, I have a java code like this :



Environment environment = new Environment("development",
transactionFactory, dataSource);

Configuration config = new Configuration(environment);


Then, I tried to add the mappers, using addMappers(String packageName). In that package, contains an interface of SQLMap



config.addMappers("com.test.mappers");


It works fine.


But when I have a reference to another project, and that project has a package named "com.testtwo.mappers", and contains an interface of SQLMap, and I tried to write this :



config.addMappers("com.testtwo.mappers");


My config does not load all of the interface SQLMap in the other project.


Do I miss something?


Thank you



asked 34 secs ago







Java MyBatis Configuration AddMappers(String packageName)

Aucun commentaire:

Enregistrer un commentaire