A criminology student who stabbed a personal trainer to death on Bournemouth beach has been jailed for 39 years.