2 zwy  zwy__ 于 2014.12.09 11:12 提问

servlet多线程保存数据安全问题

@Service("logfcoopService")
public class LogfcoopServiceImpl implements LogfcoopService
{
private LogfcoopDao logfcoopDao;
@Resource
public void setLogfcoopDao(LogfcoopDao logfcoopDao) {
this.logfcoopDao = logfcoopDao;
}
public void add(MjlogfcoopForm logfcoopForm) {
Mjlogfcoop logfcoop = new Mjlogfcoop();
vo2po.logfcoopVo2Po(logfcoopForm, logfcoop);
logfcoop.setCreate_date(new Date());
System.out.println(logfcoop.getClienType());
logfcoopDao.save(logfcoop);

}

}这是spring容器中注入的service
LogfcoopService logfcoopService;

@Override

public void init() throws ServletException {

super .init();

        ServletContext servletContext = this .getServletContext();  
        WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext);   
        logfcoopService = (LogfcoopService)ctx.getBean("logfcoopService" );   
 }  
这边是servlet中获取service对象然后多请求过来是执行sava方法是怎么个处理机制或者本身存在安全问题呢,求大神指点!
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!