@Autowired public ApplicationContext context; @Bean public ViewResolver freeMarkerViewResolver(){ String[] arr=context.getBeanDefinitionNames(); for(int i=0;i<arr.length;i++){ System.out.println(arr[i]); } FreeMarkerViewResolver view=new FreeMarkerViewResolver(); view.setOrder(1); return view; }
原文地址:https://www.cnblogs.com/jiangtao1218/p/10216880.html
时间: 2024-11-01 14:48:56