摘要:
问题:@Autowired无法自动注入思路:SpringBoot项目的Bean装配默认规则是根据Application类所在的包位置从上往下扫描!“Application类”是指SpringBoot项目入口类。这个类的位置很关键:推荐放把启动类放在com.exampl... 阅读全文
摘要:
问题:** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.翻译:警告:你的应用上下文可能没有启动,因为你... 阅读全文
摘要:
接口:/** * id生成器 */public interface IdGenerator { String next();}实现类:/** * 分布式ID自增算法 * 来自网络Twitter Snowflake 算法 * */public class Distrib... 阅读全文