DEV

    [solved]is missing the class attribute 'ExtensionOfNativeClass'

    interface를 생성 후, 하이어라키- 객체 에는 붙일 수 없다. 빼면 해결

    private method Test

    public void testClass(Gson gson){ ... 생성자(Environment env){} } @RunWith(MockitoJUnitRunner.class) public class LocalTest{ TestClass testClass; @Mock Environment env; @Before public void setUp() { testClass = new TestClass(env); } @Test public void privateMethodCall_Test() { Logger log = (Logger) LoggerFactory.getLogger(LocalTest.class); try { Class c = testclass.getClass(); Method method = c.get..

    Unity 코루틴(coroutine) 관련하여 ..

    일반 함수를 실행하면, 값을 반환하기 전에 실행이 완료된다. 그래서 (일정)시간이 지난 후에 실행되어야 하는 이벤트 호출에 사용할 수 없다. ex. 페이드와 같은 애니메이션 처리를 일반 함수에 처리할 수 없다. 그래서 코루틴 함수를 사용하여 중간에 시간(프레임)정지 처리도 할 수 있는 방법이 있다. 근데, 해당 이벤트 처리 후에 값을 받아오고 싶어졌다. return bool 을 원해서 찾아본 결과 1. 코루틴이 끝나면 함수가 실행되도록 public void callbackTest(){ //for Lambda StartCoroutine(callbackTestCor((x) => { Debug.Log("ServerCallBackTest: " + x); } )); } IEnumerator callbackTest..

    게임서버 구축하기(2) - aws에 spring 배포

    게임서버 구축하기(2) - aws에 spring 배포

    bootRun 터미널 꺼버리면 서버도 같이 죽어서 https://blog.naver.com/PostView.nhn?blogId=writer0713&logNo=221542130445&redirect=Dlog&widgetTypeCall=true&directAccess=false 이제 터미널 꺼져도 서버가 안죽는다. 1. ./gradlew bootRun nohup하면 백그라운드 확인해야 한다. - 끌려면 pid kill 해야한다. netstat -ano | findstr 8080 nohup ./gradlew bootRun error 깃 클론 후 ./gradlew bootRun를 돌리려고 하니 에러가 났다.. Starting a Gradle Daemon (subsequent builds will be faste..

    Lombok 어노테이션

    @Getter/@Setter : 자동으로 get/set을 생성해준다 - getXXX(), setXXX(), (boolean은 isXXX()) 자동 생성 - 기본적으로 접근제한자는 public - @Getter(AccessLevel.PRIVATE)과 같이 처리할 수 있다. - AccessLevel : PUBLIC, PROTECTED, PACKAGE, PRIVATE - 필드에 @Getter,Setter를 지정할 수도 있지만 클래스에 붙여도 된다. - 클래스에 생성하고 특정 필드의 getter/setter를 생성하고 싶지 않으면 AccessLevel.None을 달아주면 된다. @NoArgsConstructor : 기본 생성자 생성 (매개변수 X) - input 파라미터가 없는 생성자를 자동으로 생성해준다 - ..

    mac spring mysql DB 연결 서버로 쓰기

    mac spring mysql DB 연결 서버로 쓰기

    url: jdbc:mysql://localhost:3306/ 으로 접속하다가 이제는 jdbc:mysql://xxx.xxx.x.x:3306/mysql로 접속하고 싶다. https://developer-joe.tistory.com/166 참고했는데 흠.. https://freeprog.tistory.com/167 이게 도움이 많이 됐다. (맥 mysql 외부 ip 접속) 1. 맥북에서 설정 1) 새로운 유저를 만든다. create user 'gamer'@'%' identified by '비밀번호'; 새로 만들어줬다. mysql> select host, user from user; +-----------+------------------+ | host | user | +-----------+----------..

    java8 default 메소드, 스태틱 메소드

    자바 8 부터는 기본 메소드로 API에 변화가 생겼다. #디폴트 메서드 인터페이스에서 미리 메서드 내용을 선언할 수 있다. public interface test{ void printName(); default void printNameUpperCase(){ // default 메서드는 이렇게 내용을 선언을 할 수 있다. System.out.println(getName().toUpperCase()); } String getName(); } public class DefaultTest implements test{ String name; @Override public void printName(){ System.out.println(this.name); } @Override public void getNa..

    [Unity] IAP 에러 / 예시 따라하기

    [Unity] IAP 에러 / 예시 따라하기

    IAP 결제 직후 gameObject를 false 해버리면 나는 문제였다. IAP 오류error 1)unity iap InvalidOperationException: Collection was modified; enumeration operation may not execute.2) Purchase not correctly processed for product "상품명". Add an active IAPButton to process this purchase, or add an IAPListener to receive any unhandled purchase events. UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,in..

    vscode 단축키 /// summary shortcut!!

    vscode 단축키 /// summary shortcut!!

    https://marketplace.visualstudio.com/items?itemName=k--kato.docomment C# XML Documentation Comments - Visual Studio Marketplace Extension for Visual Studio Code - Generate C# XML documentation comments for /// marketplace.visualstudio.com Type "///", it auto-generates an XML documentation comment like this: 드디어 찾았다... VSCODE에서는 지원 안해줘서 익스텐션 깔아야함. https://www.biew.co.kr/entry/Visual-Studio-CodeVS..

    [Unity] 클릭이 필요없는 Canvas 처리 -  Canvas Group (canvas uninteractable/interactable false)

    [Unity] 클릭이 필요없는 Canvas 처리 - Canvas Group (canvas uninteractable/interactable false)

    사용할 Canvas에 Canvas Group component를 추가해서 제어할 수 있다. 자꾸 클릭할때 범위가 겹쳐서 버튼들이 클릭이 잘 안되고, 보이기만 해야되는 ui를 canvas group에서 interactable - false Blocks Raycasts - false 로 설정해주었다. ( 나는 raycast 기능도 필요없어서 해제했다.) https://docs.unity3d.com/kr/530/ScriptReference/CanvasGroup.html

    java8 람다식

    람다식(lambda expression) -자바에서 클래스를 생성하지 않고 함수의 호출로 기능을 수행한다. -외부값을 건드리지 않고(사이드이펙트가 없다.), 주어진 매개변수로 결과를 리턴한다. //Before int add(int x, int y){ return x+ y; } //After (int x, int y) -> {return x+y;} @FunctionalInterface @FunctionalInterface // 함수형인터페이스, 이 어노테이션이 있으면 여러개의 메서드를 선언하면 에러가 난다. Public interface MaxTest{ Int getMax(int x, int y); // 인터페이스 구현부 1개 선언해야함. //더 추상 메서드를 선언하지 않는다. } . . . MaxTest..

    [solved] Unity Build Error : Access to the path "Library/BuildPlayerData\Editor" is denied.

    [solved] Unity Build Error : Access to the path "Library/BuildPlayerData\Editor" is denied.

    UnauthorizedAccessException: Access to the path "Library/BuildPlayerData\Editor" is denied. System.IO.Directory.Delete (System.String path) (at :0) System.IO.Directory.RecursiveDelete (System.String path) (at :0) System.IO.Directory.Delete (System.String path, System.Boolean recursive) (at :0) UnityEditor.VisualStudioIntegration.DirectoryIOProvider.Delete (System.String path, System.Boolean recu..

    Java8 람다

    람다식(lambda expression) -자바에서 클래스를 생성하지 않고 함수의 호출로 기능을 수행한다. -외부값을 건드리지 않고(사이드이펙트가 없다.), 주어진 매개변수로 결과를 리턴한다. Before int add(int x, int y){ return x+ y; } After (int x, int y) -> {return x+y;} 인터페이스를 선언하고, 람다를 활용하는 예제 @FunctionalInterface // 함수형인터페이스, 이 어노테이션이 있으면 여러개의 메서드를 선언하면 에러가 난다. Public interface MaxTest{ Int getMax(int x, int y); // 인터페이스 구현부 1개 선언해야함. //더 메서드를 선언하지 않는다. } . . . MaxTest ma..

    java: warning: source release 11 requires target release 11

    java: warning: source release 11 requires target release 11

    Project Structure -> Project -> 11 로

    [solved] Unity Error -  Animation Events don't always fire.

    [solved] Unity Error - Animation Events don't always fire.

    Unity Error Animation이 끝난 후에 트리거로 설정한 애니메이션이 실행이 안된다. 좀 찾아보니 간헐적으로 실행한다고 되어있다 ㅡ.ㅡ (Unity Animation end function is not fired.) https://answers.unity.com/questions/806949/animation-events-not-firing.html Animation events not firing - Unity Answers answers.unity.com MY TODO : Animation Event에서 AttackEnd를 정상적으로 호출해야된다. 내부 구조 : AttackEnd() { isAttacking = false; } isAttacking 변수가 계속 false처리가 안되고, tr..

    SQL 튜닝 (1) - 실행계획

    실행계획 SQL 튜닝이란? 내가 작성한 SQL의 내부로직을 알기, 쓸데없는 작업 없애나가기. (병목현상 제거하기) 인덱스 변경/조인 변경/액세스 변경 /오브젝트, 처리 프로세스 변경 SQL의 병목현상? Response Time은 사용자가 기다리는 시간이다. 만약에 SQL 기능 수행이 2초만 걸렸지만 wait time 1초가 생겨 사용자는 응답을 3초 후 받을 수 있다. 서버프로세스가 하는일 parse → bind → execute → fetch 1.Parse syntax check 를 수행 테이블명, 컬럼명을 확인하고 권한, 보안 검사가 끝나면 parse tree를 생성한다.(컴파일 코드를 생성한다) 어느 방법으로 수행해야 빠른지 (최적화 수행) 1차적으로 튜닝을 해준다. → 즉, execution pl..

    [Spring] Build 후 실행

    [Spring] Build 후 실행

    java -jar gameServer-0.0.1-SNAPSHOT.jar 실행 Exception in thread "main" java.lang.UnsupportedClassVersionError: has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> 55.0 : Java 11 내 컴퓨터에 깔려있는 자바는 Java 8 ... www.oracle.com/kr/java/technologies/javase-jdk11-downloads.html https://w..

    [Spring] application. properties 변수 맵핑

    [Spring] application. properties 변수 맵핑

    // application.properties test.msg = testmsg test.msg = testmsg

    [Spring] Server 구축 [1]

    [Spring] Server 구축 [1]

    Mybatis sqlMapping을 제공하는 dependency https://mvnrepository.com/ maven으로 생성했기 때문에 pom.xml에 mysql dependency 추가 DB 연결하자마자 바로 500 에러 발생 ~~ ! ! { "timestamp": "2021-09-08T15:54:38.186+00:00", "status": 500, "error": "Internal Server Error", "path": "/user/1" } # Spring boot 500 에러 원인.. -- Access denied for user '내컴퓨터사용자명'@'localhost' (using password: YES) 라고 떴다. 파악해보니 create user '내컴퓨터사용자명'@'localhos..

    Unity Build Error  after try under API 28

    Unity Build Error after try under API 28

    WARNING: The option 'android.enableR8' is deprecated and should not be used anymore. It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8. Unity Gradle Error: Colliding Attributes The attribute provider#androidx.work.impl.WorkManagerInitializer@authorities=com.McorGames.DarkPrincess.workmanager-init in :androidx.work.work-runtime-2.1.0: ..