chenzhikun12 opened a new issue, #19235:
URL: https://github.com/apache/shardingsphere/issues/19235

   ### Which version of ShardingSphere did you use?
          shardingsphere-jdbc-core-spring-boot-starter-5.1.2
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
          shardingsphere-jdbc
   ### Expected behavior
          When inserting data into the database, sharding JDBC automatically 
generates the ID and successfully inserts it
   ### Actual behavior
          When inserting data in the databse,  the system throw exception:  
Field 'id' doesn't have a default value
   ### Reason analyze (If you can)
           Maybe my configuration is not effective, but my configuration is 
based on the example
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
          `server.port=8888
           spring.main.allow-bean-definition-overriding=true
           spring.application.name=sharding-sphere-demo
           spring.shardingsphere.datasource.names=ds0
           
spring.shardingsphere.datasource.ds0.url=jdbc:mysql://192.168.20.177/sharding_demo?useSSL=false&serverTimezone=UTC
           
spring.shardingsphere.datasource.ds0.type=com.alibaba.druid.pool.DruidDataSource
           
spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.cj.jdbc.Driver
           spring.shardingsphere.datasource.ds0.username=root
           spring.shardingsphere.datasource.ds0.password=
           spring.shardingsphere.mode.type=Memory
           spring.shardingsphere.rules.sharding.binding-tables=admin_email
           
spring.shardingsphere.rules.sharding.sharding-algorithms.eat-auto-interval.type=auto_interval
           
spring.shardingsphere.rules.sharding.sharding-algorithms.eat-auto-interval.props.datetime-lower=2022-06-01
 00:00:00
           
spring.shardingsphere.rules.sharding.sharding-algorithms.eat-auto-interval.props.datetime-upper=2022-09-01
 00:00:00
           
spring.shardingsphere.rules.sharding.sharding-algorithms.eat-auto-interval.props.sharding-seconds=2592000
           
spring.shardingsphere.rules.sharding.auto-tables.admin_email.sharding-strategy.standard.sharding-column=created_at
           
spring.shardingsphere.rules.sharding.auto-tables.admin_email.sharding-strategy.standard.sharding-algorithm-name=eat-auto-interval
           
spring.shardingsphere.rules.sharding.auto-tables.admin_email.key-generate-strategy.column=id
           
spring.shardingsphere.rules.sharding.auto-tables.admin_email.key-generate-strategy.key-generator-name=snowflake
           
spring.shardingsphere.rules.sharding.auto-tables.admin_email.actualDataSources=ds0
           
spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
           spring.shardingsphere.props.sql.show=true
           
mybatis.type-aliases-package=com.example.eatshardingsphere.admin.mapper
           
mybatis.mapper-locations=classpath:mapper/*.xml,classpath*:sdk/mapper/*.xml
           mybatis.configuration.map-underscore-to-camel-case=true
           
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl `
   
   ## My excute sql ##
   insert into admin_email(`email`, `type`, `created_at`) value 
(#{email.email}, #{email.type}, #{email.createdAt})
   
   
![image](https://user-images.githubusercontent.com/33413445/179190170-fda59ae3-383b-4799-9075-8745142029d0.png)
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to