ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ก ํด๊ฒฐ์ฑ
- JPAConfig ํ์ผ ์์ฑํ๊ธฐ
@Configuration
@EnableJpaAuditing
@EnableJpaRepositories(basePackages = "cupitoo.wtwt.config")
public class JPAConfig {
@PersistenceContext
private EntityManager entityManager;
@Bean
public JPAQueryFactory queryFactory() {
return new JPAQueryFactory(entityManager);
}
}
[Java] ์๋ฌ ์์ ์ผ์ง : required a bean of type 'com.querydsl.jpa.impl.JPAQueryFactory' that could not be found.
JPAQueryFactory ๋ฅผ import ํ๋ฉด์ ๋ฐ์ํ ์ค๋ฅ์ ๋๋ค. ์ด๋ ์ฃผ๋ก IntelliJ ์์ ๋ฐ์ํ๋ ์ค๋ฅ์ธ๋ฐ @SpringBootApplication ์ scanBasePackages ์ค์ ์ ํด์ฃผ๋ฉด ํด์ค๋ค๊ณ ๋์์์ต๋๋ค. ์ฐ์ ์์๋ฅผ ๋ณด๊ฒ ์ต๋๋ค. @Repo
abbo.tistory.com
'๋ฐฑ์๋ > Spring' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์คํ๋ง์์ ๋ก๊น ์ ํด๋ณด์๐ (0) | 2023.10.17 |
---|---|
์คํ๋ง ํ๋ ์์ํฌ์ ํต์ฌ ๊ฐ๋ ๋ค (2) | 2023.10.10 |
[์คํ๋ง] ๋จ์ถํค ๋ชจ์ (0) | 2023.07.07 |
[์ค๋ฅ] Port 8080 was already in use (0) | 2023.07.07 |
[์ค๋ฅ] Attempt to recreate a file for type (0) | 2023.07.07 |