随笔分类 -  spring

摘要:1、applicationContext.xml配置 <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass 阅读全文
posted @ 2021-02-26 17:25 Caesar_the_great 阅读(55) 评论(0) 推荐(0) 编辑
摘要:1、两种实现方式:1 xml 2 注解 注解式:三个核心注解 (不需要额外配置文件) 类上的:@Component & @EnableScheduling 定时执行的方法上的:@Scheduled(cron="0 0/10 * * * ?") XML式:applicationContext.xml中 阅读全文
posted @ 2021-02-26 16:32 Caesar_the_great 阅读(1573) 评论(0) 推荐(0) 编辑
摘要:1 @Service (写在Service层接口的实现类上 XXXServiceImpl) Q: 为什么不直接写在接口上?因为一个接口可能有多个实现 1 @Service 2 public class LogServiceImpl extends ServiceImpl<LogMapper, Log 阅读全文
posted @ 2020-05-07 14:37 Caesar_the_great 阅读(543) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示