Which U.S. President was the last to have served in the military during the American Civil War?

History Trivia: Which U.S. President was the last to have served in the military during the American Civil War?