Getting started with Gradle

It’s been a long time since gradle become so popular framework.Year ago I tried to build one project using gradle with my coworkers, but as for me, I didn’t understand all the upsides and downsides of this framework. So, today I dedicated one day for investigating this framework and I would like to make some review of it. The author of this beatiful framework is Hans Dockter Gradle is a dynamic build tool. That’s mean, that you can use this build tool not only for java, but for any language, that can provide plugin for itselft. Gradle is a live project. I mean, Gradle is one of the biggest open source projects in the world, there is 1.5 million builds using gradle every day. ##Agenda Gradle setup Short introduction to Gradle Build Single Module Project setup ####Gradle setup If we are using Windows or Linux or OS X, we can install Gradle by following steps: Download the binaries from the downloads page. Unpack the zip file and add the GRADLE_HOME/bin directory to the PATH environment variable. On linux or OS X, just do following: Open your terminal Type nano .bashrc And modify this file as in example below Then restart...

Spring Security: Avoiding Basic Authentication window in your browser

While tunnning your Spring application with Basic Authentication security you can notice that you are receiving Basic Aithentication window in your browser. The problem is with BasicAuthenticationEntryPoint that sends header WWW-Authenticate: Basic realm="nmrs_m7VKmomQ2YM3:" So, if you don’t want to receive this window in your browser, just create Custom Entry Point:

Portfolio

###ivanursul.elance.com On this page I put projects, where I was involved.Some of the projects were just backend web services, some were full stack applications.Anyway, if you are interested in hiring me as a frelance developer, you should learn about this projects: ###Online Booking system for restaurants #####www.egogso.com To be honest, this was my first project, where I was as a developer.I remember, that I was just a junior java developer with some contradictory skills. The real issue was with my team - actually, nobody could review me, because I didn’t have senior developers on the project.So, it was a risky project for me. Anyway, I finished him. Later, I switched to another company, so I don’t much about this project for now. I use: Java 1.7 Spring 3.0 Hibernate(Can’t remember version) Twitter bootstrap Backbone.js Digital Ocean as a cloud server ###Accountant system. #####as.egogso.se This was my second project, on which I worked as a backend developer.This was a project, where I started to use unit tests, database migrations, maven multi-module structure, and so on.This also was a project, where I realized why I should use JSR and specifications I use: Spring 4.0 JPA(Hibernate) Maven 3 Jenkins PostgreSQL Liquibase ###Simple Save...

Java - MetaSpace vs PermGen

It’s been a long period since Java 8 was introduced.New Java comes with a lot of new features. One of these features is the complete removal of the Permanent Generation (PermGen) space which has been announced by Oracle since the release of JDK 7. Interned strings, for example, have already been removed from the PermGen space since JDK 7. The JDK 8 release finalizes its decommissioning. This article will share the information that I found so far on the PermGen successor: Metaspace. The final specifications, tuning flags and documentation around Metaspace should be available on Java 8 official documentation. Metaspace The JDK 8 HotSpot JVM is now using native memory for the representation of class metadata and is called Metaspace; similar to the Oracle JRockit and IBM JVM’s. The good news is that it means no more java.lang.OutOfMemoryError: PermGen space problems and no need for you to tune and monitor this memory space anymore…not so fast. Instead of java.lang.OutOfMemoryError: PermGen you are now able to receive java.lang.OutOfMemoryError: Metadata space .While this change is invisible by default, we will show you next that you will still need to worry about the class metadata memory footprint. Please also keep in mind that...

JHipster context is not loading on DigitalOcean cloud server

Few weeks ago I started to work with JHipster - Java Framework for rapid development.I am not going to write a review of this framework - I hope, I will find time to do it later, but today I am going to write some useful information about pitfalls, that you can reach during your work with JHipster. #####Jhipster project unable to start itself on digitalocean Just FYI, Jhipster is built on top of Spring Boot Framework + Angular JS, so to start application, you need just to execute single command mvn spring-boot:run That’s a convenient way for deploying application - no separate application servers, only embedded, only hardcore. That’s why Spring Boot stores some embedded tomcat server, which contains all properties. So, the problem is that sometimes, when you deploy your application on Digital Ocean cloud server - you need to wait for a long time to finish deploying process. In my case, the problem with long deploy is that Tomcat loves to use /dev/random function, instead of /dev/urandom. To get a good example of how random and urandom works, just go to terminal and type cat /dev/random Then try to move your mouse, you will receive additional values. Then...