추상화 추가
This commit is contained in:
parent
838db494d1
commit
4285da6ba9
|
|
@ -4,12 +4,8 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="96b9b4a5-b1bc-45b3-baf2-17942ad056f6" name="변경" comment="3차 초기화">
|
||||
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||
<list default="true" id="96b9b4a5-b1bc-45b3-baf2-17942ad056f6" name="변경" comment="웹사이트 1차 제작">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/HELP.md" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/dev/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/dev/application.properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/live/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/live/application.properties" afterDir="false" />
|
||||
</list>
|
||||
|
|
@ -22,11 +18,11 @@
|
|||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="explicitlyEnabledProfiles" value="dev" />
|
||||
<option name="explicitlyEnabledProfiles" value="live" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 2
|
||||
}]]></component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 2
|
||||
}</component>
|
||||
<component name="ProjectId" id="3COUL5RY7op3FL1tvImKjMX11Vl" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
|
|
@ -34,15 +30,80 @@
|
|||
<option name="showMembers" value="true" />
|
||||
<option name="showVisibilityIcons" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"Spring Boot.이름이 지정되지 않았습니다.executor": "Run",
|
||||
"git-widget-placeholder": "main",
|
||||
"kotlin-language-version-configured": "true"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"Maven.live build.executor": "Run",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"Spring Boot.이름이 지정되지 않았습니다.executor": "Run",
|
||||
"git-widget-placeholder": "main",
|
||||
"kotlin-language-version-configured": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="RunManager">
|
||||
}</component>
|
||||
<component name="RunManager" selected="Spring Boot.이름이 지정되지 않았습니다">
|
||||
<configuration name="dev build" type="MavenRunConfiguration" factoryName="Maven">
|
||||
<MavenSettings>
|
||||
<option name="myGeneralSettings" />
|
||||
<option name="myRunnerSettings" />
|
||||
<option name="myRunnerParameters">
|
||||
<MavenRunnerParameters>
|
||||
<option name="cmdOptions" />
|
||||
<option name="profiles">
|
||||
<set />
|
||||
</option>
|
||||
<option name="goals">
|
||||
<list>
|
||||
<option value="-Pdev" />
|
||||
<option value="clean" />
|
||||
<option value="install" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="multimoduleDir" />
|
||||
<option name="pomFileName" />
|
||||
<option name="profilesMap">
|
||||
<map />
|
||||
</option>
|
||||
<option name="projectsCmdOptionValues">
|
||||
<list />
|
||||
</option>
|
||||
<option name="resolveToWorkspace" value="false" />
|
||||
<option name="workingDirPath" value="$PROJECT_DIR$" />
|
||||
</MavenRunnerParameters>
|
||||
</option>
|
||||
</MavenSettings>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="live build" type="MavenRunConfiguration" factoryName="Maven">
|
||||
<MavenSettings>
|
||||
<option name="myGeneralSettings" />
|
||||
<option name="myRunnerSettings" />
|
||||
<option name="myRunnerParameters">
|
||||
<MavenRunnerParameters>
|
||||
<option name="cmdOptions" />
|
||||
<option name="profiles">
|
||||
<set />
|
||||
</option>
|
||||
<option name="goals">
|
||||
<list>
|
||||
<option value="-Plive" />
|
||||
<option value="clean" />
|
||||
<option value="install" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="multimoduleDir" />
|
||||
<option name="pomFileName" />
|
||||
<option name="profilesMap">
|
||||
<map />
|
||||
</option>
|
||||
<option name="projectsCmdOptionValues">
|
||||
<list />
|
||||
</option>
|
||||
<option name="resolveToWorkspace" value="false" />
|
||||
<option name="workingDirPath" value="$PROJECT_DIR$" />
|
||||
</MavenRunnerParameters>
|
||||
</option>
|
||||
</MavenSettings>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="이름이 지정되지 않았습니다" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
|
||||
<module name="bibimbap" />
|
||||
<option name="SPRING_BOOT_MAIN_CLASS" value="com.pandoli365.bibimbap.BibimbapApplication" />
|
||||
|
|
@ -50,6 +111,11 @@
|
|||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="Maven.live build" />
|
||||
<item itemvalue="Maven.dev build" />
|
||||
<item itemvalue="Spring Boot.이름이 지정되지 않았습니다" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
|
|
@ -74,11 +140,20 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1776256595415</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<task id="LOCAL-00002" summary="웹사이트 1차 제작">
|
||||
<option name="closed" value="true" />
|
||||
<created>1776260511168</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1776260511168</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="3" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="3차 초기화" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="3차 초기화" />
|
||||
<MESSAGE value="웹사이트 1차 제작" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="웹사이트 1차 제작" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.pandoli365.bibimbap.abstracts;
|
||||
|
||||
public class ErrorResult extends Result{
|
||||
public ErrorResult(int status) {
|
||||
super(status);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.pandoli365.bibimbap.abstracts;
|
||||
|
||||
public abstract class Request {
|
||||
public boolean IsReceivedAllField() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.pandoli365.bibimbap.abstracts;
|
||||
|
||||
public abstract class Result {
|
||||
public int status;
|
||||
public String message;
|
||||
|
||||
public Result() {}
|
||||
public Result(int status) {
|
||||
this.status = status;
|
||||
switch (status)
|
||||
{
|
||||
case 200:
|
||||
this.message = "Success"; return;
|
||||
case 400:
|
||||
this.message = "Invalid Request"; return;
|
||||
case 401:
|
||||
this.message = "세션 만료"; return;
|
||||
case 1000:
|
||||
this.message = "NULL USERS"; return;
|
||||
default:
|
||||
System.out.println("잘못된 status 케이스");
|
||||
this.message = "";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.pandoli365.bibimbap.abstracts;
|
||||
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
|
||||
public abstract class Service<Req extends Request, Res extends Result> {
|
||||
|
||||
public boolean is_login = false;
|
||||
|
||||
public abstract Res StartService(HttpSession session, Req request);
|
||||
|
||||
public Res ChackService(HttpSession session, Req request){
|
||||
if (is_login && session.getAttribute("id") == null)
|
||||
return (Res) new ErrorResult(401);
|
||||
if(request != null && !request.IsReceivedAllField())
|
||||
return (Res) new ErrorResult(401);
|
||||
return StartService(session, request);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,10 +9,6 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||
@Controller
|
||||
public class GameController {
|
||||
|
||||
/**
|
||||
* Unity WebGL 빌드를 넣을 경로 예: /webgl/game-{id}/index.html
|
||||
* 해당 폴더에 Build + TemplateData 를 두면 iframe 으로 로드됩니다.
|
||||
*/
|
||||
public static String webglUrlForGame(int gameId) {
|
||||
return "/webgl/game-" + gameId + "/index.html";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
spring.profiles.active=dev
|
||||
spring.profiles.active=live
|
||||
spring.application.name=bibimbap
|
||||
|
||||
# ViewResolver
|
||||
|
|
|
|||
Loading…
Reference in New Issue