---
title: "Discussion on \"How To Deploy A Next.js App Using Spring Boot\" | Hashnode"
description: "Discussion on \"How To Deploy A Next.js App Using Spring Boot\". Learn how to easily deploy Next.js static assets using Spring Boot"
url: "https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Deploy A Next.js App Using Spring Boot](https://stacktobasics.com/deploy-nextjs-with-spring-boot?utm_source=hashnode&utm_medium=feed)

Learn how to easily deploy Next.js static assets using Spring Boot

Apr 4, 2023 · 11 min read · stacktobasics.com  
Updated May 8, 2023  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#springboot](https://hashnode.com/tag/springboot)
-   [#spring](https://hashnode.com/tag/spring)
-   [#java](https://hashnode.com/tag/java)
-   [#typescript](https://hashnode.com/tag/typescript)

## Written by

[Shane Jennings](https://hashnode.com/@zinbo)

@zinbo · Nottingham, United Kingdom

  
[View profile](https://hashnode.com/@zinbo)

Full stack Developer - specialising in Java with Spring Boot and React with Next.js

Full Stack Developer and Architect. Specialising in Java with Spring Boot, and React with Next.js. Passionate about building cloud-native applications following DDD.

## Responses 5

Markdown supported · ⌘↵ to post

[Luca Orlandi](https://hashnode.com/@lrkwz)

[Aug 9, 2025](https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0/comment/68978c65e5dbd5abfd4f81a6)

A complete working example can be found here [gitlab.com/lrkwz/spring-boot-nextjs-demo](https://gitlab.com/lrkwz/spring-boot-nextjs-demo) with just a few simple variations on the original code from the article.

[gigiyy](https://hashnode.com/@gigiyy)

[Feb 19, 2025](https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0/comment/67b5ef294cfa4bc73c9ae3f7)

Thousands of Thanks for the article. I've to adopt exact same solution for next+spring boot app for work as many limitations. This article solved most the problems that I don't know where to begin with. (I'm new to front end development)

[Khawaja Hamdan Ahmad](https://hashnode.com/@hamdanahmad1)

[Aug 27, 2024](https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0/comment/66cdece07f413ac52fbed613)

How to do this with Next js 14 version

[gigiyy](https://hashnode.com/@gigiyy)

[Feb 19, 2025](https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0/comment/66cdece07f413ac52fbed613#reply-67b5efc33d247c1575e6227f)

instead of using export command as shown in article, set `output: 'export',` in your next.config.ts instead. so you only need to run `npm run build` instead of export.

[Grégory Goufan À Zock](https://hashnode.com/@Greko2017)

[Nov 17, 2023](https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0/comment/6557dbd0c808315676f4ad6c)

Please do you have an updated version next export is no longer recognized. Also I'm using a dynamic route do you have an example with that in consideration,

Thank you

[Arwa Hakimuddin](https://hashnode.com/@anony72)

[Oct 19, 2023](https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0/comment/6530adc7386f5e3a783e1ccc)

Hi , My path /somthing/ does not go inside public String requestPage() with requestMapping @RequestMapping("^(?!._\[.\]._$).\*$")

can u suggest smthing

[Sam Bass](https://hashnode.com/@sambasswork)

[Sep 28, 2023](https://hashnode.com/posts/deploy-nextjs-with-spring-boot/645512a6ce5e292ba1731ab0/comment/651544fb5d5d746448ea5e92)

I keep getting this error:

java: cannot find symbol symbol: variable SpringApplication location: class com.stacktobasics.springbootapp.SpringBootAppApplication

How can I fix this?
