글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid
이렇게 오류가 발생한다면?
09-Aug-2021 00:08:07.900 INFO [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
09-Aug-2021 00:08:08.165 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 32 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 32; columnNumber: 105; The reference to entity "useSSL" must end with the ';' delimiter.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)
...[생략]...
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.xml.sax.SAXParseException; lineNumber: 32; columnNumber: 105; The reference to entity "useSSL" must end with the ';' delimiter.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
...[생략]...
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:393)
... 59 more
applicationContext.xml에 "&" 문자가 단독으로 쓰였는지 확인해 봅니다. ^^
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" >
<property name="driverClassName" value="com.mysql.cj.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Seoul&useSSL=false" />
<property name="username" value="testusr" />
<property name="password" value="testusr@100420" />
</bean>
XML 문서의 규칙상 &로 바꿔 써야 합니다.
<property name="url" value="jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Seoul&useSSL=false" />
[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]
... 196 [197]
... 196 [197]