我写了4个包,没个包一个类,分别是 User, UserDAO , UserDAOimpl, UserService
用junit测试 写了个testUserService,package com.test;import junit.framework.TestCase;import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;import com.model.User;
import com.service.UserService;public class testUserService extends TestCase { ApplicationContext ctx = new ClassPathXmlApplicationContext();

UserService service = (UserService)ctx.getBean("bean.xml");

User user = new User();

        user.setName("a");
        user.setPassword("b");
service.add(user);        //这三行的点和传参数地方一直出现红线,提示Syntax error on token ""a"", delete this token
Syntax error on token "user", VariableDeclaratorId expected after this token

}请问上面的问题是为什么啊?谢谢