質問編集履歴
2
タイトル、タグを修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
MyBatis連携
|
1
|
+
[MyBatis連携]誤ったマッパークラスパスのため、sqlSessionFactory生成エラー
|
body
CHANGED
File without changes
|
1
タイトルの修正、一部ソースの削除
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
MyBatis連携時に使うDBをH2からMySQLに変更するとエラーになってしまう
|
body
CHANGED
@@ -70,64 +70,13 @@
|
|
70
70
|
Thymeleaf
|
71
71
|
Apache Freemarker
|
72
72
|
Spring Web Starter
|
73
|
-
```xml
|
74
|
-
<dependencies>
|
75
|
-
|
76
|
-
<dependency>
|
77
|
-
<groupId>org.springframework.boot</groupId>
|
78
|
-
<artifactId>spring-boot-starter-web</artifactId>
|
79
|
-
</dependency>
|
80
|
-
<dependency>
|
81
|
-
<groupId>org.mybatis.spring.boot</groupId>
|
82
|
-
<artifactId>mybatis-spring-boot-starter</artifactId>
|
83
|
-
<version>2.0.1</version>
|
84
|
-
</dependency>
|
85
73
|
|
86
|
-
<dependency>
|
87
|
-
<groupId>org.springframework.boot</groupId>
|
88
|
-
<artifactId>spring-boot-starter-test</artifactId>
|
89
|
-
<scope>test</scope>
|
90
|
-
</dependency>
|
91
|
-
<dependency>
|
92
|
-
<groupId>org.projectlombok</groupId>
|
93
|
-
<artifactId>lombok</artifactId>
|
94
|
-
</dependency>
|
95
|
-
|
96
|
-
<dependency>
|
97
|
-
<groupId>org.springframework.boot</groupId>
|
98
|
-
<artifactId>spring-boot-starter-freemarker</artifactId>
|
99
|
-
</dependency>
|
100
|
-
<dependency>
|
101
|
-
<groupId>mysql</groupId>
|
102
|
-
<artifactId>mysql-connector-java</artifactId>
|
103
|
-
<scope>runtime</scope>
|
104
|
-
</dependency>
|
105
|
-
<dependency>
|
106
|
-
<groupId>org.springframework.boot</groupId>
|
107
|
-
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
108
|
-
</dependency>
|
109
|
-
|
110
|
-
<dependency>
|
111
|
-
<groupId>org.springframework.boot</groupId>
|
112
|
-
<artifactId>spring-boot-starter-jdbc</artifactId>
|
113
|
-
</dependency>
|
114
|
-
</dependencies>
|
115
|
-
|
116
|
-
|
117
|
-
```
|
118
74
|
**login.html**
|
119
75
|
```html
|
120
|
-
<!DOCTYPE html>
|
121
|
-
<html xmlns:th="http://www.thymeleaf.org">
|
122
|
-
<head>
|
123
|
-
<meta charset="UTF-8">
|
124
|
-
<title>Test</title>
|
125
|
-
</head>
|
126
|
-
|
76
|
+
<body>
|
127
|
-
|
77
|
+
<h1 th:text="${user}"></h1>
|
128
|
-
|
78
|
+
<p>テスト</p>
|
129
|
-
|
79
|
+
</body>
|
130
|
-
</html>
|
131
80
|
```
|
132
81
|
**schema.sql**
|
133
82
|
```sql
|