You can’t be an expert in everything. Considering how much the Java ecosystem has grown, it’s hard to even be an expert in Java itself. The good thing is that you don’t have to be one. For many projects, especially in smaller companies, the most beneficial team setup is when each area of expertise is covered by at least one expert, but these experts don’t limit themselves to working only on that one area. Developers specialized in developing backend services can write frontend code — even if the code isn’t perfect — and the same thing goes for frontend developers. This helps move projects forward more quickly, when one person can develop a change that requires touching every layer of the application. It also leads to greater engagement during refinement meetings, as there are no tasks isolated only to a certain group of people.
Most importantly, not being strictly limited to one area changes how you approach tasks. There are no it’s not my job discussions anymore — developers are encouraged to learn. Having one person go on vacation is not an issue because there are always others who can cover for them — maybe not as efficiently, with results that aren’t quite as good, but enough to keep things moving forward. It also means that when there is a need to introduce a new technology to the stack, you don’t need to find a new team member, because existing team members are already comfortable leaving the comfort zone of their expertise.
Full-stack developer is therefore a mindset. It’s being senior and junior at the same time, with a can do attitude.