摘要:最近遇到一个问题,执行下列语句会报错: CREATE TABLE `t_user` ( `USER_ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID', `USERNAME` varchar(50) CHARACTER SET utf8 COL
阅读全文
摘要:关于Spring AOP,可以去看看官方文档: https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#aop Aspect: A modularization of a co
阅读全文
摘要:继续之前的项目: People加上无参构造方法: @Component public class People { // private User user; public People(){ System.out.println("create People"); } } 在refresh()方法
阅读全文
摘要:访问https://spring.io/ spring boot中: public class MyWebApplicationInitializer implements WebApplicationInitializer { @Override public void onStartup(Ser
阅读全文
摘要:其实就是别人提供了一个类,读取指定目录下的文件,通过反射方式创建对象。 为什么来说spi?因为spring boot就是通过spi来创建对象的。 首先写一个接口: public interface TestInterface { void test(); } 写几个实现类: public class
阅读全文