I want to generate war file to deploy in tomcat 9. I understand we have to extend the main application class to @SpringBootApplication as follows…
@SpringBootApplication
public class MyApplication extends SpringBootServletInitializer {
// …
}
But is that the main-screen created by the application builder or something else?
Do building the war file, do we follow the same way to CUBA i.e. context file to contain the connection/server parameters like follows?
my-context.xml
<Context>
<Manager pathname=""/>
<!-- url="jdbc:sqlserver://localhost;databaseName=mydb"/> -->
<Resource
name="jdbc/CubaDS"
type="javax.sql.DataSource"
maxIdle="2"
maxTotal="40"
maxWaitMillis="5000"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
username="......."
password="........."
url="jdbc:sqlserver://localhost;databaseName=mydb"/>
</Context>
build.Grale:
task buildInteaccWar(type: CubaWarBuilding) {
singleWar = true
webXmlPath = 'modules/web/web/WEB-INF/single-war-web.xml'
includeContextXml = true
includeJdbcDriver = true
appProperties = [
'cuba.automaticDatabaseUpdate': true,
'cuba.webPort' : 8080,
'cuba.connectionUrlList' : 'http://localhost:8080/myapp-core'
]
coreContextXmlPath = 'modules/core/web/META-INF/my-context.xml'
}
Also didn’t find bootwar in gradle task