下面的bean是無狀態的,因此是線程安全的嗎?更具體地說,我的consern是String數組的注入值。這是否會影響bean的狀態?無權利?這個Spring bean是無狀態的嗎?
public class ServiceImpl implements Service {
private static final Logger LOG = Logger.getLogger(ServiceImpl.class);
/* Injected values properties file. */
private String[] values;
@Autowired
private DAO dao;
@Transactional
@Override
public void invoke(String submissionId) {
dosomething....
}
}
將什麼樣的值分配給'values'數組 – 2013-03-07 10:24:33