Wildfly will look for filenames with this format and process them. Create a new file that ends with “-ds.xml” (example: “my-ds.xml”). We now need to create our data source configuration file inside of the newly created WEB-INF folder. So your folder structure should now look like: Now for the last code change, let’s add a new folder structure under “main”, “webapp/WEB-INF”. We’ll revisit the idea of schema management in a future article soon. I’d rather not have Hibernate try to update or create any tables for us. Remove that entry so the properties node has nothing inside: Inside of it there is a “properties” node with one entry. Just below that, let’s add some new properties:Īnother change I’d like to make is to the existing persistence.xml file. The “build” block should now look like this: We can also eliminate the entire “plugins” block within the “build” node, as it isn’t needed anymore. Next, we need to add MySQL’s JDBC driver to our list of dependencies. If you don’t have it already, clone the original JavaEE series GitHub project. This will allow us to seamlessly upgrade versions of Wildfly without having to install JDBC drivers every time we upgrade. To kick things off, we’re going to follow a previous article I wrote and add our JDBC drivers and data source configuration to our war file that we’ll deploy to Wildfly. I’d like to revisit and expand upon that. A while ago, I created a series of articles that created a simple “todo” JavaEE service.
0 Comments
Leave a Reply. |