最新回答 / 慕粉3854392
用controller注解类,如果有json返回的接口,则在该接口前面加上 @ResponseBody注解就可以了:如@Controllerpublic class HolleSpringBoot { @Autowired private Testaa testAa; @RequestMapping("/holle/{name}") @ResponseBody public String holleSpring(@PathVariable String name){ ...
2017-11-07
: Application startup failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloController': Injection of auautowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'cupSize' in value "${cupSize}"
2017-11-06
已采纳回答 / 慕村4705583
List转json的时候要配置转换器;增加的配置类继承WebMvcConfigurerAdapter 再重写configureMessageConverters方法 下面是我写得;你试试看!<...code...>
2017-11-05
http://www.imooc.com/learn/767: 如果是用IDEA+maven的话,换国内的源,然后run,不然会提示“Exception in thread "main" java.lang.NoClassDefFoundError”是jar包没有下载成功。例如用IDEA自带的maven的时候,改一下maven源的配置:JetBrains\IntelliJ IDEA 2017.2.5\plugins\maven\lib\maven3\conf\settings.xml:加上阿里云的源。http://www.cnblogs.com/phpdragon/p/7216626.html
2017-11-04