Java as a language totally lets you do this (and it's great!) but you'll be fighting the "culture" if you work like this in a bigger org.
In enterprise you have template repos and engineering fora where teams standardise-ish how things are done. This converges on the standard patterns, Spring, Micronaut etc.
Usually, you can deviate from these patterns at team discretion but you'll get questions from EMs and frowns from devs who roll on / off your project.
That sounds nice. Except find a company today that doesn't perceive spring framework and java as synonymous.
Tbh, its not a whole lot different than where PHP is going where php is becoming synonymous with Laravel. Wordpress is probably one of the last few bastions keeping that framework from fully owning the language.
In enterprise you have template repos and engineering fora where teams standardise-ish how things are done. This converges on the standard patterns, Spring, Micronaut etc.
Usually, you can deviate from these patterns at team discretion but you'll get questions from EMs and frowns from devs who roll on / off your project.