mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
test: add vul-playframework
This commit is contained in:
@@ -37,6 +37,7 @@ include("vul:vul-springboot2-undertow")
|
||||
include("vul:vul-springboot3")
|
||||
include("vul:vul-springboot2-webflux")
|
||||
include("vul:vul-springboot3-webflux")
|
||||
include("vul:vul-playframework")
|
||||
include("memshell-agent:memshell-agent-attacher")
|
||||
include("memshell-agent:memshell-agent-asm")
|
||||
include("memshell-agent:memshell-agent-javassist")
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package controllers;
|
||||
|
||||
import play.mvc.Controller;
|
||||
import play.mvc.Http;
|
||||
import play.mvc.Result;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/8/21
|
||||
*/
|
||||
public class TestController extends Controller {
|
||||
public TestController() {
|
||||
System.out.println("init");
|
||||
}
|
||||
|
||||
public Result index(Http.Request request) {
|
||||
request.queryString().forEach((k, v) -> {
|
||||
System.out.println(k + ":" + Arrays.toString(v));
|
||||
});
|
||||
return ok("hello world");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import play.gradle.plugin.PlayPlugin
|
||||
|
||||
plugins {
|
||||
id("org.playframework.play") version "3.1.0-M2"
|
||||
id("org.playframework.twirl") version "2.0.9"
|
||||
}
|
||||
|
||||
val scalaVersion = System.getProperty("scala.version", PlayPlugin.DEFAULT_SCALA_VERSION).trimEnd { !it.isDigit() }
|
||||
|
||||
dependencies {
|
||||
implementation(platform("org.playframework:play-bom_$scalaVersion:3.0.8"))
|
||||
|
||||
// implementation("org.playframework:play-pekko-http-server_$scalaVersion")
|
||||
implementation("org.playframework:play-netty-server_$scalaVersion")
|
||||
|
||||
implementation("org.playframework:play-guice_$scalaVersion")
|
||||
implementation("org.playframework:play-java-forms_$scalaVersion")
|
||||
implementation("org.playframework:play-logback_$scalaVersion")
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.playframework:play-test_$scalaVersion")
|
||||
}
|
||||
|
||||
tasks.withType<ScalaCompile>().configureEach {
|
||||
options.compilerArgs.addAll(listOf("-Xlint:unchecked", "-Xlint:deprecation", "-Werror"))
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
# This is the main configuration file for the application.
|
||||
# https://www.playframework.com/documentation/latest/ConfigFile
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!-- https://www.playframework.com/documentation/latest/SettingsLogger -->
|
||||
|
||||
<!DOCTYPE configuration>
|
||||
|
||||
<configuration>
|
||||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
|
||||
<import class="ch.qos.logback.classic.AsyncAppender"/>
|
||||
<import class="ch.qos.logback.core.FileAppender"/>
|
||||
<import class="ch.qos.logback.core.ConsoleAppender"/>
|
||||
|
||||
<appender name="FILE" class="FileAppender">
|
||||
<file>${application.home:-.}/logs/application.log</file>
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<pattern>%date [%level] from %logger in %thread - %message%n%xException</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ConsoleAppender">
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<pattern>%highlight(%-5level) %logger{15} - %message%n%xException{10}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="ASYNCFILE" class="AsyncAppender">
|
||||
<appender-ref ref="FILE"/>
|
||||
</appender>
|
||||
|
||||
<appender name="ASYNCSTDOUT" class="AsyncAppender">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</appender>
|
||||
|
||||
<logger name="play" level="INFO"/>
|
||||
<logger name="application" level="DEBUG"/>
|
||||
|
||||
<root level="WARN">
|
||||
<appender-ref ref="ASYNCFILE"/>
|
||||
<appender-ref ref="ASYNCSTDOUT"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
@@ -0,0 +1,2 @@
|
||||
# Routes
|
||||
GET /test controllers.TestController.index(request: Request)
|
||||
@@ -0,0 +1 @@
|
||||
sbt.version=1.11.3
|
||||
@@ -0,0 +1 @@
|
||||
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.8")
|
||||
Reference in New Issue
Block a user