Dylan Groenewegen (Jayco–AlUla) won the opening stage of the Tour of Slovenia in a sprint finish with Phil Bauhaus (Bahrain Victorious).