Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting error when using IntelliJ IDEA #124

Open
cheonjeongdae opened this issue Apr 13, 2018 · 3 comments
Open

Setting error when using IntelliJ IDEA #124

cheonjeongdae opened this issue Apr 13, 2018 · 3 comments
Labels

Comments

@cheonjeongdae
Copy link
Contributor

After intellij idea starts spring boot.
When connected to the
http: // localhost: 9090 / login / login.do
404 error occurs.

/WEB-INF/views/login/login.jsp
I can not find it.
It uses the same source, and works fine in eclipse.

    @Bean
@ConditionalOnMissingBean(InternalResourceViewResolver.class)
public InternalResourceViewResolver viewResolver() {
	InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
	viewResolver.setPrefix("/WEB-INF/views");
	viewResolver.setSuffix(".jsp");
	viewResolver.setOrder(3);
	return viewResolver;
}

I can not find any reason.

@Jeongyong-park
Copy link

intelliJ랑 eclipse 둘다 쓰는데요,
viewResolver.setPrefix("/WEB-INF/views/"); 로 변경하면 될듯합니다.

@cheonjeongdae
Copy link
Contributor Author

ViewResolver 설정은 맞는거 같습니다.

/WEB-INF/views + viewname + .jsp 인데....
viewname을 /login/login 과 같은 형태로 넘기고 있습니다.
spring boot 가 resoures 밑을 기본으로 찾는게 문제가 아닌가 싶습니다.

intellij 에서 facet 설정으로 webapps 를 잡아 줬는데도 인식을 못하네요.
eclipse 사용하다가 intellij 구입해서 사용한지 며칠이 안되서
헤매고 있습니다.

아니면 제가 구성한 프로젝트 자체가 근본적으로 문제가 좀 있을수도 있지 싶습니다.
maven 때 사용하던 구조이다 보니....
intellij 의 단일 프로젝트 형태와는 맞지 않나 싶기도 하고......

@cheonjeongdae
Copy link
Contributor Author

bootrun

Run gradle bootRun and look for jsp.
However, this is not the right way.
I guess I'll have to find another way.

  • In settings.gradle, try replacing submodule include with includeBuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants