Our ORM is working so we are ready to create our JAX-RS restful webservice and implement a custom authentication mechanism. In addition I’ll provide you a class to insert dummy data into the database, so you don’t have to do it manually.
Welcome to third part of my 3-tier application tutorial. Within this and the next part we are going to develope simple webservice that communicates with the database and maps Java objects to data tables.
We will create a controller that communicates with our MySQL database using the EclipseLink ORM to abstract this process.
Here’s a picture of what we want to achieve. A simple webservice that’s serves depending on the url an array of json data.
Last time we’ve set up our basic project structure with gradle. This time we are going to create the models aka our Java classes. Below is uml diagram showing all classes, interfaces and their relationship.
If you don’t have access to you WordPress website anymore, but still can update the MySQL database. You can easily add a new admin user with this sql script:
USE <database>; SET @username = '<username>'; SET @password = MD5('<password>'); SET @fullname = '<Firstname Lastname>'; SET @email = '<login@example.com>'; SET @url = '<http://example.com/>'; INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_status`, `display_name`) VALUES (@username, @password, @fullname, @email, @url, NOW(), '0', @fullname); SET @userid = LAST_INSERT_ID(); INSERT INTO `wp_usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES (@userid, 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTO `wp_usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES (@userid, 'wp_user_level', '10'); Get the latest version of this snippet here: https://gist.
Let’s Encrypt is the latest initiative by the Internet Security Research Group (ISRG). Their goal is simple, every site on the internet has to be SSL secured.
They want to achieve that by serving an open certificate authority (CA) and also provide a tool to set up a secured site the easiest way possible.
And now the big deal about this, their service is free of charge!
If this is really a thing, it will be a disaster for the SSL economy.
Another week of hard work awaits you. If you’re stressed and loose track of your daily business, try to take some time out and listen to this relaxing playlist.
Welcome to my first post of the Java 3-tier application tutorial. In this tutorial I will tell show how you can develope a Model-View-Controller based Java desktop and server application using the latest tools and frameworks.
For those who don’t know him, Michio Kaku is great speaker and scientist. Via http://bigthink.com/ he shares his big ideas about how things works and how the future looks like. Recently I really enjoyed his thoughts about the solar power revolution and it’s cause. You should definitely check it out!