MyBatis (XML Configuration) + Postgres + Spring Boot

preview_player
Показать описание
How to configure MyBatis using XML instead of annotation? How to configure the location of XML Mapper? How to configure the location of MyBatis config in SpringBoot?
Рекомендации по теме
Комментарии
Автор

Test controller
@RestController
@SpringBootApplication
public class DemoMybatisApplication {

@Autowired
CustomerMapper mapper;

@GetMapping("/test")
public String test() {
var obj =
System.out.println(obj);
return obj.toString();
}

@GetMapping("/testSave")
public String testSave() {
Customer c1 = new Customer();


c1.setName("Test 5th record");
mapper.save(c1);

return mapper.findAll().toString();
}

fvhiveproductionsbyLadyAga
visit shbcf.ru