I've had to relearn this for the second time, so I'll write about it.
I installed netbeans on my mac and am using JEE5 (:P), and Netbeans 7.3.1
Create a Java Web > Web Application,
and choose the Spring configuration (because I felt like it... I'm not sure if I will use it yet, but Spring plugins are attractive)
Then, go to terminal and create a few tables on postgres. Put some fake data in them.
Go back and create entities from database. Connect to the db correctly, localhost:5432 blah blah.
On the 3rd page (or something), don't use information_schema, use public. That's where the tables are.
Then, create RESTful service from entities. They'll make a bunch of RESTFacade files (in JEE6 it made me resource classes...). Then, get rid of the aopalliance error by downloading the jar and adding it to your jars. Also, add your jdbc driver into your jars.
After that, you can run and deploy it on your tomcat server (which you should have hooked up to your netbeans ide)
ALSO, to make it output JSON instead of XML, download the jersey-json jar here.
Nobody's gonna find this helpful, this was a note to self.
No comments:
Post a Comment