在 Spring Boot 启动类中添加 @MapperScan 注解,扫描 Mapper 文件夹
@SpringBootApplication @MapperScan("com.xxx.xxx.mapper") public class Application {public static void main(String[] args) {SpringApplication.run(QuickStartApplication.class, args);} }
编写实体类
@Data public class KQLog {@TableId(value = "id",type = IdType.AUTO)private Integer id;private String personName;private Date inDate;private Date kqTime;private String kqMethod; }
编写map类,需要继承mybatis-plus的basemapper
public interface UserMapper extends BaseMapper {}
开始使用
@RunWith(SpringRunner.class) @SpringBootTest public class TestClass {@AutowiredKQLogMapper kqLogMapper;@Testpublic void queryKqDownLoad(){List kqLogs = kqLogMapper.selectList(null);kqLogs.forEach(System.out::println);} }
本文描述了mysql-cluster集群sql节点高可用keepalived的故障处理过程,包括故障发生时间、故障描述、故障分析等内容。根据keepalived的日志分析,发现bogus VRRP packet received on eth0 !!!等错误信息,进而导致vip地址失效,使得mysql-cluster的api无法访问。针对这个问题,本文提供了相应的解决方案。 ...
[详细]