<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Omar Rharbi</title>
    <description>The latest articles on DEV Community by Omar Rharbi (@omrrharbi).</description>
    <link>https://dev.to/omrrharbi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3617943%2F09f49be6-c824-4238-9f71-df9bd92302e4.png</url>
      <title>DEV Community: Omar Rharbi</title>
      <link>https://dev.to/omrrharbi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omrrharbi"/>
    <language>en</language>
    <item>
      <title>Spring Boot rejects large file upload / content in REST endpoint</title>
      <dc:creator>Omar Rharbi</dc:creator>
      <pubDate>Thu, 20 Nov 2025 11:15:24 +0000</pubDate>
      <link>https://dev.to/omrrharbi/spring-boot-rejects-large-file-upload-content-in-rest-endpoint-2eom</link>
      <guid>https://dev.to/omrrharbi/spring-boot-rejects-large-file-upload-content-in-rest-endpoint-2eom</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Source - https://stackoverflow.com/q/79825415
// Posted by omar rharbu
// Retrieved 2025-11-20, License - CC BY-SA 4.0

HttpMessageNotReadableException: JSON parse error:
String value length (20048537) exceeds the maximum allowed
(20000000, from StreamReadConstraints.getMaxStringLength())

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks like Jackson is blocking the request because the JSON string is too large. I'm not trying to catch this exception — I just want to understand:&lt;/p&gt;

&lt;p&gt;Why this limit exists&lt;/p&gt;

&lt;p&gt;Whether I'm uploading the file in the wrong way&lt;/p&gt;

&lt;p&gt;What the correct approach is for handling large file uploads in Spring Boot&lt;/p&gt;

&lt;p&gt;Has anyone dealt with the StreamReadConstraints max string length issue? What is the recommended way to upload large files without hitting this JSON size restriction?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>The Hard Truth About Learning Spring Boot (And How to Actually Master It)</title>
      <dc:creator>Omar Rharbi</dc:creator>
      <pubDate>Tue, 18 Nov 2025 16:43:53 +0000</pubDate>
      <link>https://dev.to/omrrharbi/the-hard-truth-about-learning-spring-boot-and-how-to-actually-master-it-5457</link>
      <guid>https://dev.to/omrrharbi/the-hard-truth-about-learning-spring-boot-and-how-to-actually-master-it-5457</guid>
      <description>&lt;p&gt;Everyone says learning Spring Boot is “easy” if you know Java.&lt;br&gt;&lt;br&gt;
They talk about “building REST APIs,” “connecting to a database,” and “deploying microservices.”&lt;/p&gt;

&lt;p&gt;But here’s the hard truth:&lt;br&gt;&lt;br&gt;
Most days, it’s confusing, frustrating, and full of small errors you can’t figure out.  &lt;/p&gt;

&lt;p&gt;And that’s completely normal.  &lt;/p&gt;

&lt;p&gt;Learning Spring Boot isn’t just about memorizing annotations or following tutorials.&lt;br&gt;&lt;br&gt;
It’s about &lt;strong&gt;understanding how the pieces fit together&lt;/strong&gt;, and learning by building and breaking things.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Master Core Java First
&lt;/h2&gt;

&lt;p&gt;Before diving into Spring Boot, make sure you’re comfortable with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OOP concepts (classes, inheritance, interfaces)
&lt;/li&gt;
&lt;li&gt;Collections, Streams, and Lambdas
&lt;/li&gt;
&lt;li&gt;Exception handling and debugging
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Spring Boot builds on these fundamentals, so they are non-negotiable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Understand Spring Basics
&lt;/h2&gt;

&lt;p&gt;Spring Boot is just Spring made easier. Learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dependency Injection / IoC
&lt;/li&gt;
&lt;li&gt;Bean lifecycle and scopes
&lt;/li&gt;
&lt;li&gt;Annotations like &lt;code&gt;@Component&lt;/code&gt;, &lt;code&gt;@Service&lt;/code&gt;, &lt;code&gt;@Repository&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you understand these, Spring Boot’s magic makes sense.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Build a Simple REST API
&lt;/h2&gt;

&lt;p&gt;Start small:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Spring Boot project with Spring Initializr
&lt;/li&gt;
&lt;li&gt;Build a simple controller: &lt;code&gt;@RestController&lt;/code&gt; + &lt;code&gt;@GetMapping&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Test endpoints with Postman or curl
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helps you understand &lt;strong&gt;request → controller → response&lt;/strong&gt; flow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvv5fmhba31wegxm9sfrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvv5fmhba31wegxm9sfrj.png" alt=" " width="800" height="473"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;This diagram shows how an HTTP request travels through Spring MVC from DispatcherServlet to Controller.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Connect to a Database
&lt;/h2&gt;

&lt;p&gt;Learn Spring Data JPA:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an &lt;code&gt;Entity&lt;/code&gt; and &lt;code&gt;Repository&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Save, fetch, and update data
&lt;/li&gt;
&lt;li&gt;Understand transactions and lazy loading&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fat76006ehvux8647uqey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fat76006ehvux8647uqey.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Overview of Spring MVC architecture showing DispatcherServlet, HandlerMapping, and ViewResolver.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: Handle Advanced Features
&lt;/h2&gt;

&lt;p&gt;Once comfortable with the basics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add authentication (JWT, Spring Security)
&lt;/li&gt;
&lt;li&gt;Use filters and interceptors
&lt;/li&gt;
&lt;li&gt;Build a full CRUD app
&lt;/li&gt;
&lt;li&gt;Experiment with caching, async tasks, or messaging
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgvlql1w9dr0tr0u6h0k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgvlql1w9dr0tr0u6h0k.png" alt=" " width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Modern Spring MVC request flow showing filters, controllers, and responses.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 6: Deploy and Iterate
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Deploy locally or on cloud platforms (Heroku, AWS, etc.)
&lt;/li&gt;
&lt;li&gt;Read logs, debug issues
&lt;/li&gt;
&lt;li&gt;Refactor and improve your code
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Learning Spring Boot is a &lt;strong&gt;step-by-step journey&lt;/strong&gt;, not a sprint.&lt;br&gt;&lt;br&gt;
You’ll break things, Google errors endlessly, and feel stuck.&lt;br&gt;&lt;br&gt;
That’s okay. That’s growth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhk3lm5jty2oy3jg23ik.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhk3lm5jty2oy3jg23ik.png" alt=" " width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The Front Controller pattern in Spring MVC using DispatcherServlet.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;✅ &lt;strong&gt;Tip:&lt;/strong&gt; Build projects, not just tutorials.&lt;br&gt;&lt;br&gt;
Each small project teaches more than any video series ever could.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>java</category>
      <category>springboot</category>
      <category>springsecurity</category>
    </item>
  </channel>
</rss>
