首页 > TAG信息列表 > declaredField

jdbc小记

通过类加载器读取配置文件InputStream is = update.class.getClassLoader().getResourceAsStream("jdbc.properties");Properties pros = new Properties();pros.load(is);加载驱动 Class.forName(driverClass);通过驱动管理类连接数据库 conn = DriverManager.getConnection(url,

手写spring(3)-依赖注入模拟实现

依赖注入在spring中可以通过@Autowired实现,本章主要用于实现spring中bean的生命周期中的依赖注入环节。 @Autowired注解实现如下: @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD,ElementType.METHOD}) public @interface Autowired { } 现在在UserService

list对象转map(泛型的转换)

根据list对象中的某个属性转换成map /** * 将对象中的某个属性作为map的key 将对象本身作为map的value构成成一个map * * @param fieldToKey 必须是obj的field 我们把field的getValue作为map的key * @author mountain 2019-01-07 17:21 */

2021-09-22

昨天随便说一下pojo和vo和dto的关系给大家2个需求 昨天的博客的地址 https://mp.weixin.qq.com/s?__biz=MzA4MTAwMzA1Mw==&mid=2247484844&idx=1&sn=b950db1607efa078ccc41af61d885dc4&chksm=9f9ad2eea8ed5bf800d2a6d56eddebb33487f1db0741b6a71c0ea262db79480f7fbcb8119ebb