What is the meaning of [A thing of beauty is a joy for ever]

This is the first line of _Endymion_ by John Keats and extols the idea of
beauty. However depressed we may be, ‘Some shape of beauty moves away the pall
from our dark spirits.’ The beautiful object may perish but the joy of it
lasts as long as the memory does.