异常2
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP……
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT'注册时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录更新时间',
数据库的版本问题,只能有一个timestamp,改成datetime
然后继续报错
Invalid default value for 'create_time'
解决:将上面的该为下面的
`create_time` datetime DEFAULT NULL COMMENT'注册时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录更新时间',
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE:
repackage (repackage) on project edu-user:
Execution repackage of goal org.springframework.boot:
spring-boot-maven-plugin:2.2.2.RELEASE:repackage failed: Unable to find main class
有一个模块没有main方法
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type 'cn.blb.ad.mapper.PromotionAdMapper' available:
expected at least 1 bean which qualifies as autowire candidate.
在主类上加上@MapperScan("cn.blb.ad.mapper")
Failed to configure a DataSource:
'url' attribute is not specified and no embedded datasource could
数据源重新配置
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
在主启动类上添加@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)