월 22,000원
5개월 할부 시다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결스프링 부트 개념과 활용
Thymeleaf의 효용성에 대한 질문입니다.
안녕하세요. 강의 잘 듣고 있습니다. 실제 업무에서 thymeleaf를 흔히 사용하는지 궁금합니다. 만약 앵귤러나 리액트를 사용할 때에도 View Template을 사용하는 경우가 있을까요??
- 미해결스프링 부트 개념과 활용
테스트 코드 오류가 납니다
'''java.lang.AssertionError:Expecting an empty Optional but was containing value: com.sj.datajpa.account.Account@cd6c6a5b.at com.sj.datajpa.account.AccountRepositoryTest.di(AccountRepositoryTest.java:48)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)at org.junit.runners.ParentRunner.run(ParentRunner.java:363)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)at org.junit.runner.JUnitCore.run(JUnitCore.java:137)at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)'''
- 미해결스프링 부트 개념과 활용
강의를 듣다가 궁금한점이 생겼습니다 .
logging.file=logslogging.level.패키지풀네임=DEBUG이걸 properties에 강의처럼 추가한 후에 Runner에서logger.debug("=========================");logger.info("Kita > > >> > > >" + blossomProperties.getAge());logger.info("Kita > > >> > > >" + blossomProperties.getName());logger.info("Kita > > >> > > >" + blossomProperties.getFullname());logger.info("=========================");이렇게 셋팅후에 프로그램을 구동했는데요 .전 debug는 안나오네요 콘솔에 어느부분을 확인해 봐야 할까요 ??
- 미해결스프링 부트 개념과 활용
다중 데이터소스 사용 문의 드립니다.
안녕하세요.강의 감사히 잘 보고 있습니다.궁굼한 점은스프링 부트 환경에서 예를 들어서 MySQL, PostgreSQL 두개 (혹은 그 이상) 의 DBMS 를 사용할때다중 데이터소스를 설정해서 사용하는 법이 궁굼해서 글 남깁니다.
- 미해결스프링 부트 개념과 활용
Thymeleaf XSS 관련 질문드립니다.
안녕하세요.우선 기선님의 엄청난 팬입니다 ㅎㅎ좋은 강의 덕분에 많은 것을 배웠습니다.다름이 아니라, Thymeleaf에서 자체적으로 XSS Prevention을 지원해주는지 여쭤보고 싶네요..XSS 테스트를 위해 샘플 프로젝트를 진행하던 중 Thymeleaf를 이용해서 렌더링 시 '<'가 <로'>'가 >로 알아서 바뀌어 들어가는 것을 확인했는데요. 이게 Model에서 view로 내릴 때, 스프링 부트가 해주는 것인지 혹은 thymeleaf가 지원해주는 것인지 잘 모르겠네요.. 답변해주시면 감사하겠습니다.그리고, @RequestBody의 JSON으로 XSS 공격 시 어떠한 방법으로 막아야 할 지 방법도 좀 알려주시면 감사하겠습니다.
- 미해결스프링 부트 개념과 활용
맥북을 사서 공부하는게 좋을까요?
안녕하세요 스프링을 공부하고있는 대학생입니다.일하시는 분들은 모두 맥os를 사용하시고, 인텔리제이 팁같은걸 봐도 맥 기준으로 나오는 글들이 많더라구요. 지금부터 맥북을 구매해서 맥os를 사용하는게 좋을까요?아니면 아직은 윈도우로 공부해도 괜찮을까요?
- 미해결스프링 부트 개념과 활용
spring.init 은 어디서 볼 수 있나요??
spring.init 설정하는 부분이 없는데어떻게 만들 수 있을까요???
- 미해결스프링 부트 개념과 활용
부모의 부모를 통해 의존성을 따로 세팅하는 게 이해가 가지 않습니다.
안녕하세요 강좌 잘 듣고 있습니다.다름이 아니라 영상 중에 말씀하신 것을 보면,A project 의 parent를 B로 설정한 다음, B의 parent를 spring-boot 로 잡으라는 말씀으로 이해가 되는데,그렇게 하면 spring-boot 의 의존성을 가져오는 거 아닌가요?이해가 가지 않습니다.감사합니다.
- 미해결스프링 부트 개념과 활용
curl and undertow
안녕하세요. 질문드리고 싶은 점이 몇 가지가 있습니다. 1) curl -I -k --http2 https://localhost:8443/hello 를 입력하면 curl: (1) Unsupported protocol 이라는 결과가 나와서 https://simonecarletti.com/blog/2016/01/http2-curl-macosx/ 에 나온 안내대로 진행을 했는데 결과가 바뀌지 않는데, 무엇이 문제일까요? 2) 의존성을 다음과 같이 입력했는데, 계속해서 Tomcat이 실행되는데 무엇이 문제일까요? <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>me.yun</groupId> <artifactId>dec04</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>dec04</name> <description>Demo project for Spring Boot</description> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.1.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <!-- Exclude the Tomcat dependency --> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-undertow</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> 3) 2)에서 입력한 의존성에 다음의 코드가 존재하는 상황입니다. 그런데 Error:(3, 37) java: package org.apache.catalina.connector does not exist 같은 에러가 나오는데 xml 설정이 잘못된 것일까요? package me.yun.dec04; import org.apache.catalina.connector.Connector; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.servlet.server.ServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication @RestController public class Dec04Application { @GetMapping("/hello") public String hello(){ return "Hello Spring"; } public static void main(String[] args) { SpringApplication.run(Dec04Application.class, args); } @Bean public ServletWebServerFactory serverFactory(){ TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); tomcat.addAdditionalTomcatConnectors(createStandardConnector()); return tomcat; } private Connector createStandardConnector(){ Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); connector.setPort(8080); return connector; } }
- 미해결스프링 부트 개념과 활용
공식문서와 예시
안녕하세요.강의 속에서 다음과 같은 코드를 보여 주셨는데요. 첨부해 주신 공식문서에는 이런 예시가 없더라구요. 보통 이런 기본적인 예시 코드들은 공식 문서가 아니라면 어디에서 찾을 수 있을까요?@Componentpublic class PortListener implements ApplicationListener<ServletWebServerInitializedEvent> { @Override public void onApplicationEvent(ServletWebServerInitializedEvent servletWebServerInitializedEvent) { ServletWebServerApplicationContext applicationContext = servletWebServerInitializedEvent.getApplicationContext(); System.out.println(applicationContext.getWebServer().getPort()); }}
- 미해결스프링 부트 개념과 활용
안녕하세요. 강의 속에서는 다음과 같은 코드를 알려주셨는데, 알려주신 공식문서에서는 이런 예제가 없더라구요. 보통 이런 예시들은 어디에 주로 제시되어 있는 것일까요?@Componentpublic class PortListener implements ApplicationListener<ServletWebServerInitializedEvent> { @Override public void onApplicationEvent(ServletWebServerInitializedEvent servletWebServerInitializedEvent) { ServletWebServerApplicationContext applicationContext = servletWebServerInitializedEvent.getApplicationContext(); System.out.println(applicationContext.getWebServer().getPort()); }}
- 미해결스프링 부트 개념과 활용
경고문이 뜹니다.
A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []이 경고는 어떻게 해결하면 되나요??? 단순히 '/'만 쓰지않고 뒤에 다른것을 써주면 문제가 해결되나요?그리고 2.1.1RELEASE에서는 톰켓실행이 안되는데2.0.3.RELEASE에는 문제없이 실행이 되는것을 확인할 수 있었습니다.톰켓버전의 문제가 있는것같습니다.
- 미해결스프링 부트 개념과 활용
2.1.1.RELEASE 에서는 문제없이 자동 설정이 되는데... 버전 낮추니.
버전을 2.0.3.RELEASE로 낮춘 후 실행을 하면 java.lang.IllegalStateException: Unable to read meta-data for class my.spring.auto.HolomanConfiguration 오류가 발생합니다.어떻게 해야하나요?
- 미해결스프링 부트 개념과 활용
WebEnvironment.MOCK에서요!
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK)이것 또한 슬라이싱 테스트로 볼 수 있나요????
- 미해결스프링 부트 개념과 활용
properties에 설정값 질문드립니다.
말씀하신대로 구현해서 실행해보면 다 정상적으로 동작하는데string 값과 int 값중 int는 정상적으로 콘솔에 나오는데지난 강의처럼 인코딩으로 인해서 깨짐이 아니라 'com' 이렇게만 나오는데요문제가 뭘가요. class에서 setter에 "한글"로 넣을 때는 콘솔에 인코딩 문제가 있지는 않았습니다.
- 미해결스프링 부트 개념과 활용
아.... 너무 막히네요 .... window 는 ....
window 기반으로 한부찍어주셨으면 ㅋㅋㅋ...
- 미해결스프링 부트 개념과 활용
Build 실패
오류를 찾고 모두 수정했습니다만, 궁금한 점이 있어 질문드립니다.10:30초경 import 안해도 Holoman을 사용할 수 있다 하셨는데, 막상 Holoman의 pkg와 앱을 돌리는 스프링 pkg가 다르니 cannot find symbol 오류가 나와서 사용할 수 없었습니다. import를 안해도 되려면 pkg명칭은 같아야 하는 건가요? maven에 의존성을 걸어도 pkg는 같아야 하는것 같습니다.Holoman pkg에 복붙한 spring dependency version(2.0.3)이 앱을 돌리는 spring에서 사용하는 버전(2.1.0)과 다르니 error가 나오더라구요. install하는 maven의 모든 spring관련 version도 모두 같아야 하나요?
- 미해결스프링 부트 개념과 활용
/META-INF/resources 에 대한 질문입니다.
안녕하세요.기존 Spring MVC 프로젝트를 boot로 변환하고 있는데 질문이 있습니다.jsp를 사용중이였기에 webapp을 만들고 WEB-INF하위에 jsp 폴더를 만들고spring.mvc.view.prefix=/WEB-INF/jsp/spring.mvc.view.suffix=.jsp설정을 통해 jsp를 띄우려했는데 이방법도있고/META-INF/resources/WEB-INF/jsp 를 만들어 띄우는 방법도 있던데 둘의 차이점이 있을까요일반적인 프로젝트에선 두방법 다 잘 동작하였지만maven의 mutil module을 사용할 때 전자의 경우 하위 모듈에서 프로젝트를 구동시킬경우 jsp 페이지를 찾지못했고 후자의 경우에는 잘찾았습니다.그리고 한가지 더 /static/WEB-INF/ 에서는 jsp가 동작하지 않는데/META-INF/resources/WEB-INF/ 하위에선 동작하는 이유도 혹시 알 수 있을까요/static 일 때랑 /META-INF/resources 일때랑 동작방식이 다른듯 한데
- 해결됨스프링 부트 개념과 활용
spring factories 생성에서요..
스프링 프레임워크 공부하다가 라이브러리 생성하는게 전부 달라서 스프링부트 찾다가 강의를보게되었는데 인텔리j도 처음써보고 검색해도 이런문제를 찾을수가없어서 질문드려요spring.factories 파일 생성하면 springboot에서 지원하는 파일모양으로 바뀌던데 그냥문서모양으로 만들어지고 자동완성기능도 없는거보니 그냥 아무상관없는파일같아서 어디를 설정해야되는지 모르겠습니다.. 그냥 무시하고 진행해서 실행하니 에러가 뜨네요.Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2018-11-06 19:19:02.445 ERROR 8148 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : APPLICATION FAILED TO STARTDescription:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:Consider the following:If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).Process finished with exit code 1에러뜬곳부터 복사붙여넣기 한거입니다. 독학하는데 막히면 물어볼곳이 없어서 ..질문드려요
- 해결됨스프링 부트 개념과 활용
시큐리티 2가지 질문이 있습니다.
@EnbaleWebSecurity 어노테이션에대해서custom security 설정을 해보고 있는데 인터넷 예제들을 보면 설정파일에 @EnbaleWebSecurity 어노테이션을 붙이라고 하는 분들도 계신던데 어떤차이가 있는건가요 설정하지 않은 추가적인 기능들이 자동 적용되는 것인가요? 중복 로그인 방지중복로그인 방지 설정을 하고 테스트를 진행중인데 로그아웃후 재로그인시에 문제가 있습니다. 찾아본 결과 3. 버전의 문제였다라고 하던데 저는 지금 security 버전이 5인데 문제가 발생하여 @Beanpublic ServletListenerRegistrationBean<HttpSessionEventPublisher> httpSessionEventPublisher() { return new ServletListenerRegistrationBean<HttpSessionEventPublisher>(new HttpSessionEventPublisher());}위와 같은 빈을 추가해주니 제대로 작동은 하지만 원인을 잘 모르겠어서 질문드립니다.!