mirror of
https://github.com/corda/corda.git
synced 2025-04-08 03:44:49 +00:00
Minor: auto-format of module: webserver
This commit is contained in:
parent
4d6d4c167e
commit
e62250ff7b
@ -61,9 +61,9 @@ data class CmdLineOptions(val baseDirectory: Path,
|
||||
}
|
||||
|
||||
private fun loadConfig(baseDirectory: Path,
|
||||
configFile: Path = baseDirectory / "node.conf",
|
||||
allowMissingConfig: Boolean = false,
|
||||
configOverrides: Map<String, Any?> = emptyMap()): Config {
|
||||
configFile: Path = baseDirectory / "node.conf",
|
||||
allowMissingConfig: Boolean = false,
|
||||
configOverrides: Map<String, Any?> = emptyMap()): Config {
|
||||
val parseOptions = ConfigParseOptions.defaults()
|
||||
val defaultConfig = ConfigFactory.parseResources("web-reference.conf", parseOptions.setAllowMissing(false))
|
||||
val appConfig = ConfigFactory.parseFile(configFile.toFile(), parseOptions.setAllowMissing(allowMissingConfig))
|
||||
|
@ -7,11 +7,11 @@ import javax.ws.rs.ext.Provider
|
||||
|
||||
// Provides basic exception logging to all APIs
|
||||
@Provider
|
||||
class AllExceptionMapper: ExceptionMapper<Exception> {
|
||||
class AllExceptionMapper : ExceptionMapper<Exception> {
|
||||
companion object {
|
||||
val logger = loggerFor<APIServerImpl>()
|
||||
}
|
||||
|
||||
|
||||
override fun toResponse(exception: Exception?): Response {
|
||||
logger.error("Unhandled exception in API", exception)
|
||||
return Response.status(500).build()
|
||||
|
@ -11,7 +11,7 @@ import javax.servlet.http.HttpServletResponse
|
||||
/**
|
||||
* Uploads to the node via the [CordaRPCOps] uploadFile interface.
|
||||
*/
|
||||
class DataUploadServlet: HttpServlet() {
|
||||
class DataUploadServlet : HttpServlet() {
|
||||
private val log = loggerFor<DataUploadServlet>()
|
||||
|
||||
override fun doPost(req: HttpServletRequest, resp: HttpServletResponse) {
|
||||
|
@ -40,10 +40,10 @@ task buildWebserverJar(type: FatCapsule) {
|
||||
applicationClass 'net.corda.webserver.WebServer'
|
||||
archiveName "corda-webserver-${corda_version}.jar"
|
||||
applicationSource = files(
|
||||
project.tasks.findByName('jar'),
|
||||
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet.class'),
|
||||
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet$1.class'),
|
||||
'config/dev/log4j2.xml'
|
||||
project.tasks.findByName('jar'),
|
||||
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet.class'),
|
||||
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet$1.class'),
|
||||
'config/dev/log4j2.xml'
|
||||
)
|
||||
from 'NOTICE' // Copy CDDL notice
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user