본문 바로가기
Programming Language/JavaScript

[error] Open quote is expected for attribute "class" associated with an element type "bean".

by 떠농 2022. 3. 14.
반응형

xml에 오라클 설정 중

 

 

Open quote is expected for attribute "class" associated with an element type "bean". 에러 발생

 

 

에러의 원인을 찾아보니

bean의 class를 설정할 때 "(쌍따옴표) 하나가 빠져서 발생하는거였다.

 

따옴표 주의하자!!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="UTF-8"?>
 
<beans xmlns = "http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
 
    <bean id="dataSource" class=org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
        <property name="url" value="jdbc:oracle:thin:@localhost:1521:XE"/>
        <property name="user" value="fourth"/>
        <property name="password" value="1234" />
    </bean>        
</beans>
cs

 

반응형

댓글