Skip to content

Changing The Root Package Name Of The Project

Karthik Pillai edited this page Nov 16, 2021 · 3 revisions

Procedure

  1. Change @SpringBootApplication(scanBasePackages={"com.springboot.rest"}) to @SpringBootApplication(scanBasePackages={"com.package.subpackage"}) in SpringBootApp

  2. Go to build.gradle and change "com.springboot.rest" to your package name example - "com.package.subpackage"

  3. Go to Config Package -> DatabaseConfuguration.java and change @EnableJpaRepositories("com.springboot.rest.repository") to @EnableJpaRepositories("com.package.subpackage.repository")

  4. Invalidate IDE Cache and rebuild the project

Database Schema Name Changes:

  1. Go to application.yml and application-prod.yml and change the data source URL accordingly.