Pages

The SecurityContext and SecurityContextHolderare two fundamental classes of Spring Security. The SecurityContext is used to store the details of the currently authenticated user, also known as a principle. So, if you have to get the username or any other user details, you need to get this SecurityContext first. The SecurityContextHolder is a helper class, which provide access to the security context. By default, it uses a ThreadLocal object to store security context, which means that the security context is always available to methods in the same thread of execution, even if you don't pass the SecurityContext object around. Don't worry about the ThreadLocal memory leak in web application though, Spring Security takes care of cleaning ThreadLocal.

This error means your code or any external library you are using in your application is using the SLF4J library, an open source logging library, but it is not able to find the required JAR file e.g. slf4j-api-1.7.2.jar hence it's throwing Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory. If you look at the error, you will see that it's saying it is not able to find the class org/slf4j/LoggerFactory or org.slf4j.LoggerFactory. The package name indicates that it's part of SLF4j, hence you need SLF4j JAR files e.g. slf4j-api-1.7.2.jar in your application's classpath. So, go ahead and download the JAR file from SLFj website or from Maven Central repository and restart your application.

I receive a lot of queries from senior Java developers, who aspire to become software architect or solution architect e.g. what can they do to become a software architect? Which books, resources, or certifications can help? and general queries like how much experience you need to become software architect etc. In the past, I have been suggesting them individually about some books to read to expand their knowledge base and look at the software from architecture and design perspective and this article is a compilation of many of such suggestions. Since a lot of books can confuse, I have only select 5 best and must-read books from software architect perspective.

Udemy is running their flash sale this weekend, where they are offering all the courses in just $10.99 and I have been spending a lot of time going through their website to buy some of the top quality courses in this sale. If you look at the price, its nothing, if you escape snakes for 1 day you can buy a course in Udemy to learn and the best part of this is that you get the lifetime access of course. So you can use it whenever you get time, maybe this week, this month, or sometime later. I love learning and for the most part of my life, I learned by reading books but ever since I come across online courses on Udemy and Pluarlsight, I have spent most of my time learning through online courses. They are the best way to start with the new technology and get yourself up and running in no time.

If you are a web developer who wants to go into the massive world of mobile app development but don't want to spend time learning Java or Kotlin for Android development, or Objective C or Swift for iOS development then React Native could be a great tool for you. React Native is an extension of React, a popular JavaScript framework to develop web applications, which allows you to build native Android and iOs applications in JavaScript. Unlike Ionic and Cordova which promotes write once run everywhere but doesn't offer you to create a native app, React Native does convert your code into native code, especially for GUI.

If you are a computer science graduate or someone who is thinking to make a career in software development world or an experienced programmer who is thinking about his next career move but not so sure which field you should go then you have a come to the right place. In this article, I will tell you the top 10 highest paying technical jobs you can aim for. All you need is some programming experience and a passion for learning. Particularly the Machine learning and Data science field looking very promising for both beginners and experienced programmers. On average a machine learning specialist and Data Scientist make around anywhere from $110,000 USD to $120,000 and there is a huge demand for them and if you are interested in solving real-world problems they present an exciting opportunity.