I start my web application with spring boot. It use a simple main class to start an embedded tomcat server:
@Configuration
@EnableAutoConfiguration
@Componen
1- first you create new Controller then copy and paste simple below code
@Controller
public class viewController {
@RequestMapping(value = "/**/{[path:[^\\.]*}")
public String redirect() {
// Forward to home page so that route is preserved.
return "forward:/";
}
}
3- remove 2 below item from angular app
$locationProvider.hashPrefix('!');
$urlRouterProvider.otherwise("/");
2- in angular application you must add $locationProvider.html5Mode(true); to app route
3- Don't forget to place the base tag before any http request in your index.html file
/* Or whatever your base path is */
//call every http request for style and other
...
it's work fine for me