별의 별 시도를 다 해보고, 버전도 낮춰보고, 다시 설치해보고

오만가지 방법으로 namespace를 만들어보려고 했지만 모두 실패했다.

 

결국 직접 코드를 붙여 넣는 것으로 해결했다..

원시적이군..

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
        http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
        http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
    <bean id="dataSource"
          class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
        <property name="url"
                  value="jdbc:mysql://localhost:3306/테이블명?useSSL=false&amp;serverTimezone=Asia/Seoul">
        </property>
        <property name="username" value="DB계정명"></property>
        <property name="password" value="암호"></property>
    </bean>  
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="mapperLocations" value="classpath:mappers/**/*Mapper.xml"></property>
    </bean>
    <mybatis-spring:scan base-package="dao패키지명"/>
</beans>
cs

'SPRING > 나의 고통(Error)' 카테고리의 다른 글

Could not set parameters for mapping  (0) 2021.07.28
Could not convert socket to TLS  (0) 2021.07.26
@GetMapping import 불가  (0) 2021.07.22
Build path entry is missing:  (0) 2021.07.21
Could not get JDBC Connection;  (0) 2021.07.11