forked from Activiti/Activiti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spring Boot docs + cleaning up Spring Boot integration. Example can b…
- Loading branch information
Showing
20 changed files
with
763 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 7 additions & 19 deletions
26
...t/ProcessEngineAutoConfigurationTest.java → ...t/ProcessEngineAutoConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...e-jpa/src/test/java/org/activiti/test/spring/boot/ProcessEngineAutoConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.activiti.test.spring.boot; | ||
|
||
|
||
import javax.persistence.EntityManagerFactory; | ||
|
||
import org.activiti.engine.ProcessEngine; | ||
import org.activiti.spring.SpringProcessEngineConfiguration; | ||
import org.activiti.spring.boot.JpaProcessEngineAutoConfiguration; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; | ||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; | ||
import org.springframework.context.annotation.AnnotationConfigApplicationContext; | ||
|
||
/** | ||
* @author Josh Long | ||
*/ | ||
public class ProcessEngineAutoConfigurationTest { | ||
|
||
@Test | ||
public void processEngineWithJpaEntityManager() throws Exception { | ||
AnnotationConfigApplicationContext context = this.context(DataSourceAutoConfiguration.class, | ||
HibernateJpaAutoConfiguration.class, JpaProcessEngineAutoConfiguration.JpaConfiguration.class); | ||
Assert.assertNotNull("entityManagerFactory should not be null", context.getBean(EntityManagerFactory.class)); | ||
Assert.assertNotNull("the processEngine should not be null!", context.getBean(ProcessEngine.class)); | ||
SpringProcessEngineConfiguration configuration = context.getBean(SpringProcessEngineConfiguration.class); | ||
Assert.assertNotNull("the " + SpringProcessEngineConfiguration.class.getName() + " should not be null", configuration); | ||
Assert.assertNotNull(configuration.getJpaEntityManagerFactory()); | ||
} | ||
|
||
|
||
private AnnotationConfigApplicationContext context(Class<?>... clzz) { | ||
AnnotationConfigApplicationContext annotationConfigApplicationContext | ||
= new AnnotationConfigApplicationContext(); | ||
annotationConfigApplicationContext.register(clzz); | ||
annotationConfigApplicationContext.refresh(); | ||
return annotationConfigApplicationContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.