最新回答 / 慕粉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.xianlaiwan.cn/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