Spring Boot Controller not mapping

前端 未结 9 1480
慢半拍i
慢半拍i 2021-02-05 02:55

I have used STS and now I am using IntelliJ Ultimate Edition but I am still getting the same output. My controller is not getting mapped thus showing 404 error. I am completely

9条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 03:11

    I also had trouble with a similar issue and resolved it using the correct package structure as per below. After correction, it is working properly. e.g.

    • Spring Application Main Class is in package com.example
    • Controller Classes are in package com.example.controller

提交回复
热议问题