Matthew 1:5-6:

And Salmon begat Booz of Rachab; and Booz begat Obed of Ruth, and Obed begat Jesse;
And Jesse begat David the king; and David the king begat Solomon of her that had been the wife of Urias;

See also:

Objection: God Can and Did “Play Favorites” with Healing; Jesus Was Only Sent to the Jews, and Gentiles Were Excluded from God’s Healing Covenant