James L. Weaver
Developer / Evangelist
Twitter: @JavaFXpert
Email: jweaver@pivotal.io
http://JavaFXpert.com
http://CulturedEar.com
@JavaFXpert
#DigitalKnowHow
"This is called a neuralyzer. It's a gift from some friends from out of town. This red eye here will isolate the electronic impulses in your brains, more specifically the ones for memory."
—Agent K describing the neuralyzer to its soon to be targets.
James L. Weaver
Developer / Evangelist
Twitter: @JavaFXpert
Email: jweaver@pivotal.io
http://JavaFXpert.com
http://CulturedEar.com
@JavaFXpert
#DigitalKnowHow
@JavaFXpert
#DigitalKnowHow
Note: These Technical Presentation slides and Getting Started slides are available on the CounterpointComposer.com Help menu:
@JavaFXpert
#DigitalKnowHow
@JavaFXpert
#DigitalKnowHow
@JavaFXpert
#DigitalKnowHow
http://example/analyze?notes=G3 D4 B4
Note: Because Jackson 2 is on the classpath, Spring’s MappingJackson2HttpMessageConverter is automatically chosen to convert the MusicChord instance to JSON
@RestController
public class ChordAnalyzerController {
private MusicChord musicChord;
@RequestMapping("/analyze") // endpoints s/b nouns, so analysis is a better name
public MusicChord identifyChordByNotes(@RequestParam(value = "notes") String notes) {
...
return musicChord;
}
}
To learn more, see Building a RESTful Web Service Spring Guide
@JavaFXpert
#DigitalKnowHow
public class MusicChord {
private final String root;
private final String chordType;
private final String bassNote;
public MusicChord(String root, String chordType, String bassNote) {
this.root = root;
this.chordType = chordType;
this.bassNote = bassNote;
}
public String getRoot() {
return root;
}
public String getChordType() {
return chordType;
}
public String getBassNote() {
return bassNote;
}
}
@JavaFXpert
#DigitalKnowHow
package com.culturedear.chord;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ChordAnalyzerServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ChordAnalyzerServiceApplication.class, args);
}
}
To learn more, see Building a RESTful Web Service Spring Guide
@JavaFXpert
#DigitalKnowHow
Note: One method of deployment for Spring Boot apps is a JAR file, which contains an embedded Tomcat servlet container.
@JavaFXpert
#DigitalKnowHow
@JavaFXpert
#DigitalKnowHow
@JavaFXpert
#DigitalKnowHow
@JavaFXpert
#DigitalKnowHow
James L. Weaver
Developer / Evangelist
Twitter: @JavaFXpert
Email: jweaver@pivotal.io
http://JavaFXpert.com
http://CulturedEar.com
http://CounterpointComposer.com
Hope you enjoyed
@JavaFXpert
#DigitalKnowHow