问题演示
1:生成器生成的Mapper
public interface BaseGoodMapper extends BaseMapper<BaseGood> {
}
2: 生成器生成的Service接口
public interface IBaseGoodService extends IService<BaseGood> {
}
3: 生成器生成的service实现类
@Service
public class BaseGoodServiceImpl extends ServiceImpl<BaseGoodMapper, BaseGood> implements IBaseGoodService {
}
4: controller直接调用service
@RestController
@RequestMapping("good")
public class BaseGoodController {
@Autowired
private IBaseGoodService iBaseGoodService;
@GetMapping("list")
public void findAll() {
List<BaseGood> list = iBaseGoodService.list();
System.out.println(list);
}
5: 结果可以查到所有值
6: 问题描述
查询没有事务 能理解 因为没有添加注解 但是增删改命名添加了@transcational注解 但是增删改 还是没有事务

Comment From: huayanYu
建议检查本地事务配置, 无法复现。