Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Accelerometer to Cassandra REST Api
public class AccelerationController {
private static final Logger log = LoggerFactory.getLogger(AccelerationController.class);
private CassandraOperations cassandraTemplate; //contains Operations for interacting with Cassandra.
@RequestMapping(method = POST, consumes = APPLICATION_JSON_VALUE)
public ResponseEntity newAcceleration(@RequestBody @Valid AccelerartionModel accelerationModel) {
Acceleration acceleration = new Acceleration(accelerationModel);
if (log.isInfoEnabled()) {"/POST /acceleration with values {}", acceleration);
// insert values into CassandraDB and return 201 HTTP code
return status(CREATED).build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.