Posts
Q&A
PathVariable์ด ์ ๋๋ก ์ธ์๋์ง ์๋ ๋ฌธ์
์๋ ํ์ธ์. Spring 6.1 ๋ถํฐ๋ LocalVariableTableParameterNameDiscoverer๊ฐ ์ ๊ฑฐ๋์ด์ ๋งค๊ฐ๋ณ์ ์ด๋ฆ์ ์ถ๋ก ํ๋ ค๋ฉด -parameters๋ผ๋ ์ปดํ์ผ๋ฌ ์ต์ ์ ๋ถ์ฌ์ผํ๋ค๊ณ ํ๋ค์.https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention์๋ง๋...build.gradle์ ๋ค์ ์ต์ ์ ๋ฃ์ด์...tasks.withType(JavaCompile).configureEach { options.compilerArgs.add("-parameters") } -parameters ์ปดํ์ผ๋ฌ ์ต์ ์ด ๋ถ๊ฒ๋๋ฉด ํ๋ผ๋ฏธํฐ ์ด๋ฆ์ ์๋ตํด๋ ์ ๋์ํ ๊ฑฐ์์..์์ ๋งํฌ ์ค๋ช ์์๋ IntelliJ ๋๋ Eclipse IDE์ ์ง์ ์ค์ ํ๋ ๋ฐฉ๋ฒ๋ ๋์์๋ค์.
- Likes
- 0
- Comments
- 2
- Viewcount
- 780
Q&A
H2 DB ์์ฑ
์๋ ํ์ธ์.์ ๊ฐ ๊ฐ์๋ ๋ค์ด๋ณด์ง ์์ ์ ํํ๊ฒ๋ ๋ชจ๋ฅด๊ฒ ์ง๋ง,์๋ง๋ ๊ฐ์์ ์ฌ์ฉ๋ Spring Boot ๋ฒ์ ๋ณด๋ค ์ต์ ๋ฒ์ ์ ์ฌ์ฉํ๊ฒ ๋๋ฉด์์๊ธฐ๋ ์ด์ ๊ฐ์ต๋๋ค. Spring Boot 3.2.4๋ฅผ ์ฌ์ฉํ์ จ๋๋ฐ,์ด ๋ฒ์ ์์๋ JUnit 4์ ํธํ์ฑ์ ๋ณด์ฅํ๋ JUnit Vintage Engine ๊ฐ ๊ธฐ๋ณธ์ผ๋ก ํฌํจ๋์ง ์์ JUnit 5์ ์ด๋ ธํ ์ด์ ํด๋์ค๋ฅผ ์ฌ์ฉํด์ผํฉ๋๋ค.// โจ ์ฐธ์กฐpackage jpabook.jpashop; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; // โจ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.transaction.annotation.Transactional; // @RunWith(SpringRunner.class) // โจ @SpringBootTest ๋ด๋ถ์ @ExtendWith(SpringExtension.class)๊ฐ ์์ด์ ๋ถํ์ํจ. @SpringBootTest class MemberRepositoryTest { @Autowired MemberRepository memberRepository; @Test // โจ @Transactional void testMember() throws Exception { // given Member member = new Member(); member.setUsername("memberA"); // when Long saveId = memberRepository.save(member); Member findMember = memberRepository.find(saveId); // when Assertions.assertThat(findMember.getId()).isEqualTo(member.getId()); Assertions.assertThat(findMember.getUsername()).isEqualTo(member.getUsername()); } } ๊ทธ๋ฆฌ๊ณ ์ ๋ h2 ์ค์น๋ฅผ ๋ณ๋ ์ค์นํ ์ํ๊ฐ ์๋์ฌ์ embedded ๋ชจ๋ ์คํ ์ํ์์ ํ ์คํธ ์ฝ๋ ์คํ๋ง ํ์ธ๋ง ํ๋ ค๊ณ ..spring: # datasource: # url: jdbc:h2:tcp://localhost/~/jpashop;MVCC=TRUE # username: sa # password: # driver-class-name: org.h2.Driver DB ์ฐ๊ฒฐ ์ ๋ณด ๋ด์ฉ์ ์ฃผ์์ฒ๋ฆฌํ๊ณ ํ ์คํธ ์คํ๋ง ํ์ธ๋ง ํ๋๋ฐ์, ํ ์คํธ๋ ํต๊ณผ ํ์ต๋๋ค.
- Likes
- 0
- Comments
- 1
- Viewcount
- 559
Q&A
property editor ์ค์นํ ๋ ์ค๋ฅ๊ฐ ๋๋ค์
์๋ ํ์ธ์.์์ ์๋ ์๋ ์ ๋ฐ์ดํธ ์ฌ์ดํธ๊ฐ ์ ๋์ํ์๋๋ฐ..์์ฆ์ ์๋ ์ฌ์ดํธ ๋ชจ๋ ๋์ง ์๋๋ผ๊ตฌ์.http://propedit.sourceforge.jp/eclipse/updateshttps://osdn.net/projects/propedit/storage/eclipse/updates/sourceforge ์ชฝ์ ๊ณ์ ์ด ์์ด์ง ๊ฒ ๊ฐ๊ณ , osdn์ ๋๋ฌด ์ฐ๊ฒฐ์ด ๋ถ์์ ํฉ๋๋ค. ๊ทธ๋๋ osdn์ SVN ์ฌ์ดํธ๋ ๋น ๋ฅธ ํธ์ด๋ผ, ์ฌ๊ธฐ์ jar๋ฅผ ๋ค์ด๋ก๋ ๋ฐ์ eclipse์ dropins ๋๋ ํฐ๋ฆฌ์ ๋ฃ์ด์ ์๋ ์ค์นํ๋ ๊ฒ์ด ๋์ ์ ์์ต๋๋ค. http://svn.osdn.net/svnroot/propedit/trunk/PropertiesEditorUpdateSite/eclipse/updates/plugins/jp.gr.java_conf.ussiy.app.propedit_6.0.5.jarhttp://svn.osdn.net/svnroot/propedit/trunk/PropertiesEditorUpdateSite/eclipse/updates/plugins/jp.gr.java_conf.ussiy.app.propedit.nl_6.0.0.jareclipse๋ฅผ ์ข ๋ฃํ ์ํ์์ ์์ 2๊ฐ์ jarํ์ผ์ eclipse.exe๊ฐ ์์นํ ๊ฒฝ๋ก ํ์์ dropins ๋๋ ํฐ๋ฆฌ์ ๋ณต์ฌํด์ค๋๋ค.๊ทธ๋ฆฌ๊ณ eclipse๋ฅผ ์คํํด์ ํ๋กํผํฐ ํ์ผ์ ์ค๋ฅธ์ชฝ ๋ง์ฐ์ค ๋ฉ๋ด ์ด์ด์ ๋ณด๋ฉด, ์ด ์ ์๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.(์ฌ์ง)๋์ ํ์ธ ํ๊ฒฝEclipse 2023-12
- Likes
- 0
- Comments
- 2
- Viewcount
- 3K




