using spring with rest API
merged and fixed crash