① Field ‘id‘ doesn‘t have a default value ②Field error in object ‘xxx’ on field ‘XXX’: rejected valu

出现问题:

### The error occurred while setting parameters
### SQL: insert into product(productNum,productName,cityName,departureTime,productPrice,productDesc,productStatus) values(?,?,?,?,?,?,?)
### Cause: java.sql.SQLException: Field 'id' doesn't have a default value
; ]; Field 'id' doesn't have a default value; nested exception is java.sql.SQLException: Field 'id' doesn't have a default value
2020-12-15 16:03:59,733 76658  [io-8888-exec-10] DEBUG efaultHandlerExceptionResolver  - Resolving exception from handler [public java.lang.String candy.ssm.controller.ProductController.save(candy.ssm.domain.Product) throws java.lang.Exception]: org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: java.sql.SQLException: Field 'id' doesn't have a default value
### The error may involve candy.ssm.dao.IProductDao.save-Inline
### The error occurred while setti

你可能感兴趣的:(问题)