teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

gradleのソースを追記しました

2017/05/27 06:37

投稿

heavyuseman
heavyuseman

スコア42

title CHANGED
File without changes
body CHANGED
@@ -182,4 +182,55 @@
182
182
  <hr/>
183
183
  </body>
184
184
  </html>
185
+ ```
186
+ ```gradle
187
+ buildscript {
188
+ ext {
189
+ springBootVersion = '1.5.1.RELEASE'
190
+ }
191
+ repositories {
192
+ mavenCentral()
193
+ }
194
+ dependencies {
195
+ classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
196
+ }
197
+ }
198
+
199
+ apply plugin: 'java'
200
+ apply plugin: 'eclipse-wtp'
201
+ apply plugin: 'org.springframework.boot'
202
+ apply plugin: 'war'
203
+
204
+ war {
205
+ baseName = 'MybootApp'
206
+ version = '0.0.1-SNAPSHOT'
207
+ }
208
+
209
+ sourceCompatibility = 1.8
210
+
211
+ repositories {
212
+ mavenCentral()
213
+ }
214
+
215
+ configurations {
216
+ providedRuntime
217
+ }
218
+
219
+ dependencies {
220
+ //SpringSecurityを使うため、追加
221
+ compile('org.springframework.boot:spring-boot-starter-security')
222
+ compile('org.thymeleaf.extras:thymeleaf-extras-springsecurity4')
223
+ compile('org.springframework.boot:spring-boot-starter-data-jpa')
224
+ compile('org.springframework.boot:spring-boot-starter-thymeleaf')
225
+ compile('org.springframework.boot:spring-boot-starter-web')
226
+ runtime('mysql:mysql-connector-java')
227
+ providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
228
+ testCompile('org.springframework.boot:spring-boot-starter-test')
229
+ // MySQL
230
+ //compile ("mysql:mysql-connector-java:$mySQLVersion")
231
+ compile ('com.fasterxml.jackson.core:jackson-databind:2.3.4')
232
+ compile("org.springframework.boot:spring-boot-starter-thymeleaf")
233
+
234
+
235
+ }
185
236
  ```

1

2017/05/27 06:37

投稿

heavyuseman
heavyuseman

スコア42

title CHANGED
File without changes
body CHANGED
@@ -8,7 +8,7 @@
8
8
  at org.springframework.http.converter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.java:100) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
9
9
  at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:231) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
10
10
  at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:203) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
11
-
11
+ jacksonの設定はgradleでしております
12
12
  原因が不明ですのでご教授よろしくお願いいたします。
13
13
 
14
14