Problems with spring inserting data using namedParameterJdbcTemplate

Why use Map < String, Object > when inserting data?

@Test
public void testNamedParameterJdbcTemplate() {
    String sql = "INSERT INTO employees(last_name,email,dept_id) VALUES(:ln,:email,:deptid)";
    Map<String, Object> paramMap = new HashMap<>();
    
    paramMap.put("ln", "FF");
    paramMap.put("email", "FF@qq.com");
    paramMap.put("deptid", 2);
    
    
    namedParameterJdbcTemplate.update(sql, paramMap);
    
    
}
May.22,2021

because jdbcTemplate will eventually be assigned through the precompiled statement ps.setObject (name,value) of jdbc , where name is the attribute name, so the key of Map is the type of String , but the type of value is not known, so the Map is fine.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea5e44-46813.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea5e44-46813.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?