首页>代码>spring通过@Value注解注入到java List属性>/loading-list-from-properties-file-spring-@value/src/main/java/com/memorynotfound/spring/core/Run.java
package com.memorynotfound.spring.core; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class Run { public static void main(String... args){ ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class); AppConfig appConfig = context.getBean(AppConfig.class); System.out.println("Planets: " + appConfig.getPlanets()); } }
最近浏览更多
全栈小白 LV32
2023年1月8日
364502984 LV18
2022年6月2日
shaoxf_nihao LV4
2022年5月31日
wsupsup LV16
2022年4月20日
dongyanbing LV4
2022年4月8日
tmdgdx LV9
2022年4月1日
and123456 LV11
2022年3月16日
szf123 LV12
2022年3月4日
xp95323 LV14
2022年1月25日
woaini12788 LV7
2022年1月13日