我正在使用 grails 2.4.7。现在我切换到 grails 3.2.3。我正在尝试在 ubuntu 服务器的 tomcat7 中部署我的项目 war 文件。我收到 404 错误。我添加了所有可能的插件,包括这个
provided "org.springframework.boot:spring-boot-starter-tomcat"
受够了我用 ROOT 名称建立战争但仍然有同样的问题。任何人都可以给我一些可能的解决方案。这是我的 application.yml 代码。
environments:
development:
grails:
serverURL: http://localhost:8080
dataSource:
dbCreate: create
url: jdbc:mysql://localhost/somedb
username: ****
password:
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
#url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
test:
grails:
serverURL: http://localhost:8080
dataSource:
dbCreate: update
url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
production:
grails:
serverURL: http://ipaddress:8080
dataSource:
dbCreate: create
url: jdbc:mysql://localhost/somedb
username: *****
password: *******
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
# 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