1、Name for argument type [java.lang.String] not available, and parameter name information not found in class file either
解决办法:http://jinnianshilongnian.iteye.com/blog/1705701
eclipse默认是debug级别的函数里面的参数名保留,但是ant编译就不行了。可以使用javac debug=true
要不就是写全@RequestParam的参数
public String requestparam2(@RequestParam("username") String username)
2、coutroller里面不能使用@Value
解决办法:项目使用了多个spring配置文件,然后properties需要多次引入,才可以使用。主要原因是扫描service类和controller不是一个spring配置文件
<context:property-placeholder location="classpath*:/Appkey.properties" />
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath*:/DataSourceConfig.properties</value>
<value>classpath*:/Appkey.properties</value>
</list>
</property>
</bean>