PostDeploy in Spring Boot Starter not working after migration to 2.0.0

Hi,

I switched to spring boot starter 2.0.0 and my @PostConstruct annotation is not called anymore.
As adviced I changed to following:


If configured like this - the old way:

@SpringBootApplication
public class Application extends SpringBootProcessApplication{
....
	@PostConstruct
	public void startProcess() {
		LOGGER.info("#####################Post Construct############");
	}	
	@PostDeploy
	public void startCaseInstance(ProcessEngine processEngine) {
		LOGGER.info("#####################Post Deploy############");

PostDeploy is called.


When I configure the new way (no extends and with annotation):

@SpringBootApplication
@EnableProcessApplication
public class Application{

my @PostDeploy is not called. @PostConstruct is called.
Startup is not hanging and I get following log as well:

2017-01-27 13:39:59.552 INFO 3484 --- [ main] org.camunda.bpm.container : ENGINE-08050 Process application application successfully deployed


Did I something wrong?
Do I need to continue to extend SpringBootProcessApplication?

Thanks
Tim

Hi,

you do not longer need to extend with SpringBootProcessApplication.
Have you tried it without extending it?

I’ve just tried this in the “example-twitter” project and it worked as expected.

017-01-27 16:12:55.314 INFO 1922 — [ main] org.camunda.bpm.engine : ENGINE-00001 Process Engine default created.
2017-01-27 16:12:55.405 INFO 1922 — [ main] s.b.e.t.TwitterServletProcessApplication : #####################Post Construct############

Best regards,
Patrick

Hello Patrick,

thanks for reply.
Yes what was written the new way above I tried without extending SpringBootProcessApplication.
And yes
@PostConstruct works while
@PostDeploy works not

How about PostDeploy in your example.
Is it called?

Thanks Tim.

Ok sry, in your first post you wrote that PostConstruct isn’t working.

It looks like that we do not support this currently with the EnableProcessApplication Annotation. :confused:
So up to now you have to use the old way by extending with SpringBootProcessApplication.

@jangalinski: Is this correct?

That is correct. There already is an issue in the backlog to address this: https://github.com/camunda/camunda-bpm-spring-boot-starter/issues/184

thanks that helps. Good to know to go with the extends as long as I need this.