Another case in point in the Java ecosystem is the demise of XML configs in Spring and Jakarta EE (née JEE née J2EE) in favor of annotations.
Apologies for disagreement. With Java spring (and also for example, hibernate) framework, the framework provides both options to configure (i.e, annotations and XML), but the preferred one in the context of these frameworks is annotations (which I also agree, is simpler to build java enterprise applications).