mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-19 03:06:41 +00:00
Merge pull request #547 from nsacyber/v3_bootrun-notes
bootRun and bootWar
This commit is contained in:
commit
079ee3b80e
@ -22,6 +22,7 @@ configurations {
|
|||||||
compileOnly {
|
compileOnly {
|
||||||
extendsFrom annotationProcessor
|
extendsFrom annotationProcessor
|
||||||
}
|
}
|
||||||
|
all*.exclude module: 'spring-boot-starter-logging'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -42,10 +43,13 @@ dependencies {
|
|||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||||
|
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
|
||||||
|
implementation 'org.apache.logging.log4j:log4j-spring-boot'
|
||||||
implementation 'org.projectlombok:lombok'
|
implementation 'org.projectlombok:lombok'
|
||||||
implementation 'commons-fileupload:commons-fileupload:1.5'
|
implementation 'commons-fileupload:commons-fileupload:1.5'
|
||||||
implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
|
implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
|
||||||
implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
|
implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
|
||||||
|
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper:10.1.5'
|
||||||
|
|
||||||
compileOnly 'org.projectlombok:lombok'
|
compileOnly 'org.projectlombok:lombok'
|
||||||
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
|
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
|
||||||
@ -56,13 +60,13 @@ dependencies {
|
|||||||
testImplementation libs.testng
|
testImplementation libs.testng
|
||||||
}
|
}
|
||||||
|
|
||||||
war {
|
//war {
|
||||||
from(buildDir) {
|
// from(buildDir) {
|
||||||
include 'VERSION'
|
// include 'VERSION'
|
||||||
into 'WEB-INF/classes'
|
// into 'WEB-INF/classes'
|
||||||
}
|
// }
|
||||||
archiveFileName = 'HIRS_AttestationCAPortal.war'
|
// archiveFileName = 'HIRS_AttestationCAPortal.war'
|
||||||
}
|
//}
|
||||||
|
|
||||||
ospackage {
|
ospackage {
|
||||||
packageName = 'HIRS_AttestationCA'
|
packageName = 'HIRS_AttestationCA'
|
||||||
|
@ -15,26 +15,27 @@ import org.springframework.web.servlet.DispatcherServlet;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableAutoConfiguration
|
//@EnableAutoConfiguration
|
||||||
@Log4j2
|
@Log4j2
|
||||||
public class HIRSApplication extends SpringBootServletInitializer {
|
public class HIRSApplication {//extends SpringBootServletInitializer {
|
||||||
|
// private static final Logger LOGGER = LogManager.getLogger(HIRSApplication.class);
|
||||||
|
// @Override
|
||||||
|
// protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||||
|
// return application.sources(HIRSApplication.class);
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
// public void onStartup(ServletContext servletContext) throws ServletException {
|
||||||
return application.sources(HIRSApplication.class);
|
// ServletRegistration.Dynamic appServlet = servletContext.addServlet("mvc", new DispatcherServlet(
|
||||||
}
|
// new GenericWebApplicationContext()));
|
||||||
|
|
||||||
@Override
|
// appServlet.setLoadOnStartup(1);
|
||||||
public void onStartup(ServletContext servletContext) throws ServletException {
|
// }
|
||||||
ServletRegistration.Dynamic appServlet = servletContext.addServlet("mvc", new DispatcherServlet(
|
|
||||||
new GenericWebApplicationContext()));
|
|
||||||
|
|
||||||
appServlet.setLoadOnStartup(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication springApplication = new SpringApplication(HIRSApplication.class);
|
// SpringApplication springApplication = new SpringApplication(HIRSApplication.class);
|
||||||
springApplication.setDefaultProperties(Collections.singletonMap("server.servlet.context-path", "/portal"));
|
// springApplication.setDefaultProperties(Collections.singletonMap("server.servlet.context-path", "/portal"));
|
||||||
springApplication.run(args);
|
// springApplication.run(args);
|
||||||
|
SpringApplication.run(HIRSApplication.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,10 @@
|
|||||||
|
|
||||||
server.error.path=/error
|
#server.error.path=/error
|
||||||
spring.mvc.view.prefix=/WEB-INF/jsp/
|
#spring.mvc.view.prefix=/WEB-INF/jsp/
|
||||||
spring.mvc.view.suffix=.jsp
|
#spring.mvc.view.suffix=.jsp
|
||||||
|
|
||||||
logging.level.org.springframework=INFO
|
logging.level.org.springframework=INFO
|
||||||
|
logging.level.org.apache.catalina=DEBUG
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.datasource.url=jdbc:mariadb://localhost:3306/hirs_db?autoReconnect=true&useSSL=false
|
spring.datasource.url=jdbc:mariadb://localhost:3306/hirs_db?autoReconnect=true&useSSL=false
|
||||||
spring.datasource.username=hirs_db
|
spring.datasource.username=hirs_db
|
||||||
@ -21,6 +22,11 @@ server.tomcat.accesslog.prefix=access_log
|
|||||||
server.tomcat.accesslog.suffix=.log
|
server.tomcat.accesslog.suffix=.log
|
||||||
server.tomcat.accesslog.rotate=true
|
server.tomcat.accesslog.rotate=true
|
||||||
|
|
||||||
|
server.tomcat.basedir=/opt/embeddedtomcat
|
||||||
|
server.servlet.register-default-servlet=true
|
||||||
|
server.servlet.context-path=/HIRS_AttestationCAPortal
|
||||||
|
spring.mvc.servlet.path=/portal
|
||||||
|
|
||||||
#jdbc.driverClassName = com.mysql.cj.jdbc.Driver
|
#jdbc.driverClassName = com.mysql.cj.jdbc.Driver
|
||||||
#jdbc.url = jdbc:mysql://localhost:3306/hirs_db?autoReconnect=true&useSSL=false
|
#jdbc.url = jdbc:mysql://localhost:3306/hirs_db?autoReconnect=true&useSSL=false
|
||||||
#jdbc.username = root
|
#jdbc.username = root
|
||||||
|
Loading…
Reference in New Issue
Block a user