File tree Expand file tree Collapse file tree
src/main/java/com/example/FixLog Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .example .FixLog .config ;
2+
3+ import com .querydsl .jpa .impl .JPAQueryFactory ;
4+ import jakarta .persistence .EntityManager ;
5+ import jakarta .persistence .PersistenceContext ;
6+ import org .springframework .context .annotation .Bean ;
7+ import org .springframework .context .annotation .Configuration ;
8+
9+ @ Configuration
10+ public class QuerydslConfig {
11+
12+ @ PersistenceContext
13+ private EntityManager entityManager ;
14+
15+ @ Bean
16+ public JPAQueryFactory jpaQueryFactory () {
17+ return new JPAQueryFactory (entityManager );
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ package com .example .FixLog .config ;
2+
3+ import io .swagger .v3 .oas .models .Components ;
4+ import io .swagger .v3 .oas .models .OpenAPI ;
5+ import io .swagger .v3 .oas .models .info .Info ;
6+ import io .swagger .v3 .oas .models .security .SecurityRequirement ;
7+ import io .swagger .v3 .oas .models .security .SecurityScheme ;
8+ import org .springframework .context .annotation .Bean ;
9+ import org .springframework .context .annotation .Configuration ;
10+
11+ @ Configuration
12+ public class SwaggerConfig {
13+
14+ @ Bean
15+ public OpenAPI openAPI () {
16+ final String securitySchemeName = "bearerAuth" ;
17+
18+ return new OpenAPI ()
19+ .info (new Info ()
20+ .title ("FixLog API Docs" )
21+ .description ("FixLog 백엔드 API 명세서" )
22+ .version ("v1.0" ))
23+ .addSecurityItem (new SecurityRequirement ().addList (securitySchemeName )) // 전체 보안 요구사항
24+ .components (new Components ().addSecuritySchemes (securitySchemeName ,
25+ new SecurityScheme ()
26+ .name (securitySchemeName )
27+ .type (SecurityScheme .Type .HTTP )
28+ .scheme ("bearer" )
29+ .bearerFormat ("JWT" )
30+ ));
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ package com .example .FixLog .controller ;
2+
3+ import org .springframework .stereotype .Controller ;
4+ import org .springframework .web .bind .annotation .GetMapping ;
5+
6+ @ Controller
7+ public class RedirectController {
8+
9+ @ GetMapping ("/" )
10+ public String redirectToMain () {
11+ return "redirect:/main" ;
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments