会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132496个问题
JAVA 全系列/第六阶段:项目管理与SSM框架/Spring 28681楼
Python 全系列/第二阶段:Python 深入与提高/游戏开发-坦克大战 28682楼
Python 全系列/第八阶段:轻量级Web开发利器-Flask框架/Flask视图高级 28683楼
JAVA 全系列/第一阶段:JAVA 快速入门/变量、数据类型、运算符 28684楼

vue_shop.zip

可能我哪个地方写错了,点击提交按钮不管用

image.png


image.pngimage.png

image.png

按照老师设置的http://localhost:5000/user/login,也没成功,就解

image.png








Python 全系列/第十阶段:Flask百战电商后台项目/Flask百战电商后台项目 28685楼
JAVA 全系列/第十阶段:百战旅游网项目/百战旅游网 28686楼


加上@Value("${msg}")之后启动报错


logback.rar

image.png


2021-04-19 13:28:18.145 [main] INFO  com.bjsxt.logback.LogbackApplication - Starting LogbackApplication using Java 1.8.0_131 on LY with PID 17640 (D:\demo\springBoot\logback\target\classes started by yu lin in D:\demo\springBoot\logback)

2021-04-19 13:28:18.150 [main] INFO  com.bjsxt.logback.LogbackApplication - No active profile set, falling back to default profiles: default

2021-04-19 13:28:19.303 [main] INFO  o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8080 (http)

2021-04-19 13:28:19.312 [main] INFO  org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]

2021-04-19 13:28:19.313 [main] INFO  org.apache.catalina.core.StandardService - Starting service [Tomcat]

2021-04-19 13:28:19.313 [main] INFO  org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.45]

2021-04-19 13:28:19.469 [main] INFO  o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext

2021-04-19 13:28:19.469 [main] INFO  o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1249 ms

2021-04-19 13:28:19.523 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'msg' in value "${msg}"

2021-04-19 13:28:19.526 [main] INFO  org.apache.catalina.core.StandardService - Stopping service [Tomcat]

2021-04-19 13:28:19.540 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2021-04-19 13:28:19.565 [main] ERROR org.springframework.boot.SpringApplication - Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'msg' in value "${msg}"

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:782)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:774)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:339)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1340)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329)

at com.bjsxt.logback.LogbackApplication.main(LogbackApplication.java:10)

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'msg' in value "${msg}"

at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178)

at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)

at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:239)

at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210)

at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:175)

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:936)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1321)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)

... 18 common frames omitted


Process finished with exit code 1


JAVA 全系列/第九阶段:Spring Boot实战/Spring Boot 28687楼
JAVA 全系列/第九阶段:权限控制与安全认证/Shiro(旧) 28688楼
Python 全系列/下架-第十二阶段:Python_大型电商项目(5天后下架)/Django项目阶段-电商项目(旧) 28689楼
Python 全系列/第二阶段:Python 深入与提高/游戏开发-坦克大战 28690楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/网络编程 28692楼
JAVA 全系列/第四阶段:网页编程和设计/HTML5(旧) 28693楼
JAVA 全系列/第三阶段:数据库编程/Oracle 数据库的使用 28694楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637