解决办法:在数据库中,将id设为自动增长,如下图所示:

 

 

com.microsoft.sqlserver.jdbc.SQLServerException: 不能将值 NULL 插入列 'ID'_ 不能将值 NULL 插入列 '