spring boot: Whitelabel Error Page的解决方案
2018-03-27 15:40
585 查看
初次搭建spring cloud 项目 运行时 浏览器
主要是
最后附上官网说明http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-structuring-your-code
[html] view plain copy14.2 Locating the main application class
We generally recommend that you locate your main application class in a root package above other classes. The @EnableAutoConfiguration annotation is often placed on your main class, and it implicitly defines a base “search package” for certain items. For example, if you are writing a JPA application, the package of the @EnableAutoConfiguration annotated class will be used to search for @Entity items.
Using a root package also allows the @ComponentScan annotation to be used without needing to specify a basePackage attribute. You can also use the @SpringBootApplication annotation if your main class is in the root package.
Here is a typical layout:
com
+- example
+- myproject
+- Application.java
|
+- domain
| +- Customer.java
| +- CustomerRepository.java
|
+- service
| +- CustomerService.java
|
+- web
+- CustomerController.java
主要是
最后附上官网说明http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-structuring-your-code
[html] view plain copy14.2 Locating the main application class
We generally recommend that you locate your main application class in a root package above other classes. The @EnableAutoConfiguration annotation is often placed on your main class, and it implicitly defines a base “search package” for certain items. For example, if you are writing a JPA application, the package of the @EnableAutoConfiguration annotated class will be used to search for @Entity items.
Using a root package also allows the @ComponentScan annotation to be used without needing to specify a basePackage attribute. You can also use the @SpringBootApplication annotation if your main class is in the root package.
Here is a typical layout:
com
+- example
+- myproject
+- Application.java
|
+- domain
| +- Customer.java
| +- CustomerRepository.java
|
+- service
| +- CustomerService.java
|
+- web
+- CustomerController.java
相关文章推荐
- spring boot: Whitelabel Error Page的解决方案
- spring boot: Whitelabel Error Page的解决方案
- spring boot: Whitelabel Error Page的解决方案
- Spring Boot : Whitelabel Error Page解决方案
- SpringBoot接口服务处理Whitelabel Error Page
- Spring Boot自定义错误页面,Whitelabel Error Page处理方式
- Spring boot启动提示Whitelabel Error Page 401 spring需要授权登录
- 初学 Spring boot 报错 Whitelabel Error Page 404
- Whitelabel Error Page(按spring-boot官网的示例跑不起来的原因之一)
- Spring Boot自定义错误页面,Whitelabel Error Page处理方式
- spring-boot集成 jsp报whitelabel error page的问题解决
- SpringBoot 不显示Whitelabel Error Page
- springboot + tomcat + jsp 报Whitelabel Error Page解决方法
- Spring-Boot "Whitelabel Error Page" 解决方法总结
- 初学Spring Boot遇到Whitelabel Error Page的解决办法
- 初学 Spring boot 报错 Whitelabel Error Page 404
- SpringBoot中jsp页面调用iframe标签报Whitelabel Error Page 错误
- java处理springboot whitelabel error page
- Spring Boot Whitelabel Error Page解决办法
- SpringBoot 访问出错Whitelabel Error Page