How does the Java Garbage Collector work, and how would you diagnose a memory leak in a production Spring Boot application?