Did he also get it from lightning during a failed STAR LABS experiment ? Do we find any hints about this in DCEU ?
The movie does not give a lot of details about Flash's origin story but there is this dialogue between Barry Allen and one member of the Justice League:
Cyborg: I heard you have been hit by a bolt of lightning.
Barry: Something like that.
(from memory. I am not completely sure about which member of the JL - probably Cyborg from BilltheLizard's comment- is involved and cannot find the exact quote on IMDB).
So far, there is no reason to not assume that the canonical origin is not respected in the DCEU. Actually, Warner released a video to explain Flash's origin (with abstracts from the comics and Ezra Miller). You can see it in this article.
He devoted his life to prove his father's innocence until one night in his lab, Barry was struck by a bot of lightning. And the Flash was born!