Well, the quick and dirty solution is simply not to use Java. Although the inside-out nature of JavaScript has soured me on that platform and the lack of a universal database interface like JDBC for Python means that neither of those options is as simple as they should be, either.
Spring is not JEE. It's an independent product, but its Tinker Toy™ approach to wiring components together is a very useful thing and, I'd argue a "must-have" skill for serious professional work. JEE is the essential standard for webapps as well as for services like the Java Persistence Architecture (JPA).
Java EE is simply extra libraries on top of Java SE so you use the same JDK for both platforms.
Hibernate makes database access simpler, but it can be overkill if you only want to do simple things with only a few tables. For the really lightweight stuff, JDBC is all that you need. You can either use brute-force JDBC or Spring Data's Spring JDBC module. As with Spring Data JPA, Spring handles a lot of the grunt work so you have less to code and debug.
I don't have a simple example online at the moment, but if you're looking for how a Spring Hibernate webapp looks, you might want to browse the files here:
https://gogs.mousetech.com/mtsinc7/gourmetj-springboot
The app itself is a recipe database system that allows you to enter, import, search and display your favorite recipes and you can see it in action at
https://gourmetj.mousetech.com . It's based on Spring Boot, so there's a certain amount of "magic" in there that even I don't fully understand and to make it worse, I'm using a supplement that makes it work with my favorite web GUI (JavaServer Faces, which is part of JEE).
What you might find most interesting is the
persistence directory. That's where the Hibernate JPA stuff lives. The
DAOs are the classes that access the database tables. The
model directory contains the Entity Model (table) definitions. And the
service classes are what the rest of the app uses to actually do the database logic, since often you don't work with just one table, but instead have a "working set" of related tables (such as invoice header and detail or recipe and ingredients).
The actual choice of what database type to use as well as its URL and security credentials goes into the Spring Boot configuration file(s). Spring Boot can get configuration data from a variety of sources, but I use the
application.yml to define the defaults.
I'll be happy to explain if you have any questions.
If you're interested in JavaServer Faces, it's an MVC-based UI where the Views are defined in template (.xhtml) files, and get their data from backing beans (Models). The backing beans generally also have action methods to allow business logic to be attached to the GUI. Some versions of NetBeans apparently incorrectly called them Controllers, but in
JSF, the actual MVC Controllers are all pre-written parts of JSF itself.
This project was not built with NetBeans, but you can use Maven to create the WAR. How difficult it would be to import into NetBeans I cannot say, but since it's in standard Maven project structure, shouldn't be too hard.