A guide to using JSON Web Tokens with both symmetric and asymmetric signing in Spring Security OAuth.
Baeldung Author
Eugen Paraschiv
I’m a software engineer with a passion for REST, TDD and clean code, Web Security and Data Mining. Baeldung is about all of these and more.
Here's what I've written (so far):
Baeldung on Java
- All
- Weekly Review (152)
- Spring (38)
- Spring Security (29)
- Java (29)
- Guava (27)
- REST (23)
- HTTP Client-Side (20)
- JSON (19)
- Jackson (18)
- Data (17)
- Java Collections (12)
- Testing (9)
- Spring MVC (8)
- Maven (7)
- JPA (7)
- Spring Persistence (6)
- Persistence (6)
- Spring Web (5)
- Java String (5)
- Spring Data (4)
- Spring Boot (4)
- Programming (4)
- Security (2)
- Java Array (2)
- Cloud (2)
- Java Map (1)
- Java Concurrency (1)
Java Scanner
Filed under Java
A quick and practical set of examples for using the core Scanner Class in Java – to work with Strings, Files and user input.
Tabnine – My First Experience Working with an AI Assistant in Java
Filed under Programming
A quick exploration of Tabnine – a really cool coding assistant that make development simpler, and most importantly – a lot faster.
The State of Java in 2018
A clear look at the Java ecosystem in 2018.
Spring MVC Tutorial
Filed under Spring MVC
Spring MVC configuration – both Java and XML – on a simple Spring MVC project.
Java in 2017 Survey Results
The final results of the “Java in 2017” Survey.
Java Web Weekly, Issue 155
Filed under Weekly Review
A quick review this week, but one with some depth to it. And of course some Hibernate goodness.
Java Web Weekly, Issue 154
Filed under Weekly Review
An packed week with solid talks on Java 9 and of course the upcoming Spring reactive stuff, microservices and tracing requests through a distributed system.
Java Web Weekly, Issue 153
Filed under Weekly Review
Reactive is slowly becoming mainstream (both in and outside of Spring), proper logging is more important than ever and AWS is launching a host of new instance types.
Java Web Weekly, Issue 152
Filed under Weekly Review
This week we’re talking about the JCP, the ELK stack and missing features in the Java streams implementation. Plus a host a fantastic talks.
Java Web Weekly, Issue 151
Filed under Weekly Review
Looking beyond Java 9, going back to basics with value objects and developer productivity. Overall, an interesting and diverse week.
Java Web Weekly, Issue 150
Filed under Weekly Review
Lots of great releases in the Spring ecosystem, a look at the performance improvements in Java 9 and some job negotiation advice that could make a difference.
Java Web Weekly, Issue 149
Filed under Weekly Review
This week was focused on Java 9, new Spring Cloud goodness and finally getting Guava 20. Good stuff all ’round.
Java Web Weekly, Issue 148
Filed under Weekly Review
A week focused on Microservices, JUnit 5 and good DNS practices to become more resilient to DDOS attacks.
Java Web Weekly, Issue 147
Filed under Weekly Review
An interesting week with a clear focus on the reactive programming trend that’s seeing traction in the Java community.
Java Web Weekly, Issue 146
Filed under Weekly Review
This week is all about Hibernate it seems, with some great JavaOne roundups and talks and a solid writeup on microservices.
Java Web Weekly, Issue 144
Filed under Weekly Review
This week is all about reactive – both in the upcoming Spring 5, but also RxJava and Reactor 3. A very interesting week, full of solid writeups.
Java Web Weekly, Issue 143
Filed under Weekly Review
Java 9 is officially delayed, we have a new schedule for Java EE 8 as well, and also lots of cool stuff coming out of JavaOne.
Java Web Weekly, Issue 142
Filed under Weekly Review
New info about Java EE, an insightful breakdown of Java framework usage and an all to real look at how Eclipse is doing in 2016 (not great).
Java Web Weekly, Issue 141
Filed under Weekly Review
A packed week starting with a deep-dive into Java 9, lots of SpringOne talks, a solid writeup on ElasticSearch tuning and a piece about troubleshooting
Java Web Weekly, Issue 140
Filed under Weekly Review
A packed list of great writeups this week, with a clear focus on security, a great JUnit 5 cheat sheet and some Java 8 collectors goodness.
Java Web Weekly, Issue 138
Filed under Weekly Review
A forward-looking week of content, talking about JUnit 5, reactive programming and the plans for Java EE 8.
Registration with Spring – Integrate reCAPTCHA
Filed under Spring Security
A quick guide on how to integrate Google’s reCAPTCHA to the user registration process in order to differentiate human from bots.
Java Web Weekly, Issue 137
Filed under Weekly Review
A relaxed week after SpringOne, but still chock full of goodness with the new plans for Spring 5, a solid analysis of the code of reflection among other things.
Introduction to Thread Pools in Java
Filed under Guava, Java Concurrency
Quick and practical guide to different ThreadPool implementations in Java and Guava.
Java Web Weekly, Issue 136
Filed under Weekly Review
An packed week starting with Hibernate advice and SpringOne and wrapping up with technical debt and the impact it can have on teams.
Java Web Weekly, Issue 135
Filed under Weekly Review
Form one step closer to Spring 5 to low level JVM compiler optimizations – some solid writeups this week.
Java Web Weekly, Issue 134
Filed under Weekly Review
The Java “State of the Union”, a look at JUnit 5 and some cool notes on reactive programming – quite an interesting week.
Java Web Weekly, Issue 133
Filed under Weekly Review
The first milestone of JUnit 5 is out, we have another solid deep-dive into the issues of a persistence solution and some of the best StackOverflow questions ever.
Java Web Weekly, Issue 132
Filed under Weekly Review
Quite an interesting week with Java 9 almost ready to commit to a hard date, a solid HATEOAS writeup for the Spring ecosystem and lots of releases and goodness.
Java Web Weekly, Issue 131
Filed under Weekly Review
Java 9 ads new Optional goodness, some good advice on public speaking and all about JIT compilation this week.
Java Web Weekly, Issue 129
Filed under Weekly Review
A news heavy week with JDK 9 missing feature completion, some Java EE 8 turmoil, on the release of Spring 4.3.
The Market Share of Java IDEs in Q2 2016
Filed under Programming
Very interesting numbers showing IntelliJ picking up users from both Eclipse and other IDEs in the last couple of years.
Java Web Weekly, Issue 128
Filed under Weekly Review
This week, some cool writeups all about reactive programming coming to Spring as well as insights out of a huge dataset of Java exceptions.
Java Web Weekly, Issue 127
Filed under Weekly Review
A well thought out writeup on deploying to production with Spring and some solid advice on why events make a lot of sense for microservices.
Java Web Weekly, Issue 126
Filed under Weekly Review
An interesting and diverse week, from some Java persistence goodness to a well-executed Spring Boot migration and the LinkedIn data breach.
Java Web Weekly, Issue 125
Filed under Weekly Review
Another solid week with a lot of releases, some interesting blogging plans and a host of good talks.
Java Web Weekly, Issue 124
Filed under Weekly Review
A deeper look at the upcoming JUnit 5, the new version of Spring Security and some interesting musings on how code reviews are shaping our industry.
Java Web Weekly, Issue 123
Filed under Weekly Review
Some cool additions to Spring Data, o solid piece on Hypermedia APIs and of course musings on microservices. A pretty good week.
Conferences in May
Filed under Spring
After reading the enthusiastic Join me at GeeCON article I was inspired to do a quick writeup about the conferences that are coming up in the month of May. I’m super excited about May; first off, there’s GeeCON, starting on the 11th and wrapping up on the 13th and then SpringIO in Barcelona, on the […]
Java Web Weekly, Issue 122
Filed under Weekly Review
Some interesting Hibernate goodness, a fun read about startups and a new course I’m excited about. All in all, a good week.
Java Web Weekly, Issue 121
Filed under Weekly Review
A packed week with thoughts on Java generics, the state of Java EE and lots of Kotlin goodness.
Java Web Weekly, Issue 120
Filed under Weekly Review
A packed with with a focus on JUnit 5, the second RC of Spring Boot and avoiding burnout as a programmer. Good stuff.
Java Web Weekly, Issue 118
Filed under Weekly Review
Jenkins 2, JUnit 5, Spring 5 – yeah, we’re definitely getting close to some exciting releases. A solid week chock full of solid writeups.
Java Web Weekly, Issue 117
Filed under Weekly Review
Local variable type inference, a quick and useful way of running your JUnit tests more predictably and the first RC of Spring Security 4.1 – an exciting week.
Spring and Spring Boot Adoption in March 2016
Filed under Spring Boot
New numbers on the Spring and Spring Boot adoption in the ecosystem in March 2016.
Java Web Weekly, Issue 116
Filed under Weekly Review
An interesting week focused on culture, hiring and firing but definitely also on the upcoming developments in Java 9 and Spring 5.
Java 8 Adoption in March 2016
Filed under Java
New numbers for the adoption of Java 8 in March of 2016.
Java Web Weekly, Issue 115
Filed under Weekly Review
The details of Spring IO are out, Java 10 might be getting a significant syntax upgrade and the talks that have come out this week are quite interesting. Not too shabby.
The “Java and Spring in 2016” Survey
Running the Java and Spring 2016 Survey here on Baeldung.
Java Web Weekly, Issue 114
Filed under Weekly Review
Some solid writeups this week, from maintaining an API for multiple versions of Java, to what’s happening with the Unsafe cleanup in Java 9.
Java Web Weekly, Issue 113
Filed under Weekly Review
JUnit 5 is picking up the pace, lambdas are still fun to play with and a host of solid talks for the weekend. A good, interesting week.
Java Web Weekly 112
Filed under Weekly Review
An interesting week with JUnit finally moving forward, new Hibernate documentation and some reactor updates in the Spring ecosystem.
Java Web Weekly, Issue 111
Filed under Weekly Review
Some very interesting writeups this week, from API design principles to security breaches and the plans for Spring 5.
Java Web Weekly 110
Filed under Weekly Review
A deep dive into JVM level optimizations coming to JDK 9, a cool intro to Hystrix to build up architecture resiliency and a few other solid writeups this week.
Returning Custom Status Codes from Spring Controllers
Filed under Spring MVC
This article demonstrates two ways to return custom HTTP status codes from Spring MVC controllers: using ResponseEntity and using exceptions.
Java Web Weekly, Issue 109
Filed under Weekly Review
A solid week with some interesting pieces on general application security, the Java browser plugin and Hibernate training. Cool stuff.
Java Web Weekly, Issue 108
Filed under Weekly Review
A very interesting deep-dive into feature toggles, a host of Groovy talks and some good Java advice. This week dropped some knowledge on our collective asses.
Java Web Weekly Issue 107
Filed under Weekly Review
Cool writeups this week – from a deep dive into less known nuances of the Java Stream API, through JPA focused test-cases for Hibernate and productivity tips.
Java Web Weekly 2
Filed under Weekly Review
The Java language has seen huge growth in 2015, good API design is as difficult as ever and good git commits are actually possible. A solid first week of 2016.
Java Web Weekly 1
Filed under Weekly Review
A quick holiday week with a few solid topics such as multiline String support in Java and hiring developers well. Happy New Year.
Introduction to Spring Batch
Filed under Spring
A quick guide to using Spring Batch for a simple but practical scenario – moving some data from CSV to XML.
Intro to Spring Security LDAP
Filed under Spring Security
A simple and practical guide to using LDAP and LDIF with Spring Security.
Java Web Weekly 52
Filed under Weekly Review
A busy holiday week for the whole Java ecosystem – an alternative to the deprecation JEP, lots of good talks and an intelligent writeup about giving advice.
Java Web Weekly 51
Filed under Weekly Review
Interesting writeups this week from reducing the GC overhead of your app, to a new HTTP status code – the 451 and the evolution of the way Java does versions
Java Web Weekly 50
Filed under Weekly Review
A solid week, as we’re edging closer to 2016, with good writeups on the Java 8 Streams API, the memory consumption of a Spring app, and some Mockito goodness.
Simplify the DAO with Spring and Java Generics
Filed under Spring Persistence
Simplify the Data Access Layer by using a single, generified DAO, which will result in elegant data access, no unnecessary clutter.
Java Web Weekly 49
Filed under Weekly Review
From the schedule push of Java 9 to a lot of Spring goodness, this week was certainly packed with solid writeups.
Java Web Weekly 48
Filed under Weekly Review
The Java ecosystem is moving forward this week with most writeups about Java 8 and 9, along with the first cool JUnit prototype.
Java Web Weekly 47
Filed under Weekly Review
Lots of releases – Spring and otherwise, a solid writeup about dates and additional Java One notes. A cool week.
REST Query Language with Querydsl Web Support
Filed under Persistence, REST, Spring
A quick intro to the web support in Spring Data JPA Querydsl and how to easily set that up within a REST API.
JSON in Java
Learn how to start working with JSON data in Java.
Java Web Weekly 46
Filed under Weekly Review
Some solid Java 9 writeups this week, a cool analysis of Spring Session and a couple a interesting musings on good communication.
Java Web Weekly 45
Filed under Weekly Review
This week was focused on Java 9 and persistence, with a few solid releases layered in.
Java Web Weekly 44
Filed under Weekly Review
Quite an interesting week for the Java ecosystem, with Java One wrapping up yesterday and a ton of fixes in a new JDK release.
Java Web Weekly 43
Filed under Weekly Review
Solid deep-dives this week as well as a host of Spring presentations and of course some musings about architecture and teams.
Java Web Weekly 42
Filed under Weekly Review
An interesting and diverse week with some cool CQRS pieces, a quick foray into CI and a round of discoverability.
Java Web Weekly 41
Filed under Weekly Review
From a look into Java EE 8 Controllers, the new Spring STS to some must-read musings about freelancing – this week was solid.
Java Web Weekly 40
Filed under Weekly Review
A lot of Spring goodness this week, along with a few strong Ops pieces on orchestrating a deployment for a microservice architecture, or opening up log data.
Java Web Weekly 39
Filed under Weekly Review
A light week with some great writeups on Event Sourcing, caching static artifacts and some good advice on positioning.
Java Web Weekly 38 (formerly the “Baeldung Weekly Review”)
Filed under Weekly Review
A name change for the “Baeldung Weekly Review”, API Hypermedia controls, soft assertions and a strong focus on shipping your work. A great week.
Baeldung Weekly Review 37
Filed under Weekly Review
The module system due in Java 9 is quickly moving forward, CQRS and Event Sourcing are gaining ground and Spring Boot plays well with JAX-RS to make up a very diverse week.
Apply CQRS to a Spring REST API
Learn how to start moving an existing Spring REST API towards a CQRS-centric architecture.
Baeldung Weekly Review 36
Filed under Weekly Review
A few solid Spring releases, some great insights into DDD and CQRS and a new way to work with SQL from Java. A good week.
Baeldung Weekly Review 35
Filed under Weekly Review
An even spread this week between solid Spring writeups on microservices and the odd DDD focused piece. Some solid reading.
Baeldung Weekly Review 34
Filed under Weekly Review
Definitely a good week with a JDK release, some Spring coolness and musings about stepping out of your comfort zone.
Baeldung Weekly Review 33
Filed under Weekly Review
Some interesting pieces this week, about the new Java REPL, mixing Clojure with Java and Spring and application tuning and profiling.
Baeldung Weekly Review 32
Filed under Weekly Review
Spring 4.2 is out this week, along with a deep dive on Jigsaw and a host of other goodness. Definitely a packed week.
Baeldung Weekly Review 31
Filed under Weekly Review
Mapping Akka, handling properties elegantly and the Java 9 REPL – a pretty good week.
Baeldung Weekly Review 30
Filed under Weekly Review
Further Java 9 news, testing web apps with the page object pattern and a great look at static analysis benefits.
A Guide To Spring Redirects
Filed under Spring MVC
A guide to redirect and forward in Spring MVC, with a focus on the code and implementation of each strategy.
Baeldung Weekly Review 29
Filed under Weekly Review
Feedback on JDK9, the sun.misc.Unsafe removal discussion and some cool upgrades – all in the course of one week.
Baeldung Weekly Review 28
Filed under Weekly Review
Java 9, DevOps and Microservices. Despite the buzzwords, some good pieces this week.
Baeldung Weekly Review 27
Filed under Weekly Review
A week chock-full of Spring releases. A nuanced discussion on the trade-offs of microservices. And a piece on office politics. A good week overall.
Baeldung Weekly Review 26
Filed under Weekly Review
Eclipse Mars is out this week, along with a very good piece on putting a Gateway in front of your Microservices and some cool stuff out on AWS.
Baeldung Weekly Review 25
Filed under Weekly Review
An eventful week with writeups about Java 9 and Spring Boot 1.3 ramping up.
Baeldung Weekly Review 24
Filed under Weekly Review
A good rebuttal of the “start with a monolith” piece from last week, some very cool ETag support in Spring Data REST and a discussion of Java testing tools.
Jackson Annotation Examples
The core of Jackson is basically a set of annotations – make sure you understand these well.
Baeldung Weekly Review 23
Filed under Weekly Review
This week is chock-full of solid writings – from what what the role of a senior developer is all the way to microservices and monoliths. A good week.
Configure a Spring Boot Web Application
Filed under Spring Boot
Some of the more useful configs for a Spring Boot application.
Jackson – Decide What Fields Get Serialized/Deserialized
How to control which fields get serialized/deserialized by Jackson and which fields get ignored.
Jackson – Working With Maps and Nulls
How to serialize Maps with a null key or null values using Jackson.
Survey Results – Java 8, Spring 4 and Spring Boot Adoption
Filed under Java, Spring Boot
Survey results on the adoption of Java 8, Spring 4 and the newer Spring Boot across the industry.
Baeldung Weekly Review 22
Filed under Weekly Review
Quite an interesting week with the release of the first RC of Spring 4.2 and some solid pieces on Microservices and CQRS.
Baeldung Weekly Review 21
Filed under Weekly Review
The weekly takeaways include a good overview of monitoring solutions, some cool notes on testing an Angular+Spring app and of course my ongoing survey.
A Guide To Caching in Spring
Filed under Spring
How to enable, configure and make good use of the Caching Abstraction in Spring.
Baeldung Weekly Review 20
Filed under Weekly Review
Quite a diverse week with some solid pieces on the Spring blog and the mandatory microservices post.
Baeldung Weekly Review 19
Filed under Weekly Review
An interesting week with the announcement of the Java 9 timeline as well as some cool pieces on distributed systems and a host of Spring talks. Good stuff.
Baeldung Weekly Review 18
Filed under Weekly Review
A light week with a few good pieces on caching in Hibernate, Eclipse Mars and general life advice.
Baeldung Weekly Review 17
Filed under Weekly Review
A week full of must-reads – from pragmatic career advice for developers that are new in the field, to solid, grounded advice on password use.
Baeldung Weekly Review 16
Filed under Weekly Review
A solid week discussing accidental complexity, microservice topologies and great commit messages.
REST Query Language with RSQL
Filed under Persistence, REST, Spring
Lean how to implement a Search/Query Language for a Spring REST API using the standard Feed Item Query Language instead of a custom syntax.
Baeldung Weekly Review 15
Filed under Weekly Review
Clean tests, logging management solutions and Java 8, and some very cool releases from AWS. A packed week.
Updating Your Password
Filed under Spring Security
How to enable the user to update/change their own password after logging into the app.
Baeldung Weekly Review 14
Filed under Weekly Review
Testing and Spring goodness this week, as well as some musings about introversion and leadership. A good, diverse week.
Metrics for Your Spring REST API
How to implement and graph HTTP metrics into a Spring REST API – status code counts, counts by request, time-series data, etc.
Baeldung Weekly Review 13
Filed under Weekly Review
Major Spring releases this week and some great insights into working in corporate and working for yourself. Day and Night.
The Registration API becomes RESTful
Filed under REST, Spring Security
Making the Registration API more RESTful and adapting the front-end to correctly consume it.
Baeldung Weekly Review 12
Filed under Weekly Review
Microservices? Check. Top 10 lists? Check. Great Comics? Check. All in all, quite a diverse week.
Baeldung Weekly Review 11
Filed under Weekly Review
An interesting and diverse week, from the plans for Java 9 to joys of Yak Shaving. Enjoy.
Baeldung Weekly Review 10
Filed under Weekly Review
A new JEP slated for Java 9, some cool advancements for dealing with the Http Session (finally) and a piece about “Why NOT git”. A cool week all in all.
Authenticating with Reddit OAuth2 and Spring Security
Filed under HTTP Client-Side, Spring Security, Spring Web
A quick introduction to how to authenticate your application with Spring Security and the Reddit OAuth2 API.
Baeldung Weekly Review 9
Filed under Weekly Review
First – time to upgrade Spring with all the new releases this week. And of course a host of cool articles, such as an exploration of code ownership models.
Spring Security Registration – Resend Verification Email
Filed under Spring Security
If the user registers and forgets to verify their account, the verification link will expire. This is how to allow them to request a new one.
REST Query Language – Advanced Search Operations
Filed under Persistence, REST, Spring
How to implement a mature, tested Query Language for a REST Search API, using Spring and Spring Data JPA Specifications.
Baeldung Weekly Review 8
Filed under Weekly Review
HTTP 2 is final – the big news of this week (it has been a while since the last one). Also – some cool deep dives into the JVM and Hibernate.
Spring Security – Reset Your Password
Filed under Spring Security
Every app should enable users to change their own password in case they forget it.
Prevent Brute Force Authentication Attempts with Spring Security
Filed under Spring Security
Block users by IP after a number of failed authentication attempts – a simple mechanism implemented with Spring Security.
Baeldung Weekly Review 7
Filed under Weekly Review
A busy week for the Spring ecosystem, with Spring 4.2 getting closer and closer. A discussion about timezones as well – what more do we need?
Baeldung Weekly Review 6
Filed under Weekly Review
Some great Java back-to-basic articles, insights into building APIs and a discussion about backups. Good first week of February in my book.
Spring JPA – Multiple Databases
Filed under JPA, Spring Data
How to set up Spring Data JPA to work with multiple, separate databases.
REST Query Language with Spring Data JPA and Querydsl
Filed under REST, Spring Data
How to build a search/filter functionality into a REST API with Spring and Querydsl.
Baeldung Weekly Review 5
Filed under Weekly Review
A reference Spring piece on building a proxy, a deep dive into Java 8 and a good read on Agile (of all things) – all in all, a pretty good week.
REST Query Language with Spring Data JPA Specifications
Filed under REST, Spring Data
How to implement a query language for a REST API using Spring Data Specifications.
REST Query Language with Spring and JPA Criteria
An introduction to implementing a simple but very useful serach/filter operation on your Spring REST APIs using JPA Criteria.
Spring JDBC
Filed under Spring Persistence
Introduction to the Spring JDBC abstraction, with example on how to use the JbdcTempalte and NamedParameterJdbcTemplate APIs.
Baeldung Weekly Review 4
Filed under Weekly Review
A lot of great reads this week, starting with some Spring Security goodness, a number-heavy benchmark of the Java parallelism frameworks and of course some Dilbert.
Baeldung Weekly Review 3
Filed under Weekly Review
Lots of Spring reference articles this week and of course the Java 8 goodness we’ve all come to expect by now. Also – the first time I include the “Pick of the Week” right in the review.
Spring Security – Roles and Privileges
Filed under Spring Security
How to map Roles and Privileges for a Spring Security application: the setup, the authentication and the registration process.
Baeldung Weekly Review 2
Filed under Weekly Review
Full steam ahead – some solid Java 8 pieces and Java 9 news, a few Spring tutorials to take note of and of course, the great technical musings of the week.
Registration with Spring Security – Password Encoding
Filed under Spring Security
How to encode password when registering (and authenticating) a new user – with Spring Security and BCrypt.
My Weekly Reviews of 2014
Filed under Weekly Review
All the Baeldung weekly reviews of 2014.
Baeldung Weekly Review 1
Filed under Weekly Review
The first review of 2015 and some interesting Java 8 and Java 10 (yeah) information, as well as a handful of highly useful musings and ruminations.
Jackson – Bidirectional Relationships
How to use Jackson to break the infinite recursion problem on bidirectional relationships.
Posting with Apache HttpClient
Filed under HTTP Client-Side
How to POST with HttpClient 4 – from a basic request, to authentication, multipart requests, uploading files and tracking the progress of long running operations.
Baeldung Weekly Review 51
Filed under Weekly Review
A quiet week with a few good articles but not a whole lot of activity overall. Also the last review of 2014 – enjoy this one.
Top 10 Articles on Baeldung from 2014
Filed under Programming
Here are the most read articles on the site written in 2014.
Jackson Exceptions – Problems and Solutions
The most common Jackson exceptions – the cause of the problem and the solution for each one.
Transactions with Spring and JPA
Filed under JPA, Spring Persistence
How to best set up Transactions in Spring – the configuration, Transaction Propagation and which layer should have Transactional Semantics.
Baeldung Weekly Review 50
Filed under Weekly Review
JDK 9 modularization news, Java 8 streams and Spring Boot – what more can you expect from a good week like this one?
Jackson JSON Views
How to use the @JsonView annotation in Jackson to perfectly control the serialization of your objects (without and with Spring).
Baeldung Weekly Review 49
Filed under Weekly Review
One of the more eventful weeks of the year, with some fantastic Spring Boot pieces (and new releases), musings on CQRF and a good read on Flexibility vs Simplicity.
How To Do @Async in Spring
Filed under Spring
How to enable and use @Async in Spring – from the very simple config and basic usage to the more complex executors and exception handling strategies.
Baeldung Weekly Review 48
Filed under Weekly Review
A long list of solid pieces this week, starting with some good practices for non-trivial Java projects, to more JDK 9 news and a lot of cool Spring stuff being released.
Registration – Activate a New Account by Email
Filed under Spring Security
Verify newly registered users by sending them a verification token via email before allowing them to log in – using Spring Security.
Apache HttpAsyncClient Tutorial
Filed under HTTP Client-Side
HttpAsyncClient Tutorial – send a basic GET request, use the multi-threaded client, set up the client with SSL as well as with a proxy, and finally – do authentication.
Best Java Sites
Filed under Java
The Best actively maintained sites in the Java ecosystem.
Baeldung Weekly Review 47
Filed under Weekly Review
Lot happening in Java land – starting with how to understand and tune your severs. Some very interesting uses of Spring Boot and the new Spring Session project.
Baeldung Weekly Review 46
Filed under Weekly Review
This week we got some visibility into Java 9, a great microservice deck and tips and tricks for using thread pools.
Java – Directory Size
Filed under Java
Calculate the Size of a Directory with Java 6, 7 and 8 as well as Apache Commons IO and Guava.
Guava CharMatcher
Filed under Guava
Use the Guava CharMatcher to work with Strings – remove special chars, validate, trim, collapse, replace and count among other super useful APIs.
Getting Started with Mockito @Mock, @Spy, @Captor and @InjectMocks
Filed under Testing
How to use annotations in Mockito – @Mock, @Spy, @Captor and @InjectMocks and the MockitoJUnitRunner to enable them.
Baeldung Weekly Review 45
Filed under Weekly Review
This week was all about the next version of Java – the language is definitely not standing still. That and a host of useful Spring replays from SpringOne.
Spring Events
Filed under Spring
The Basics of Events in Spring – create a simple, custom Event, publish it and handle it in a listener.
Serve Static Resources with Spring
Filed under Spring MVC
How to map and handle static resources with Spring MVC – use the simple configuration, then the 3.1 more flexible one and finally the new 4.1 resource resolvers.
Spring Profiles
Filed under Spring
How to define and use Profiles in Spring. The 4 ways to enable profiles and their precedence. And a real-world example using profiles.
Baeldung Weekly Review 44
Filed under Weekly Review
This was quite a week and so we have an interesting roundup. Lots of solid Java and Spring articles as well as some other useful pieces on leadership and affecting positive change.
Mockito – Using Spies
Filed under Testing
Making good use of Spies in Mockito, and how spies are different from mocks.
Guava – Maps
Filed under Guava
Working with the Guava Map support to create immutable, sorted, bi and multi maps, as well as other useful map implementations.
Build a REST API with Spring and Java Config
Building a REST Service with Spring and Java based Configuration, HTTP response codes, REST payloads and marshalling, testing.
Guava – Sets
Filed under Guava
Working with Sets in Guava – intersection, union, cartesian product, set of ranges and other useful code samples.
Guava – Lists
Filed under Guava
Work with Lists in Guava – clean duplicates and nulls from the list, reverse it and partition it – or convert it to an ImmutableList.
Java Timer
Filed under Java
Using the Java Timer and TimerTask to get the most out of it. Schedule a delayed one time task, a daily task or just repeat on an interval. Cool beans.
Baeldung Weekly Review 43
Filed under Weekly Review
This week is definitely Spring heavy – lot of solid Spring Boot pieces that show how the framework is maturing. Some interesting JVM articles as well.
Guava – Write to File, Read from File
Filed under Guava
How to Write to File and Read from a File using the Guava IO support and utilities.
Baeldung Weekly Review 42
Filed under Weekly Review
A week about Agile, building communities and patch operations in Spring – so not a bad week.
Guava – Join and Split Collections
Filed under Guava, Java Collections
How to use the Guava Splitter and Joiner to convert to and from collections and Strings.
The @Scheduled Annotation in Spring
Filed under Spring
How to use the @Scheduled annotation in Spring, to run tasks after a fixed delay, at a fixed rate or according to a cron expression.
Baeldung Weekly Review 41
Filed under Weekly Review
Wide array of articles from HTTP/2 moving forward, through using testing as the main driver of your design and to the useful lessons in Microservices.
Filtering and Transforming Collections in Guava
Filed under Guava, Java Collections
Filter collections with Predicates and transform them with Functions using the Guava library.
The Baeldung Weekly Review 40
Filed under Weekly Review
Some solid articles this week, on code coverage (being a useless metric), interesting JSON Patch Spring experiments and a new installment in the Chess TDD Series.
Guava Cache
Filed under Guava
How to use the Guava Cache – from a simple usecase to eviction of elements, refresh and preload of the cache and removal notifications.
Java – Generate Random String
Filed under Java String
Generate Bounded and Unbounded Random Strings using plain Java and the Apache Commons Lang library.
The Baeldung Weekly Review 39
Filed under Weekly Review
Some interesting discussions this week on microservices and solid testing tactics for working with legacy code.
Java – Write to File
Filed under Java
The many ways to write data to File using Java.
The Baeldung Weekly Review 38
Filed under Weekly Review
Quick and to the point review this week – a solid JUnit tutorial series, a great article on persistence – specifically on long update operations and one my favorite XKCD series.
The Baeldung Weekly Review 37
Filed under Weekly Review
The longest weekly review since January – lots of great Java and Spring articles, interesting testing pieces and some good comics.
The Baeldung Weekly Review 36
Filed under Weekly Review
An interesting Java focused week, as well as a few Spring announcement and a lot of talk around persistence in general and Hibernate in particular.
Gson Serialization Cookbook
Filed under JSON
Learn how to serialize entities using the Gson library.
The Baeldung Weekly Review 35
Filed under Weekly Review
Spring 4.1 is out this week, along with some cool predictions of the next Java Random and some pragmatic musings about testing and goal setting. A good week all in all.
The Baeldung Weekly Review 34
Filed under Weekly Review
This week we’re looking at Spring Boot articles, some solid insights into learning and staying relevant as an engineer and of course – XKCD genius.
Login for a Spring Web App – Error Handling and Localization
Filed under Spring MVC, Spring Security
How to implement a Login Page for a Spring Security app – Localization, Validation and Error handling.
Gson Deserialization Cookbook
Filed under JSON
How to deserialize Json with the Gson library – a cookbook with the most common scenarios.
The Baeldung Weekly Review 33
Filed under Weekly Review
A strong week for the Java/Spring ecosystem – new Java 9 JEPs announced, a REST API being built and some good thoughts on testing.
The Baeldung Weekly Review 32
Filed under Weekly Review
Solid week with the new RC2 of Spring 4.1, the Chess TDD series final post and a fantastic writeup on what it means to implement microservices as a team.
Getting Started with Forms in Spring MVC
Filed under Spring MVC
Learn how to work with forms using Spring MVC – mapping a basic entity, submit, displaying errors.
The Baeldung Weekly Review 31
Filed under Weekly Review
An interesting week – a Java bug got out and got contained, some cool Spring apps are being build and a quick solution to an interview problem that can fit in a tweet.
Java – Write a Reader to File
How to write out the contents of a Reader to File using plain Java, Guava or Apache Commons IO.
The Baeldung Weekly Review 30
Filed under Weekly Review
Diverse week full of solid articles on Spring, Java 8, testing, BDD and risk management – a lot of interesting articles in here.
The Baeldung Weekly Review 29
Filed under Weekly Review
A diverse week with a first look at Spring 4.1, the new Servlet 4 draft spec being proposed and some good thoughts on testing.
Java – Random Long, Float, Integer and Double
Filed under Java
Learn how to generate random numbers in Java – both unbounded as well as within a given interval.
The Baeldung Weekly Review 28
Filed under Weekly Review
This week was packed with value – from 2 very cool Spring Data new features to a few good usecases of Java 8. A very good week.
Java – Reader to InputStream
How to convert a Reader into an InputStream using Java, Guava and the Apache Commons IO library.
Java – InputStream to Reader
How to convert an InputStream to a Reader using Java, Guava and the Apache Commons IO library.
Java – Reader to Byte Array
How to convert a Reader into a byte[] using plain Java, Guava or the Apache Commons IO library.
Java – Reader to String
Filed under Guava, Java String
How to convert a Reader into a String using Java, Guava and the Apache Commons IO library.
The Baeldung Weekly Review 27
Filed under Weekly Review
Spring Releases galore this week, but also some great Java 8 articles and my favorite podcast recommendation right now.
Java – File to Reader
How to convert a File to a Reader using Java, Guava and the Apache Commons IO library.
Java – Byte Array to Reader
How to Convert a Byte Array into a Reader with plain Java, Guava and the Apache Commons IO library.
Java – String to Reader
Filed under Guava, Java String
Simple conversion from String to Reader in plain Java, Guava and Commons IO.
Apache HttpClient Connection Management
Filed under HTTP Client-Side
How to open, manage and close connections with the Apache HttpClient 4.
The Baeldung Weekly Review 26
Filed under Weekly Review
Java modularity is getting some attention this week, along with a very pragmatic alternative to the “Big Rewrite” of a software system – definitely a good week.
Java – Delete a File
Filed under Java
How to delete a File in Java using JDK 6, JDK 7 or the Commons IO library.
Java – Create a File
Filed under Java
How to create a File in Java using JDK 6, JDK 7 with NIO or Commons IO.
The Baeldung Weekly Review 25
Filed under Weekly Review
Spring centric week with some good steps forward for the community – new Spring IO platform, moving to StackOverflow and a few solid webinar recordings.
Java – Rename or Move a File
How to rename or move a file in Java, using JDK6, JDK7, Guava or Apache Commons.
Java – Write an InputStream to a File
How to write an InputStream to a File – using Java, Guava and the Commons IO library.
Java – Convert File to InputStream
How to open an InputStream from a Java File – using plain Java, Guava and the Apache Commons IO library.
Java Byte Array to InputStream
How to convert a byte[] to an InputStream using plain Java or Guava.
Java InputStream to Byte Array and ByteBuffer
How to convert an InputStream to a byte[] using plain Java, Guava or Commons IO.
Java String to InputStream
Filed under Guava, Java String
How to convert a String to an InputStream using plain Java, Guava or Commons IO.
The Baeldung Weekly Review 24
Filed under Weekly Review
This has been quite a diverse week – we saw some Spring work on caching and Spring Data and some great testing articles dealing with fixtures and design.
Project Configuration with Spring
Filed under Spring
This article discusses an simple yet flexible solution to configuration that is specific to the environment with Spring.
The Baeldung Weekly Review 23
Filed under Weekly Review
This week we discuss the HTTP/1.1 spec update (5 years in the works), some recordings and upcoming Spring webinars and clean testing.
Removing All Duplicates From a List in Java
Filed under Java Collections
How to remove all duplicate elements from a List – first with plan Java, then Guava and finally with Java 8 lambdas.
Removing All Nulls From a List in Java
Filed under Java, Java Collections
How to remove all nulls from a List using plain Java, Guava, the Commons Collections framework or the new Java 8 lambda support.
The Baeldung Weekly Review 22
Filed under Weekly Review
An interesting week with quite a mixed sample of solid articles being published – Spring, Java, Hibernate and Testing resources.
Spring Security – Persistent Remember Me
Filed under Spring Security
A secure Remember Me solution with Spring Security – using a token persisted in the database.
Convert a Map to an Array, List or Set in Java
Filed under Java Map
How to convert the values of a Map to an array, List or Set using plain Java.
Converting Between a List and a Set in Java
Filed under Java, Java Collections
How to Convert between a List and a Set using plain Java, Guava or Apache Commons Collections.
Converting Between an Array and a Set in Java
Filed under Java Array, Java Collections
How to Convert between an Array and a Set Using Plain Java, Guava or Apache Commons Collections.
Converting Between an Array and a List in Java
Filed under Java Array, Java Collections
How to Convert between an Array and a List Using plain Java, Guava or Apache Commons Collections.
The Baeldung Weekly Review 21
Filed under Weekly Review
An interesting week with some cool Spring Security 4 preview articles and the results of the “Capture the Bitcount” bug bounty.
Introduction to Spring Data JPA
Filed under Spring Data
Introduction to Spring Data JPA with Spring 4 – the Spring config, the DAO, manual and generated queries and transaction management.
Multipart Upload with Apache HttpClient
Filed under HTTP Client-Side
How to upload an entity using multipart upload with the HttpClient.
The Baeldung Weekly Review 20
Filed under Weekly Review
Lots of resources this week about TDD, live testing of external services, design and Java 8 – a solid week.
The Baeldung Weekly Review 19
Filed under Weekly Review
This week we talk about language and API design nuances, Two-Factor authentication, passwords, and of course testing and TDD.
The Baeldung Weekly Review 18
Filed under Weekly Review
This week is definitely about testing – TDD, Unit Testing and the new test support in the upcoming Spring Security 4.
Sorting with Hibernate
Filed under Persistence
Sort with Hibernate 4 using HQL or the Criteria API.
The Baeldung Weekly Review 17
Filed under Weekly Review
An solid week for both Java and Spring, as well as very good article (and followup) on building a Hypermedia service from the well known FizzBuzz interview problem.
Sorting with JPA
Filed under JPA
How to Sort in JPA using JQL or the Criteria API.
The Baeldung Weekly Review 16
Filed under Weekly Review
This week is all about series and Spring, as well as a back and forth about refactoring as waste and a good start for a set of generic acceptance criteria.
The Baeldung Weekly Review 15
Filed under Weekly Review
The highlights of this week are some great Java 8 usage of lambdas and concurrency improvements, a few helpful Spring posts and a handful of fantastic articles in the “Musings” section.
The Baeldung Weekly Review 14
Filed under Weekly Review
This week was packed full of Java 8 articles, a few testing gems and some well researched analyses of production issues.
Hibernate Pagination
Filed under Persistence
Pagination in Hibernate – using basic HQL, ScrollableResults as well as the more flexible and type-safe Criteria API.
JPA Pagination
Filed under JPA
Pagination in JPA – how to use JQL and the Criteria API to do pagination correctly.
The Baeldung Weekly Review 13
Filed under Weekly Review
This week is all about systems in production – starting with a couple of great articles about making sense of log files, real-time analytics and a pragmatic view on reporting.
The Baeldung Weekly Review 12
Filed under Weekly Review
The highlights of this week include the second installment of a great TDD video series, a host of Spring releases and webinars, and of course some solid Java 8 resources.
The Baeldung Weekly Review 11
Filed under Weekly Review
The week when Java 8 came out – a few good Java 8 articles, some resources on Continuous Delivery and TDD that you should not miss, and an exciting HTTP(S) development.
The Baeldung Weekly Review 10
Filed under Weekly Review
Great week with lots of articles – from TDD, Software Development attitude, the Circuit Breaker pattern (good one to know) and Programmer Podcasts.
The Baeldung Weekly Review 9
Filed under Weekly Review
The 9h weekly review starts with the usual Spring releases and great webminars, API architecture and testing resources.
The Baeldung Weekly Review 8
Filed under Weekly Review
The 8th weekly review, going wide from the design of a new Hypermedia type to best practices on Unit Testing, and a slew of Spring releases.
Basic Authentication with the RestTemplate
Filed under HTTP Client-Side, Security, Spring Web
How to do Basic Authentication with the Spring RestTemplate.
The Baeldung Weekly Review 7
Filed under Weekly Review
Quite some useful articles this week – and a few must reads, if you’re doing any non-trivial development.
The Baeldung Weekly Review 6
Filed under Weekly Review
Another great set of articles out in the 2nd week of February – covering the whole spectrum – Security, Performance testing, patterns and a few other subjects.
The Baeldung Weekly Review 5
Filed under Weekly Review
Week 5 review – really good articles on HTTP and REST this week, among other things.
Apache HttpClient Basic Authentication
Filed under HTTP Client-Side
Do Basic Authentication with the HttpClient 4 – simple usecase, preemptive auth and how to manually set the Authorization header.
The Baeldung Weekly Review 4
Filed under Weekly Review
Some great Spring, Security and REST articles from the 4th week of 2014.
Custom HTTP Header with the Apache HttpClient
Filed under HTTP Client-Side
How to set a custom header on one/all requests sent via the HttpClient 4.
The Baeldung Weekly Review 3
Filed under Weekly Review
Some great Spring, Security and REST articles from the 3rd week of 2014.
The Baeldung Weekly Review 2
Filed under Weekly Review
My takeaways from the 2nd week of 2014.
Getting Started with Custom Deserialization in Jackson
Use Jackson to map custom JSON to any java entity graph with full control over the deserialization process.
Jackson – Custom Serializer
Control your JSON output with Jackson 2 by using a Custom Serializer.
The Baeldung Weekly Review 1
Filed under Weekly Review
Interesting articles from week 1 of 2014.
Java InputStream to String
Filed under Guava, Java String
How to convert an InputStream to a String using plain Java, Guava or Commons IO.
Jackson Unmarshalling JSON with Unknown Properties
How to unmarshall a JSON that contains Unknown Properties using Jackson.
Most Popular Articles of 2013
Filed under Spring
A quick list of the most popular articles from 2013, by number of views.
Apache HttpClient – Follow Redirects for POST
Filed under HTTP Client-Side
How to enable POST Redirect with Apache HttpClient.
Apache HttpClient – Do Not Follow Redirects
Filed under HTTP Client-Side
Stop the Apache HttpClient automatically following redirects – A Day will come when redirects will be followed, but it’s not THIS DAY!
How to Read a Large File Efficiently with Java
Filed under Java
Learn how to process lines in a large file efficiently with Java – no need to store everything in memory.
Jackson – JsonMappingException (No serializer found for class)
How to fix the Jackson 2 JsonMappingException (No serializer found for class).
Apache HttpClient – Send Custom Cookie
Filed under HTTP Client-Side
How to send Custom Cookies with the Apache HttpClient.
How To Serialize and Deserialize Enums with Jackson
How to serialize and deserialize an Enum as a JSON Object using Jackson 2.
Apache HttpClient – Get the Status Code
Filed under HTTP Client-Side
Get the status code of an HTTP Response with HttpClient.
Immutable ArrayList in Java
Filed under Java Collections
Create an immutable List from an ArrayList with the JDK, Guava or Apache Commons Collections.
Jackson – Marshall String to JsonNode
How to parse a JSON String into the Jackson JsonNode Model.
Ignore Null Fields with Jackson
Ignore null fields with Jackson 2 – either globally, per class or even per field.
Jackson – Unmarshall to Collection/Array
Filed under Data, Jackson, Java Collections, JSON
How to map a JSON Array correctly in a type-safe manner to a Java Collection.
Apache HttpClient – Cancel Request
Filed under HTTP Client-Side
Stop/Abort long running requests with the Apache HttpClient.
Custom User-Agent in Apache HttpClient
Filed under HTTP Client-Side
Set a custom User-Agent header on the client (or on individual requests) with the Apache HttpClient.
Jackson – Change Name of Field
Jackson – Change the name of a field to adhere to a specific JSON format.
Serialize Only Fields That Meet a Custom Criteria With Jackson
Only serialize fields that meet your custom criteria using Jackson 2.
Jackson Ignore Properties on Marshalling
Control your JSON Output – Ignore certain fields directly, by name or by type (with mixins) for Jackson bliss.
Partition a List in Java
Filed under Java, Java Collections
How to Partition a List using Guava or Apache Commons Collections.
A Guide to JPA with Spring
Setup JPA with Spring – how to set up the EntityManager factory and use the raw JPA APIs.
Creating a Web Application with Spring 5
How to Bootstrap a Web Application with Spring and Java-based Configuration.
Apache HttpClient Cookbook
Filed under HTTP Client-Side
HttpClient 4 examples and best practices.
Mockito When/Then Cookbook
Filed under Testing
Mockito configure Behavior –
examples, usage and best practices.
Mockito Verify Cookbook
Filed under Testing
Mockito Verify
examples, usage and best practices.
Guava Functional Cookbook
Filed under Guava
Guava Predicate and Function examples and usage best practices.
Hamcrest Collections Cookbook
Filed under Java Collections, Testing
Common Hamcrest matchers helpful when working with Collections and arrays.
Error Handling for REST with Spring
Exception Handling for a REST API – illustrate the new Spring recommended approach and earlier solutions.
Guava Ordering Cookbook
Filed under Guava
Guava Ordering Cookbook illustrating code examples and nothing else.
Guava Collections Cookbook
Filed under Guava, Java Collections
Guava Collections Cookbook illustrating code examples and nothing else.
Properties with Spring and Spring Boot
Filed under Spring Boot
Tutorial for how to work with properties files and property values in Spring.
The DAO with JPA and Spring
How to implement the DAO with JPA in a Spring project.
Hibernate Mapping Exception – Unknown Entity
Filed under Persistence, Spring
Hibernate Mapping Exception – Unknown Entity – causes and solutions.
Expand Shortened URLs with Apache HttpClient
Filed under HTTP Client-Side
Learn how to expand shortened URLs in Java using the Apache HttpClient.
Apache HttpClient with SSL
Filed under HTTP Client-Side, Spring Web
Example of how to configure the HttpClient with SSL.
RestTemplate with Digest Authentication
Filed under HTTP Client-Side, Security, Spring Web
How to set up Digest Authentication for the Spring RestTemplate using HttpClient 4.
HttpSessionListener Example – Monitoring
Filed under REST
Set up a HttpSessionListener to track the number of active sessions in a web application.
Spring Security Remember Me
Filed under Spring Security
Cookie Remember Me example with Spring Security.
Versioning a REST API
Filed under REST
Versioning a REST API – version identifier in the URI or version media types?
Java Session Timeout
Filed under REST
Configure Session Timeout in the web.xml of a Java Servlet web application, and globally for a Tomcat or Jetty Server.
Apache HttpClient Timeout
Filed under HTTP Client-Side
How to set up timeout for an HttpClient – connection and socket timeouts, and a mechanism for hard timeout of ongoing http connections.
Retrieve User Information in Spring Security
Filed under Spring Security
How to get the currently logged in user with Spring Security.
Redirect to Different Pages After Login With Spring Security
Filed under Spring Security
Example of how to Redirect to different pages after Login with Spring Security.
Unable to Locate Spring NamespaceHandler for XML Schema Namespace
Filed under Spring Security
Solving the – Unable to locate Spring NamespaceHandler for XML schema namespace – for all namespaces.
Spring Security Digest Authentication
Filed under Spring Security
Digest Authentication with a Spring MVC project – the XML namespace configuration and several examples of consuming the application with curl.
No Bean Named ‘springSecurityFilterChain’ is Defined
Filed under Spring Security
No bean named ‘springSecurityFilterChain’ is defined – the Problem, the causes and the solutions.
Spring NoSuchBeanDefinitionException
Filed under Spring
Causes and Solutions for the NoSuchBeanDefinitionException in Spring – “No qualifying bean of type”, “No Bean Named”, Proxied Beans, etc.
Control the Session with Spring Security
Filed under Spring Security
Configure Sessions with Spring Security – set up Concurrent Sessions, enable Session Fixation Protection and prevent URLs from containing Session information.
Spring Security Authentication Provider
Filed under Spring Security
How to Set Up a Custom Authentication Provider with Spring Security and the namespace configuration.
Spring Security Basic Authentication
Filed under Spring Security
Set up Basic Authentication in Spring – the XML Configuration, the Error Messages, and example of consuming the secured URLs with curl.
Spring BeanCreationException
Filed under Spring
A quick and practical guide to dealing with different causes of Spring BeanCreationException
Spring Security Logout
Filed under Spring Security
Spring Logout Example – how to configure the logout url, the logout-succcess-url and how to use a custom bean to handle advanced logout scenarios.
Spring Security – security none, filters none, access permitAll
Filed under Spring Security
The differences between access=”permitAll”, filters=”none”, security=”none” in Spring Security.
Spring Maven Repositories
Guide on how to set up Maven to use Spring Repositories – Release Candidates, Milestones and Snapshots – after the Spring infrastructure updates.
Spring DataIntegrityViolationException
Filed under Spring Persistence
The Spring DataIntegrityViolationException – Causes and Solutions for Hibernate and JPA: ConstraintViolationException, PropertyValueException, DataException, EntityExistsException.
Spring RequestMapping
Filed under Spring MVC
Spring @RequestMapping – Basic Example, @RequestParam, @PathVariable, Header mapping
Spring BeanDefinitionStoreException
Filed under Spring
Causes and Solutions for the BeanDefinitionStoreException in Spring – FileNotFoundException, NoSuchMethodError, NoClassDefFoundError and IOException.
Maven Release to Nexus
Filed under Maven
Maven Release to Nexus – defining the repository in the pom, using the nexus release plugin, and the Release Process breakdown.
Hibernate 3 with Spring
Filed under Spring Persistence
Setup Hibernate 3 with Spring – the Java and XML Configuration, integration with MySQL and usage best practices.
Spring Security Form Login
Filed under Spring MVC, Spring Security
A Spring Login Example – How to Set Up a simple Login Form, a Basic Security XML Configuration and some more Advanced Configuration Techniques.
Spring Security with Maven
Filed under Maven, Spring Security
Spring Security with Maven
Maven Deploy to Nexus
Filed under Maven
Maven Deploy to Nexus – The Nexus Snapshot Repository in the pom and how to set up the Deployment Process.
Spring with Maven
Spring with Maven – focuses on the dependencies for Persistence, Web, Security and Testing.
Install Local Jar With Maven
Filed under Maven
Install local jar with Maven maven-install-plugin
Multipart Upload on S3 with jclouds
Filed under Cloud
Multipart Upload on S3 with jclouds custom S3 API – breaking the Content in Parts, Uploading the Parts individually, marking the Upload as complete via the Amazon API.
Upload on S3 With the jclouds Library
Filed under Cloud
Upload on S3 with the jclouds library – the 4 generic Blob APIs.
Testing REST with multiple MIME types
Testing a REST Service with multiple Media Types/representations.
ETags for REST with Spring
ETags with the Spring – ShallowEtagHeaderFilter, integration testing of the REST API, and consumption scenarios with curl.
REST Pagination in Spring
Pagination in a Spring REST Service – URI structure and best practice, Page as Resource vs Page as Representation.
The DAO with Spring and Hibernate
Filed under Spring Persistence
The DAO Layer with Spring and Hibernate – focuses on Transaction Management, Hibernate Session management, Spring template best practices and common pitfalls.
Basic and Digest Authentication for a REST Service with Spring Security
Filed under REST, Spring Security
How to Set Up and Configure both Basic and Digest Authentication for the same REST Service, using Spring Security.
HATEOAS for a Spring REST Service
Implementation of HATEOAS and Discoverability for a Spring REST API.
REST API Discoverability and HATEOAS
HATEOAS and Discoverability of a REST Service – driven by tests.
Integration Testing With the Maven Cargo Plugin
Set up Integration testing with the Maven Cargo and the cargo-maven2-plugin (maven-cargo-plugin).
Test a REST API with Java
How to test a REST Service with Java – integration testing using the Apache Http Client.
Avoid Brittle Tests for the Service Layer
How to avoid brittle and inflexible tests for the Service Layer of a Spring web app – mock out the interactions with the database, using JUnit, Mockito and Hamcrest.