Home > Back-end >  FlowableEngineConfig
FlowableEngineConfig

Time:03-10

@ Configuration
Public class FlowableEngineConfig {
The @autowired
Private FlowableEngineProperties FlowableEngineProperties;

//FlowableEngineConfig () {
.////ProcessEngine ProcessEngine=ProcessEngineConfiguration createStandaloneInMemProcessEngineConfiguration ()
////. SetDatabaseSchemaUpdate (ProcessEngineConfiguration DB_SCHEMA_UPDATE_FALSE)
////. SetJdbcUrl (" JDBC: h2: mem: my - own - db; DB_CLOSE_DELAY=1000 ")
////. SetAsyncExecutorActivate (false)
////. BuildProcessEngine ();
//}


@ Bean
Public DruidDataSource dataSource () {
DruidDataSource ds=new com. Alibaba. Druid. Pool. DruidDataSource ();
Ds. SetDriverClassName (". Com. Mysql. JDBC Driver ");
Ds. SetUrl (" JDBC: mysql://localhost: 3306/shiro? CharacterEncoding=utf-8 & amp; UseSSL=false ");
Ds. SetUsername (" root ");
Ds. SetPassword (" 123 qwe ");
Return the ds;
}

@ Bean
Public DataSourceTransactionManager transactionManager (DruidDataSource dataSource) {
DataSourceTransactionManager DSDM=new DataSourceTransactionManager ();
DSDM. SetDataSource (dataSource);
Return DSDM;
}

@ Bean
Public SpringProcessEngineConfiguration processEngineConfiguration (DruidDataSource dataSource, DataSourceTransactionManager transactionManager) {
SpringProcessEngineConfiguration spec=new SpringProcessEngineConfiguration ();
The spec. SetDataSource (dataSource);
The spec. SetTransactionManager (transactionManager);
The spec. SetDatabaseSchemaUpdate (" true ");
Return the spec;
}
@ Bean
Public ProcessEngineFactoryBean processEngine (SpringProcessEngineConfiguration processEngineConfiguration) {
ProcessEngineFactoryBean DBD=new ProcessEngineFactoryBean ();
DBD. SetProcessEngineConfiguration (processEngineConfiguration);
Return DBD.
}


Error

* * * * * * * * * * * * * * * * * * * * * * * * * * *
The APPLICATION FAILED TO START
* * * * * * * * * * * * * * * * * * * * * * * * * * *

Description:

Parameter 0 of method jpaProcessEngineConfigurer in org. Flowable. Spring. The boot. FlowableTransactionAutoConfiguration $JpaTransactionConfiguration required a bean of type 'javax.mail. Persistence. EntityManagerFactory' that could not be found.


Action:

Consider defining a bean of type 'javax.mail. Persistence. EntityManagerFactory' in your configuration.

CodePudding user response:

Is there a mybatis POM dependence

CodePudding user response:

Thanks for the problems found
  • Related