Both are excellent.
At school you enroll in a class, for example a class in Chinese History. That class continues for a semester or maybe for a year. That class contains many lessons, perhaps as many as three per week or fifty in a semester. So "class" is a broader concept than "lesson". You might say that your History class meets three times a week, but you can't say that your History lesson meets three times a week. If you like your teacher, you will say that you like your History class. If you particularly like the lecture she gave on one specific day, you would say that you enjoyed that lesson.
In #1, you are saying that the course is interesting.
In #2, you are saying that the lectures are interesting.