Hello.
I tried camunda spring boot and like it very much. As i worked with spring boot rest a lot in the past, i tried to add a rest controller to camunda spring boot like this:
@RestController
public class SomeTestController
{
@Autowired
private RuntimeService runtimeService;
@RequestMapping("/hellobpmn")
public SomeResult doSomethingWithTheProcessEngine(@RequestParam(value = "someProcessKey") String someProcessKey)
{
// do something with the engine (start a process or query some result)
long count = runtimeService.createProcessInstanceQuery().count();
// ...
SomeResult someResult = new SomeResult();
return someResult;
}
}
I had to add some dependencies to the pom.xml in order to be able to use @RestController (i stole them from my spring boot rest project):
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
On firing up the jar by using
java -jar camunda-spring-boot-example-1.0.0-SNAPSHOT.jar
everything seems ok, but i am not able to access the rest controller by using
http:/localhost:8080/hellobpmn
from the browser (as i am used to do).
Can you tell me what i am missing?
Thanks,
Stefan