腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
无法
从
Spring
控制器呈现胸腺页
、
、
、
、
问题:我已经开发了一个,我可以
从
邮递员那里调用它.现在,我
从
Thymleaf页面请求相同的REST方法。但它只呈现一个
字符串
。实际页面没有加载..。这是我的控制器:@RefreshScopepublic class ShoppingController {include="/_footer"></th:block> </bod
浏览 6
提问于2020-09-18
得票数 1
回答已采纳
1
回答
从
Spring
Boot
RestController
返回
内部
json
字符串
、
我有一个
Spring
Boot
RestController
,它应该
返回
一个
json
(按原样存储在DB列中,并检索到一个String对象中)。我把它分解成几个片段 @
RestController
.....@RequestMapping(value = "/restAPI/v2/get/mytest",...produces = MediaType.APPLICATIO
浏览 29
提问于2021-05-10
得票数 0
回答已采纳
4
回答
弹簧引导不显示第一个视图
、
、
我正在构建一个
spring
引导应用程序。我的问题是,当我运行这个项目时,我的登录页面没有显示出来。org.springframework.web.bind.annotation.RequestMapping;public class RestLogin { public String logi
浏览 5
提问于2017-04-16
得票数 0
3
回答
我无法启动我的
spring
boot
项目,运行时出现错误404
、
、
</groupId> <version>2.3.4.RELEASE<version>0.0.1-SNAPSHOT</version> <description>Demo project for
Spring</
浏览 4
提问于2020-09-27
得票数 0
1
回答
Spring
如何将对象自动转换为@
RestController
的
json
、
、
我正在查看代码,其中我假设
spring
决定在幕后使用Jackson自动将对象转换为@
RestController
的
json
@
RestController
@RequestMapping("/api尽管这在检查url时确实
返回
了
json
。我试着浏览了一下
spring
文档,但我不太确定我在寻找什么。
spring
中这个过程的名称是什么/它是如何工作的?我试着只用@Controller,但它坏了。这个功能是来自@
Res
浏览 46
提问于2021-01-09
得票数 4
回答已采纳
4
回答
Spring
Boot
MVC,没有
返回
我的视图
、
、
、
pom.xml <groupId>org.springframework.
boot
</groupId> <artifactId>
spring
-
boot
-starter-web</artifactId> </dependenc
浏览 7
提问于2016-11-23
得票数 3
1
回答
Spring
对Unit-Test中
Json
字符串
的响应对象
、
、
我有一个
spring
boot
rest控制器,它
返回
一个对象。如下所示: @
RestController
public class SimpleBookRestController {int id) { } } 我有一个单元测试来测试这个控制器方法(mockito模拟
内部
的服务调用)。对被反序列化为
JSON
字符串
浏览 23
提问于2020-11-11
得票数 0
回答已采纳
2
回答
控制器类找不到html模板。
、
、
、
我正在尝试为学校创建
spring
引导应用程序,将书籍
从
带有控制器的数据库中列出到html页面。 <artifactId>
spring
-
boot
-starter-parent</artifactId> <version>2.1.2.RELEASE</vers
浏览 0
提问于2019-02-10
得票数 0
回答已采纳
2
回答
Spring
响应实体不
返回
JSON
、
、
、
当我
从
RestController
返回
POJO时,它是
JSON
对象中的转换。但是当我试图
返回
new ResponseEntity<>("success", HttpStatus.CREATED);控制器时,它会
返回
纯文本。怎么了?/
json
", produces="application/
json
") public ResponseEntity<?</
浏览 4
提问于2016-10-08
得票数 1
回答已采纳
1
回答
Spring
Boot
JSON
在实现
Spring
Security后不能序列化到ResponseBody
、
、
、
、
在我的
Spring
Boot
项目中添加了
Spring
Security (没有真正配置它来做任何事情)之后,集成测试失败了,出现了以下错误:在将
Spring
Security添加到项目之前,我的响应主体已经被适当地序列化为
JSON
。我已经仔细阅读了
Spri
浏览 0
提问于2019-08-23
得票数 0
1
回答
如何将大量的List<object>数据转换成JSONobject?
、
、
因此,我必须将List<ClassObject>行转换为JsonObjects,才能发送到rest调用。List大约有10,000行数据。那么,有没有人能推荐一种简单的方法来转换JsonObject中的列表数据呢?现在,我使用for循环迭代列表数据,然后将其放入JsonObject中,但这花费了很多时间。 for (DeviceMasterForm dirtyForm : dirtyMasterFormsOnly) { tableObject.put("id&
浏览 79
提问于2020-04-01
得票数 1
1
回答
提供Api作为Restful服务
用@Controller定义控制器,
内部
定义方法如下public
浏览 4
提问于2015-08-20
得票数 0
回答已采纳
1
回答
无法用
Spring
数据REST捕获DataIntegrityViolationException
、
、
、
、
尝试使用DataIntegrityViolationException处理ControllerAdvice,并使用SpringBootv1.3.3和
Spring
v2.4.4
返回
自定义响应。return message; this.message = message;}AuthController.java@RequestMapping("
浏览 1
提问于2016-05-16
得票数 1
回答已采纳
1
回答
Spring
Boot
:添加@Transactional生成java.lang.ClassNotFoundException: org.aspectj.util.PartialOrder$PartialComparable
、
、
、
、
Spring
Boot
1.4.2与Kotlin和Gradle 3.0。(SpringApplication.java:759) [
spring
-
boot
-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.
boot
.SpringApplication.refreshContext(SpringApplication.java:369) [
spring
-
boot
-1.4.0.RELEASE.jar:1.4.0.
浏览 0
提问于2016-12-16
得票数 1
3
回答
tomcat在运行应用程序时未启动
、
、
这是pom xml,我有一个主类和一个简单的控制器,它将
字符串
作为
json
返回
。我只是通过添加下面的依赖项来运行
spring
boot
2.x。
Boot
</description> <groupId>org.springframework.
boot
</groupId> <artifactId>
spring
-
boot
-st
浏览 0
提问于2018-07-28
得票数 1
2
回答
如何在没有jsp /template的页面内/与页面一起
返回
数据?
、
、
、
、
初学者嗨,我正在学习
spring
,但是没有Jsp。有没有一种方法可以像在Jsp中那样,使用例如ModelAndView
返回
页面内的数据?
浏览 41
提问于2019-09-23
得票数 0
13
回答
如何在
spring
boot
中
从
restful控制器
返回
html页面?
、
、
、
、
我想从控制器
返回
一个简单的html页面,但是我只得到了文件的名称,而没有得到它的内容。为什么?这是我的控制器代码:public class HomeController { public String
浏览 343
提问于2016-08-01
得票数 38
回答已采纳
1
回答
Spring
Boot
与
Spring
HATEOAS Maven冲突
、
似乎当我添加
spring
-hateoas的依赖项时 <artifactId>
spring
-hateoasartifactId>以下类在类路径中不再可用我试图排除<em
浏览 0
提问于2014-06-26
得票数 0
1
回答
Spring
数据代码执行模拟
、
、
、
、
</groupId> <version>1.4.2.RELEASE> <artifactId>
spring
-
boot
-
浏览 0
提问于2018-08-06
得票数 0
3
回答
当我使用SpringBoot转到localhost:8080/时,为什么我得到一个404错误
、
、
因此,我使用
Spring
-
Boot
、Kotlin和Intellij设置了一个首次测试应用程序。 当我运行这个项目时,控制台中的一切似乎都启动得很好。
浏览 3
提问于2018-08-29
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
SpringBoot2.x中Json基础使用详解
Spring Boot+Mybatis+Redis二级缓存1
SpringBoot框架
Spring Boot与Kotlin Web应用的统一异常处理
Spring Boot 注解大全,真是太全了!
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
即时通信 IM
活动推荐
运营活动
广告
关闭
领券