Problems with springboot papeamento

0

I'm entering the SpringBoot world now and I've run into a problem that I think is easy to solve.

Here is the structure of my project with class packages:

br.com.springboot.api

  

SpringBootApplication

br.com.springboot.controller

  

ClientController

br.com.springboot.model

  

Customer

I created a mapping within SpringBootApplication with @RequestMapping, the problem is that when I start the application the way it is and I try to access this mapping in the browser it does not think, but if I put the SpringbootApplication and ClientController classes in the same package it works! What can it be ??

    
asked by anonymous 11.04.2017 / 21:04

1 answer

0

You should map your package with the controllers.

@ComponentScan({"br.com.springboot.controller"})
public class SpringBootApplication {
    // ...
}
    
11.04.2017 / 21:38