Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'productDao ' of bean class [service.ProductService]: Bean property 'productDao ' is not writable or has an invalid setter method. Did you mean 'productDao'?
看看applicationContext.xml 文件下 <bean id="productService" class="..service.ProductService"><property name="prductDao" ref="prductDao"></property></bean>是否有这句话(注入dao层),productService然后在类里面注入dao,用set方法private ProductDao productDao public void setProductDao(ProductDao productDao){this.productDao=productDao}