项目在本地环境中运行良好。当我在服务器中部署项目时没有发生错误。但是由于o.s.boot.web.support.ErrorPageFilter而无法访问任何页面。 这是错误日志。
08-May-2017 10:27:23.220 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /var/local/apache-tomcat-8.0.43/webapps/bimbley.war
08-May-2017 10:27:29.494 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Configuring Spring Security Core ...
... finished configuring Spring Security Core
08-May-2017 10:27:53.157 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /var/local/apache-tomcat-8.0.43/webapps/bimbley.war has finished in 29,936 ms
08-May-2017 10:27:53.158 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/local/apache-tomcat-8.0.43/webapps/docs
08-May-2017 10:27:53.198 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/local/apache-tomcat-8.0.43/webapps/docs has finished in 40 ms
08-May-2017 10:27:53.199 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/local/apache-tomcat-8.0.43/webapps/manager
08-May-2017 10:27:53.247 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/local/apache-tomcat-8.0.43/webapps/manager has finished in 48 ms
08-May-2017 10:27:53.250 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/local/apache-tomcat-8.0.43/webapps/examples
08-May-2017 10:27:53.500 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/local/apache-tomcat-8.0.43/webapps/examples has finished in 250 ms
08-May-2017 10:27:53.501 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/local/apache-tomcat-8.0.43/webapps/ROOT
08-May-2017 10:27:53.527 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/local/apache-tomcat-8.0.43/webapps/ROOT has finished in 21 ms
08-May-2017 10:27:53.528 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/local/apache-tomcat-8.0.43/webapps/host-manager
08-May-2017 10:27:53.563 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/local/apache-tomcat-8.0.43/webapps/host-manager has finished in 35 ms
08-May-2017 10:27:53.573 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
08-May-2017 10:27:53.589 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
08-May-2017 10:27:53.594 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 30441 ms
2017-05-08 10:28:26.832 ERROR --- [nio-8080-exec-4] o.s.boot.web.support.ErrorPageFilter : Forwarding to error page from request [/] due to exception [Could not resolve view with name '/home/index' in servlet with name 'grailsDispatcherServlet']
javax.servlet.ServletException: Could not resolve view with name '/home/index' in servlet with name 'grailsDispatcherServlet'
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1237)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
这是我的application.yml文件配置
-
--
grails:
profile: web
codegen:
defaultPackage: bimbley
spring:
transactionManagement:
proxies: false
info:
app:
name: '@info.app.name@'
version: '@info.app.version@'
grailsVersion: '@info.app.grailsVersion@'
spring:
main:
banner-mode: "off"
groovy:
template:
check-template-location: false
# Spring Actuator Endpoints are Disabled by Default
endpoints:
enabled: false
jmx:
enabled: true
---
grails:
mime:
disable:
accept:
header:
userAgents:
- Gecko
- WebKit
- Presto
- Trident
types:
all: '*/*'
atom: application/atom+xml
css: text/css
csv: text/csv
form: application/x-www-form-urlencoded
html:
- text/html
- application/xhtml+xml
js: text/javascript
json:
- application/json
- text/json
multipartForm: multipart/form-data
pdf: application/pdf
rss: application/rss+xml
text: text/plain
hal:
- application/hal+json
- application/hal+xml
xml:
- text/xml
- application/xml
urlmapping:
cache:
maxsize: 1000
controllers:
defaultScope: singleton
upload:
maxFileSize: 2000000
maxRequestSize: 2000000
converters:
encoding: UTF-8
views:
default:
codec: html
gsp:
encoding: UTF-8
htmlcodec: xml
codecs:
expression: html
scriptlets: html
taglib: none
staticparts: none
gorm:
# Whether to autowire entities.
# Disabled by default for performance reasons.
autowire: true
mail:
host: "smtp.gmail.com"
port: 465
username: "XXXXX@gmail.com"
password: "XXXXXXX"
props:
mail.smtp.auth: "true"
mail.smtp.socketFactory.port: "465"
mail.smtp.socketFactory.class: "javax.net.ssl.SSLSocketFactory"
mail.smtp.socketFactory.fallback: "false"
endpoints:
jmx:
unique-names: true
---
hibernate:
cache:
queries: false
use_second_level_cache: true
use_query_cache: false
region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
dataSource:
pooled: true
jmxExport: true
driverClassName: com.mysql.jdbc.Driver
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
#driverClassName: org.h2.Driver
grails:
mongodb:
host: "localhost"
port: 27017
username: ""
password: ""
databaseName: "bimbleydb"
environments:
development:
grails:
serverURL: http://localhost:8080
mongodb:
connectionString: "mongodb://localhost:27017/bimbleydb"
dataSource:
dbCreate: create
url: jdbc:mysql://localhost/bimbleydb
username: root
password:
# url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
test:
dataSource:
dbCreate: update
url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
production:
grails:
serverURL: http://45.79.83.127:8080
mongodb:
connectionString: "mongodb://localhost:27017/bimbleydb"
dataSource:
dbCreate: create
url: jdbc:mysql://localhost/bimbleydb
username: root
password: XXXXXXX
#url: jdbc:h2:./prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 5000
minEvictableIdleTimeMillis: 60000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED