1.Spring-mybatis-删除实现-SQL注入
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
package com.inmind;
|
||||
|
||||
import com.inmind.mapper.EmpMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class SpringbootMybatisCrudApplicationTests {
|
||||
@Autowired
|
||||
private EmpMapper empMapper;
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testDelete(){
|
||||
int count = empMapper.delete(15);
|
||||
System.out.println(count);
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user