forked from Cookies_Github_mirror/AquaDX
[F] Fix hibernate enhance compilation
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.general;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
public interface BaseHandler {
|
||||
|
||||
Object handle(Map<String, Object> request) throws JsonProcessingException;
|
||||
}
|
||||
11
src/main/java/icu/samnyan/aqua/sega/general/BaseHandler.kt
Normal file
11
src/main/java/icu/samnyan/aqua/sega/general/BaseHandler.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package icu.samnyan.aqua.sega.general
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
fun interface BaseHandler {
|
||||
@Throws(JsonProcessingException::class)
|
||||
fun handle(request: Map<String, Any>): Any?
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import java.util.*
|
||||
@Component
|
||||
class CompressionFilter : OncePerRequestFilter() {
|
||||
companion object {
|
||||
val logger = logger()
|
||||
val log = logger()
|
||||
val b64d = Base64.getMimeDecoder()
|
||||
val b64e = Base64.getMimeEncoder()
|
||||
}
|
||||
@@ -51,13 +51,11 @@ class CompressionFilter : OncePerRequestFilter() {
|
||||
try {
|
||||
resp.outputStream.use { it.write(result); it.flush() }
|
||||
} catch (e: EofException) {
|
||||
logger.warn("- EOF: Client closed connection when writing result")
|
||||
log.warn("- EOF: Client closed connection when writing result")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter games that are not diva
|
||||
*/
|
||||
/** Only games (other than WACCA) require response compression */
|
||||
override fun shouldNotFilter(req: HttpServletRequest) =
|
||||
!(req.servletPath.startsWith("/g/") && !req.servletPath.startsWith("/g/wacca"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user