Hi @mbrain ,
->So you need Dependency:-
1.mysql connector java
2.Data JPA
->You have to download script from here SQL Script
→ Configure your workbench by running Script
→ If any doubt go through this link SQL with Camunda
Hi @mbrain ,
Generally we work with Spring right same here also, We will create
Repository class (JPA repository for CRUD operation)
Service class ( Service task , getting value from process and setting in one Entity object, inserting using save() method )
Entity (Creating table and defining getter setter with Needed Variable )
Instead of H2 , now we will configure our SQL Properties in Application.properties
you can go through my code Github Code
Regards,
Avinash
I have no application.properties file in my camunda spring boot starter project. Please if you can tell me how i can do it in my own project, i dont want to use yours.
See for properties we need one file if it is application.yaml then we have to follow Indentation like you have given , if we are creating application.properties then we give value:
→ the lombok dependency,
→ the spring-boot-starter-mail,
→ the camunda-connect-soap-http-client,
→ the spring-cloud-starter-config
and more.
Do i need all this stuff for a simple mysql configuration?
The camunda run bundle was way easier to configure, i just dropped the sql-connector.jar into a directory, uncomment the block in pom.xml and that was it.
What are these? The first one is Spring Data JPA, which makes handling data access easier. For more details, you may look here: Spring Data JPA
The second one is the actual connector used to communicate with the database.
Now, having these is only half of what you have to do. If you want to actually use them, as was said before, you need to configure them, which from the code you provided seems to be fine as you have it (in the application.yaml file). As a side note to this, make sure the database actually exists on your MySQL server, because otherwise your application may fail on startup.
Another note that may be of use to you: I would recommend not deleting the H2 dependency from the pom.xml file, because that my still be used during testing and your application may fail without it.