java – Cant access REST API while using spring boot

java – Cant access REST API while using spring boot

Well, I believe the problem is:

@SpringBootApplication(scanBasePackages= {demo})

try to change it to

@SpringBootApplication(scanBasePackages= {demo.app})

or

@SpringBootApplication
@EnableAutoConfiguration

With @EnableAutoConfiguration spring will automatically configure the beans youll need.

java – Cant access REST API while using spring boot

Leave a Reply

Your email address will not be published. Required fields are marked *