application.properties
mybatis.check-config-location=true
mybatis.mapper-locations=classpath*:mapper/*.xmlmybatis.type-aliases-package=com.myjsp.dao
spring.datasource.url=jdbc:mysql://localhost/credit?useUnicode=true&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#显示sql
logging.level.com.myjsp=DEBUG
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = MyjspApplication.class)
@WebAppConfiguration
public class MyjspApplicationTests {
@Autowired BlackDao blackdao;
@Test
public void contextLoads() {
Black temp=blackdao.selectByIdNo("522625199705243315");
System.out.println(temp);
}
}
mysql 删除重复数据
DELETE FROM black WHERE id NOT IN (SELECT minid FROM (SELECT MIN(id) AS minid FROM black GROUP BY idno) b);