Profile cover photo
Profile photo
Alexandre de Pellegrin
155 followers
155 followers
About
Posts

Post has attachment
How to secure your REST API with Java Spring Security
Here is the best article I read on how to secure REST API and even make a full stateless architecture by using JWT token to store all user details. Great, great, great work by Jerome Loisel from Octo Technologies. https://octoperf.com/blog/2018/03/08/securi...
Add a comment...

Post has attachment
Avoid select min/max with Oracle
I hate select max clauses with Oracle. My company used to write subqueries which such expressions. It's slow and unreadable. Conditions in subquery with upper table create deep dependencies and awfull links between table. It doesn't allow to reuse code. Tha...
Add a comment...

Post has attachment
Download Oracle JDK from command line
Found on the web. You can adapt the url with one grabbed from Oracle JDK download page. What I love here is the fact is send Oracle licence agreement threw the header. wget --no-cookies \ --no-check-certificate \ --header "Cookie: oraclelicense=accept-secur...
Add a comment...

Post has attachment
Read a text file in on line in Java
Since Java 7, you can do this with this wonderfull line : new String(Files.readAllBytes(Paths.get(this.getClass().getResource("/file.txt").toURI()))) That makes Java powerfull and I love that.
Add a comment...

Post has attachment
Oracle 12c column lias length limit workaround
Oracle, in older version, has some limitations on column alias name length. You cannot exceed 30 characters. On my project, I use Hibernate to access database and everythings work when Hibernate plays in SQL. But, my colleague who tried to grab some data fr...
Add a comment...

Post has attachment
Kill Linux process that consumes all memory
Found on SatckOverFlow. I love it : ps eo pid --no-headers --sort=%mem | head 1 | xargs kill -9 With: ps -eo pid --no-headers --sort=%mem : display the process ids of all running processes, sorted by memory usage head -1 : only keep the first line (proc...
Add a comment...

Post has attachment
Install VMware Horizon Client (VMware View) on Ubuntu
If like me, you had issues with VMware horizon client package on your Ubuntu desktop, here are my tips. Step 1 : download the installation package https://my.vmware.com/en/web/vmware/info/slug/desktop_end_user_computing/vmware_horizon_clients/4_0#linux Step...
Add a comment...

Post has attachment
Declare secured connector on Tomcat for https connections
To access your tomcat threw https, you have to declare a secured connector. There are two parts to do that : modify your server.xml with the new connector configuration generate a java keystore the connector will refer to Step 1 : Modify your serveur.xml li...
Add a comment...

Post has attachment
Acces Apache Tomcat on port 80 or 443 from Linux
Default Linux security rules don't allow to access network ports < 1024 to non rooted processes . A bad idea would be to start your Tomcat as ROOT. Very bad idea!!! But these's another solution. You can start your Tomcat with a port > 1024 and then redirect...
Add a comment...

Post has attachment
Use Spring profiles and yaml configuration without Spring Boot
That's a refinement you can do to updgrade legacy applications. Using yaml config files combines with Spring profiles is a great way to configure your apps. Let's see how to do that. Firstly, let's consider that we weill inject something in a java class dep...
Add a comment...
Wait while more posts are being loaded