A classification of 2-designs with prime replication numbers and flag-transitive automorphism groups