Spring boot freemarker的问题 5C

本人最近在学习spring boot,尝试着使用freemarker的时候按照网上的步骤做的时候总是如下图错误
图片说明
项目的各种配置如下:
HelloController:
图片说明
ftl如下:
图片说明
application.properties如下:
图片说明
pom依赖:



org.springframework.boot
spring-boot-starter

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>
    <!-- 引入freeMarker的依赖包. -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-freemarker</artifactId>
    </dependency>
</dependencies>


困扰许久,请各路大神指点下,多谢

3个回答

你的服务器端的console应该也有异常日志打印吧,把那些异常信息贴出来呀。

u012253263
dspjswl 日志信息:
2 年多之前 回复

javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
at org.springframework.web.servlet.view.InternalResourceView.prepareForRendering(InternalResourceView.java:205) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:145) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1282) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:467) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:392) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1282) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.14.jar:8.5.14]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.14.jar:8.5.14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.14.jar:8.5.14]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]

参照此解决方案应该可以解决你的问题。http://www.cnblogs.com/luolei/p/4746610.html

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Spring boot + Mybatis + Freemarker
Spring boot + Mybatis + Freemarker
Spring Boot 使用freemarker
从零开始学Spring Boot视频教程,该课程主要讲解Spring Boot技术,理论+实战、一步一步带你入门 。《Spring Boot 自定义Starter 》3节;《Spring Boot WebSocket单聊+群聊》6节;《Spring Boot MyBatis 注解篇》12节;《Spring Boot MyBatis XML篇》 8节。
基于spring boot freemarker代码生成器
代码生成器支持model、Mapper、Dao、Service、ServiceImpl、Controller 一次性的生成,支持同时生成多张表,此代码生成器依赖JAR包比较少,除了必用Freemarker 和JDBC之外基本上完全个人编写
Spring Boot Freemarker特别篇之contextPath
从零开始学Spring Boot视频教程,该课程主要讲解Spring Boot技术,理论+实战、一步一步带你入门 。《Spring Boot 自定义Starter 》3节;《Spring Boot WebSocket单聊+群聊》6节;《Spring Boot MyBatis 注解篇》12节;《Spring Boot MyBatis XML篇》 8节。
Spring boot 下Freemarker的注解方式配置
以上就是Freemarker用注解的方式替代了以前的使用XML配置文件繁琐的配置方式,至于在pom.xml中引入freemarker的依赖,可以百度搜索 maven spring boot freemarker,添加到自己的pom.xml依赖中去就可以了
10 Spring boot 整合FreeMarker
FreeMarker是一个模板引擎,一个基于模板生成文本输出的通用工具,使用纯Java编写 rnrnl FreeMarker被设计用来生成HTML Web页面,特别是基于MVC模式的应用程序 rnrnl 虽然FreeMarker具有一些编程的能力,但通常由Java程序准备要显示的数据,由FreeMarker生成页面,通过模板显示准备
Spring Boot Freemarker 模板基本语法
让同学们快速学习Spring Boot 2.x, 同时通过本次学习,能掌握目前最流行的相关技术适用人群对从事软件开发者有很大的提升,前提需要了解Java语言及相关Web编程知识课程简介n<p>n 资料下载: <span style="color:#FF0000;"><a href="https://pan.baidu.com/s/12IJeGXSELRACibRPkzpLww">https://pan.baidu.com/s/12IJeGXSELRACibRPkzpLww</a></span>n</p>n<p>n <br /></p>n<p>n 同学们快速入门SpringBoot2.x, 并能通过本次学习掌握MyBatis、Redis、RabbitMQ、Elasticsearch及微信小程序知识,经过这次学习,能进一步提升同学们技能,本次课程,采用Java8环境,IDEA开发工具,同时采用了Linux CentOS7进行搭建Redis、RabbitMQ及Elasticsearch环境.n</p>
Spring Boot 系列教程 freemarker导出word下载
Spring Boot 系列教程 freemarker导出word下载
【Spring boot学习第九天】freemarker使用小结
1.修改freemarker默认模板位置 在配置文件中添加freemarker的配置地址即可: spring.freemarker.template-loader-path=classpath:/web 这样就相当于由原来template文件夹,改为了web文件夹,如图: 2.使用webjar方式加载js和css文件 这个类似于maven仓库,他可以把我们web开发需要的的js和c...
Spring Boot 最佳实践(三)模板引擎FreeMarker集成
一、FreeMaker介绍 FreeMarker是一款免费的Java模板引擎,是一种基于模板和数据生成文本(HMLT、电子邮件、配置文件、源代码等)的工具,它不是面向最终用户的,而是一款程序员使用的组件。 FreeMarker最初设计是用来在MVC模式的Web开发中生成HTML页面的,所以没有绑定Servlet或任意Web相关的东西上,所以它可以运行在非Web应用环境中。 发展史 FreeMark...
Spring Boot基础6-web应用开发-模板引擎FreeMarker
web应用开发-模板引擎FreeMarker
Spring boot集成freemarker,swagger,druid,mybatis
请使用maven导入打开项目,此Demo使用IntelliJ IDEA创建,请尽可能使用IntelliJ IDEA
Spring Boot整合之模板引擎(Thymeleaf、Freemarker、jsp)
1. Thymeleaf模板 1.1 在pom.xml中添加Thymeleaf依赖 &amp;lt;!--使用thymeleaf标签--&amp;gt; &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;spring-boot-starter-thymele...
Spring Boot(24)——使用Freemarker视图
使用Freemarker视图 Spring Boot默认对Freemarker也有支持,需哟使用Freemarker的第一步是加入Freemarker的依赖。 &lt;dependency&gt; &lt;groupId&gt;org.freemarker&lt;/groupId&gt; &lt;artifactId&gt;freemarker&lt;/artifactId&gt;...
Spring Boot 集成freeMarker发送模板邮件
首先引入相关依赖 &amp;lt;!--发送 Emali的依赖--&amp;gt; &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;spring-boot-starter-mail&amp;lt;/artifactId&amp;gt; &amp;...
spring boot中使用freemarker的 TemplateDirectiveModel
freemarker的 TemplateDirectiveModel,注入对象为空。rnrnrn@Servicernpublic class TestService rn rnpublic static String get() throws IOException rn rn return "sss";rnrn rnpublic String getOne() throws IOException rn rn return "sss";rnrnrn```rnrnrn
Spring Freemarker 相关问题
[code=Java]rnprivate Configuration conf;rnrn public void setFreeMarkerConfigurer(rn FreeMarkerConfigurer freeMarkerConfigurer) rn //spring的FreeMarkerConfigurer rn this.conf = freeMarkerConfigurer.getConfiguration();rn rnrn @Transactional(readOnly = true)rn public void index(CmsSite site, String tpl, Map data)rn throws IOException, TemplateException rn long time = System.currentTimeMillis();rn File f = new File(getIndexPath(site));rn File parent = f.getParentFile();rn if (!parent.exists()) rn parent.mkdirs();rn rn Writer out = null;rn try rn out = new OutputStreamWriter(new FileOutputStream(f), UTF8);rn Template template = [color=#FF0000]conf.getTemplate(tpl);[/color]rn template.process(data, out);rn finally rn if (out != null) rn out.flush();rn out.close();rn rn rn time = System.currentTimeMillis() - time;rn log.info("create index page, in ms", time);rn rn[/code]rnrn我想知道在哪注入freemarker实例了。类文件里没有。 配置文件中也没有找到。rn请知道的朋友告诉一下这个是怎么配置的,谢谢。 如果有相关的资料就更好了。 感谢!
Spring MVC + freemarker 的问题
一个项目,想用Spring MVC + freemarker做,不用jsp,完全用freemarker做展现。rnrn一部分包含业务逻辑页面,用spring mvc的controllor中转向展现的freemarker模板,这点没问题。rn但并不是所有页面都需要经过spring mvc的,一些页面直接用freemarker模板展现就可以了,这些页面是要求做国际化的。rnrnrn我有什么办法不用经过spring的DispatcherServlet,直接展现freemarker的模板,同时实现国际化吗?rnrn因为每个经过spring DispatcherServlet,我都要在controller里做一个方法对应吧,比较麻烦。
Spring boot和Mybatis整合+Mysql+jsp页面跳转问题(借助FreeMarker)
本篇文章,介绍springboot+mybatis+mysql+freemarker+jsp应用的一个小demo,主要是整合mybatis部分。 笔者刚研究springboot,刚刚跑通的例子,出来分享一下,直接上代码: 第一,建一个Maven项目。(不会Maven的自学) 结构图如下: 下面看pom.xml配置: 4.0.0 com.zhang.demo spri
Spring Boot中使用freeMarker生成word文档——遇到的问题
freeMarker模板导出word网上有很多例子,大致都一样,我这里就不说了。我只说说我遇到的一个问题: 我的${list.属性名}在模板中为空值,但是我后台代码是有值的。 刚开始我是直接把查处的list(list中的泛型是个car对象),放入Map中给模板打印(如图:),结果后台报属性名空指针。 解决:把对象放入map中然后把map放入list解决,到底为什么模板不识别list中...
Spring cloud spring boot spring boot admin
Spring cloud spring boot spring boot admin。spring demo,
Spring MVC 整合 Freemarker的问题
想在整合后 可以通过浏览器访问路径 ***/***.ftl,现在想把访问路径结尾的.ftl换成html可以吗?该怎么配置
关于Spring freemarker的问题。急!!!
小弟菜鸟刚刚接触到freemarker,刚刚看别人的代码,看到人家在form里面写rnrn rnrn就可以调用到类里面的queryS()方法rnrn现在我就是想问一下,success.htm?method=queryS就直接调用到了方法是怎么配置的啊…rnrn急……急……急……
Spring Boot 注意问题
1. JPA DAO@Id只能注解Long 而且是单一主键约束 数据库建表,唯一主键而且是Long IdRepository delete 可以自动级联删除 save 强行写入,不会抛出异常,无视not null 命名规则, 返回类型决定返回一个还是多个
Spring boot问题总结
1)、localhost:2181 连接不上        安装zookeeper:          下载zookeeper,           地址:https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.13/ 下载后解压,进入D:\Downloads\zookeeper-3.4.13\bin, 把D:\...
spring boot 启动问题
日狗了,创建了一个最简单的spring boot 项目,但是为什么没有启动啊!!!!! 点击: public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } 输出: . ____ _ __ ...
Spring Boot项目创建问题
**ERROR1:**Error creating bean with name ‘entityManagerFactory’ defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: 突然明白一个道理,当发现错误时一定细心把错误看...
spring boot的启动问题
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springApplicationAdminRegistrar' defined in class path resource [org/springframework/boot/autoconfigure/admin/SpringApplicationAdminJmxAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.boot:type=Admin,name=SpringApplicationrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]rn at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]rn at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]rn at com.liyi.LiyiApplication.main(LiyiApplication.java:20) [classes/:na]rnCaused by: javax.management.InstanceAlreadyExistsException: org.springframework.boot:type=Admin,name=SpringApplicationrn at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) ~[na:1.8.0_66]rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) ~[na:1.8.0_66]rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) ~[na:1.8.0_66]rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) ~[na:1.8.0_66]rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) ~[na:1.8.0_66]rn at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[na:1.8.0_66]rn at org.springframework.boot.admin.SpringApplicationAdminMXBeanRegistrar.afterPropertiesSet(SpringApplicationAdminMXBeanRegistrar.java:92) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]rn ... 16 common frames omittedrn
关于spring boot的问题
按照了spring boot官网上的helloworld例子,但是编译出现java.lang.NoClassDefFoundError: com/he/OfficialDemo,package com.he;nnimport org.springframework.boot.SpringApplication;nimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;nimport org.springframework.stereotype.Controller;nimport org.springframework.web.bind.annotation.RequestMapping;nimport org.springframework.web.bind.annotation.ResponseBody;nn/**n * �ٷ�����n * @author pzrn *n */n@Controllern@EnableAutoConfigurationnpublic class OfficialDemo n @RequestMapping("/test")n @ResponseBodyn String home() n System.out.println("OfficialDemo.home()");n return "Hello World!";n nn public static void main(String[] args) throws Exception n SpringApplication.run(OfficialDemo.class, args);n nnn`我的代码``n n```nn
spring boot版本升级问题
从1.3升级到1.5.14发现以下问题1、Spring boot 1.5.14 Testing : Configuration error: found multiple declarations of @BootstrapWith     @SpringBootTest改为@ContextConfiguration
Spring Boot时区问题
Spring Boot时区问题 spring boot需要预先设置好时区,否则会导致服务器无法启动、页面跳转出现错误、使用new Date() 出现时间不符合等一系列问题。 方法如下 修改配置文件,在application.yml中添加 #spring: # datasource: # driver-class-name: com.mysql.cj.jdbc.Driver # ur...
Spring Boot的页面跳转问题
https://blog.csdn.net/qq_37355731/article/details/77049804
spring boot 框架的问题
最近公司要使用spring boot 我是一个菜鸟,做了一个小项目,但是对spring boot还是不了解太多,感觉都是云里雾里的,有没有大虾帮忙,或者小伙伴一起学习一下,给个小小项目去做做
spring boot之问题汇总
此处采用spring boot 1.5.14 版本,配置文件选取yml格式 1.No active profile set, falling back to default profiles: default 缺少默认profile: profiles: active: active 2.HV000184: ParameterMessageInterpolator has been ...
spring boot 未知问题
在STS中创建spring boot项目时pom文件常常 出现红叉,点击它显示 unknown error 使用spring boot 2.1.5.RELEASE同样会出现红叉,但这两个版本均能正常使用,但看着非常不顺眼。 使用2.1.4.RELEASE则不报错,原因不详。 ...
spring boot相关问题
[url]http://blog.csdn.net/column/details/spring-boot.html[/url]
Spring boot相关问题
1. 配置Context path/Port,application.properties中 server.contextPath=/MYPATH server.port=12378 2. 配置Profile VM参数:-Dspring.profiles.active=dev 或 application.properties中:spring.profiles.active=MY_...
Spring Boot问题总结
错误描述执行install命令时报如下错误:[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-
Spring Boot 问题及解决方法
开发工具: Spring Tool Suite 在使用Spring Boot中的数据库操作时,出现问题: 问题分析:通过控制台打印出的问题表示,是javassist.jar这个jar包出了问题 解决方法:在Maven仓库中找到这个jar包,并删除;然后重新构建程序:在项目上右键--》Maven--》Update Project,这样就能重新下载这个jar包
Spring Boot初学问题
1、pom.xml中要加入web模块         &amp;lt;dependency&amp;gt;             &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;             &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifactId&amp;gt;         &amp;lt;...
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview