Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Nov 21 21:00:12 GMT+08:00 2018
There was an unexpected error (type=Not Found, status=404).
No message available!
图片说明
#Tomcat
server:
tomcat:
uri-encoding: UTF-8
max-threads: 1000
min-spare-threads: 30
port: 8081
#mysql
spring:
profiles:
active: dev
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
datasource:
driver-class-name: com.mysql.jdbc.Driver
druid:
initial-size: 3
min-idle: 3
max-active: 10
max-wait: 60000
validation-query: SELECT 1
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
use-global-data-source-stat: true
min-evictable-idle-time-millis: 300000
time-between-eviction-runs-millis: 60000
max-open-prepared-statements: 20
max-pool-prepared-statement-per-connection-size: 20
slf4j:
enabled: true
wall:
enabled: true
web-stat:
enabled: true
url-patterns: '/*'
exclusions: '*.gif,*.jpg,*.jpeg,*.png,*.bmp,*.swf,*.ico,*.woff,*.woff2,*.ttf,*.eot,*.js,*.css,*.html,*.htm,/druid/*'
stat-view-servlet:
enabled: true
url-mappings: '/druid/*'
allow: 127.0.0.1
deny: 192.168.2.1
login-username: admin
login-password: 123456
reset-enable: false
freemarker:
request-context-attribute: req #req访问request
suffix: .html #后缀名
content-type: text/html
enabled: true
cache: false #缓存配置
template-loader-path: classpath:/static/templates/ #模板加载路径 按需配置
charset: UTF-8 #编码格式
返回是json 格式的,能提示这么错误么?
@RestController
public class TestController {
@Autowired
private ICityPyService cityPyService;
@RequestMapping(value = "/",method = RequestMethod.GET)
public String test(){
CityPy city = cityPyService.queryCityPyById(1L);
return "webapp start..";
}
}
![图片说明](https://img-ask.csdn.net/upload/201811/21/1542806010_583411.png)