강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

뚜루뚜루님의 프로필 이미지
뚜루뚜루

작성한 질문수

스프링 부트와 리액트로 구현하는 소셜 로그인

다운로드 및 실행 방법

socialLoginSpa1703 스프링 실행 오류납니다.

작성

·

135

0

socialLoginSpa1703 소스코드를 다운받고

인텔리제이로 프로젝트를 열었습니다.

jdbc 설정대로 mysql을 생성하였고 bootRun으로 실행시키면 프로젝트는 실행됩니다.

강의와같이 localhost:8080 이 접속이 안되고

localhost에 대한 액세스가 거부됨

이 페이지를 볼 수 있는 권한이 없습니다.

HTTP ERROR 403
가 뜹니다. 확인 부탁드려요


2025-06-07T13:23:42.478+09:00 INFO 46412 --- [ restartedMain] c.e.demo.SocialLoginSpa1703Application : Starting SocialLoginSpa1703Application using Java 17.0.15 with PID 46412 (C:\Users\HP\Desktop\�Ǽ�ȣ\Project\SocialLoginSpa1703\build\classes\java\main started by HP in C:\Users\HP\Desktop\�Ǽ�ȣ\Project\SocialLoginSpa1703)

2025-06-07T13:23:42.483+09:00 INFO 46412 --- [ restartedMain] c.e.demo.SocialLoginSpa1703Application : No active profile set, falling back to 1 default profile: "default"

2025-06-07T13:23:42.566+09:00 INFO 46412 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

2025-06-07T13:23:42.566+09:00 INFO 46412 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'

2025-06-07T13:23:44.141+09:00 INFO 46412 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.

2025-06-07T13:23:44.275+09:00 INFO 46412 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 119 ms. Found 2 JPA repository interfaces.

2025-06-07T13:23:45.451+09:00 INFO 46412 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)

2025-06-07T13:23:45.477+09:00 INFO 46412 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]

2025-06-07T13:23:45.478+09:00 INFO 46412 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.39]

2025-06-07T13:23:45.585+09:00 INFO 46412 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

2025-06-07T13:23:45.587+09:00 INFO 46412 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3018 ms

2025-06-07T13:23:45.876+09:00 INFO 46412 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]

2025-06-07T13:23:46.037+09:00 INFO 46412 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.5.3.Final

2025-06-07T13:23:46.427+09:00 INFO 46412 --- [ restartedMain] o.h.c.internal.RegionFactoryInitiator : HHH000026: Second-level cache disabled

2025-06-07T13:23:47.214+09:00 INFO 46412 --- [ restartedMain] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer

2025-06-07T13:23:47.301+09:00 INFO 46412 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...

2025-06-07T13:23:47.595+09:00 INFO 46412 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@3419a5dd

2025-06-07T13:23:47.600+09:00 INFO 46412 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.

2025-06-07T13:23:49.656+09:00 INFO 46412 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)

2025-06-07T13:23:49.824+09:00 INFO 46412 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'

2025-06-07T13:23:50.469+09:00 INFO 46412 --- [ restartedMain] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used.

2025-06-07T13:23:51.243+09:00 WARN 46412 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

2025-06-07T13:23:52.357+09:00 INFO 46412 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729

2025-06-07T13:23:52.418+09:00 INFO 46412 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'

2025-06-07T13:23:52.428+09:00 INFO 46412 --- [ restartedMain] c.e.demo.SocialLoginSpa1703Application : Started SocialLoginSpa1703Application in 10.793 seconds (process running for 11.915)

2025-06-07T13:24:32.032+09:00 INFO 46412 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'

2025-06-07T13:24:32.032+09:00 INFO 46412 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'

2025-06-07T13:24:32.035+09:00 INFO 46412 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms

2025-06-07T13:24:32.090+09:00 INFO 46412 --- [nio-8080-exec-2] c.e.d.security.JwtAuthenticationFilter : doFilterInternal

답변 1

0

온코딩님의 프로필 이미지
온코딩
지식공유자

지금 보여주신 메시지를 확인해 보니 제대로 실행이 되었네요.

socialLoginSpa1703은 SPA 프론트엔드 클라이언트 프로그램에 대한 백엔드 서버입니다.

그래서, 8080 포트로 바로 접속하시면 "/" 루트에 대한 웹페이지 정의가 안되어 있습니다.

즉, MPA 형식의 @Controller를 지정하고 "/" 경로에 해당하는 타임리프 페이지를 만들어 줘야 합니다.

socialLoginSpa1703 프로젝트는 RESTful 백엔드 서버로 띄어놓고, 리액트 프론트엔드 프로그램을 작동시켜서 리액트 프로그램으로 socialLoginSpa1703 백엔드 서버의 REST API를 호출해야 합니다.

원하시는 웹 화면을 보실려면 MPA 형태로 개발된 socialLoginWeb1703 프로젝트를 실행시켜야 합니다.

감사합니다.

뚜루뚜루님의 프로필 이미지
뚜루뚜루

작성한 질문수

질문하기