프로그래밍/Mybatis
-
mybatis - String, Char 변수 값에 대해프로그래밍/Mybatis 2021. 5. 19. 22:18
뉴딜 일자리 교육을 받으면서 처음으로 스프링 MVC구조에 대해서 공부하고 페이지를 만들어 보고 있다. 사실 이전 AA분이 스프링을 커스터마이징 했기 때문에 정통 스프링 하고는 조금 차이가 있다고 이야기를 들었다. 아무튼 작업하던 도중 Java에서 mybatis로 넘겨준 변수가 매퍼단에서 계속 인식되지 않아 원하는 대로 쿼리가 흘러가지 않았고 머리를 엄청 싸매던 도중 옆에 있는 형이 이거 아닐까하고 해서 바꿨는데 됐다. 이제 그 점을 이야기해보려고 한다. 자바에서 넘겨준 state라는 변수는 한자리의 String 값을 가지고 있다. 이 폼과 똑같은 폼으로 다른 페이지를 작업했고 문제가 없었기에 문법 또한 똑같이 썼다. 그러나 달랐던 점은 이전 폼은 변수값이 두 자리였다는 것이고 이번에는 한자리의 값인 것이..