/images/avatar.png

Spring 的钩子

Spring 的钩子 Spring 有很多钩子,供我们扩展 Spring 的功能。 Bean factory implementations should support the standard bean lifecycle interfaces as far as possible. The full set of initialization methods and their standard order is: BeanNameAware’s setBeanName BeanClassLoaderAware’s setBeanClassLoader BeanFactoryAware’s setBeanFactory EnvironmentAware’s setEnvironment EmbeddedValueResolverAware’s setEmbeddedValueResolver ResourceLoaderAware’s setResourceLoader (only applicable when running in an application context) ApplicationEventPublisherAware’s setApplicationEventPublisher (only applicable

Java对象的常用判断

cn.hutool.core.util.ObjectUtil#isNull 与 java.util.Objects#isNull 的区别 参考 ObjectUtil 中 isNull() 和 isNotNull() 第二个条件判断的意义

php 数据库查询字段全是小写

TP3.2 框架查询数据库 查询数据,返回的字段全是小写,指定的小驼峰别名也被转成了小写。 因为 \Think\Db\Driver 默认写死的字段全小写。 修改配置 1 2 3 4 // config.php "DB_PARAMS" => [ \PDO::ATTR_CASE => \PDO::CASE_NATURAL, ],