• xj_zh
    2019-12-01
    老师,可以分享下git prompt配置吗?看着很酷炫。

    作者回复: 没有特别的git配置,只是用了https://github.com/ohmyzsh/ohmyzsh,缺省配置。

    
     1
  • 大维
    2019-08-23
    springboot是怎么读取到根目录下的config/application.yml文件的呢?

    作者回复: 这个springboot支持的外部集中配置机制,可以参考下面文档24.3节:
    https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html

     1
     1
  • Ray⏳
    2020-02-05
    老师您好,run bot那个module有问题:
    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    05-02-2020 17:54:16.233 [restartedMain] ERROR o.s.boot.SpringApplication.reportFailure - Application run failed
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alertController': Unsatisfied dependency expressed through field 'alertService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alertService': Unsatisfied dependency expressed through field 'companyClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xyz.staffjoy.company.client.CompanyClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: RequestParam.value() was empty on parameter 1
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
        at
    展开

    作者回复: 这个问题之前有人报过,估计和编译环境有关,建议尝试在IDE里头设置-parameter编译参数,参考:
    https://stackoverflow.com/questions/44313482/feign-client-with-spring-boot-requestparam-value-was-empty-on-parameter-0

    
    
  • 纳川
    2019-12-23
    老师,您哪个终端关键字提示如何搞的,我的都是一个颜色

    作者回复: 我用的这个:
    https://github.com/ohmyzsh/ohmyzsh
    缺省配置即可

    
    
  • 循序渐进
    2019-11-20
    老师 这个课程有没有交流群呀? 为什么我启动mail的时候就不行呢?获取不到配置文件的属性。
    ERROR io.sentry.SentryClientFactory.resolveDsn - Error creating valid DSN from: '${SENTRY_DSN}'.
    java.lang.IllegalArgumentException: Illegal character in path at index 1: ${SENTRY_DSN}
        at java.net.URI.create(URI.java:852)
        at io.sentry.dsn.Dsn.<init>(Dsn.java:41)

    作者回复: 配置文件(https://github.com/spring2go/staffjoy/blob/master/config/application.yml.example)需要修改文件名,修改方式在项目(https://github.com/spring2go/staffjoy)readme的[如何运行]部分有说明。

    如果还有问题,你直接把application.yml.example里头sentry-dns的值复制到mail服务对应配置文件里头去,其它配置如有需要也可以这样直接复制。

    交流群可以加我微信(bulldog2015),说明来自极客时间。

    
    
  • 阿宝
    2019-09-06
    本地IDE启动bot-svc时,总是报这个错,这个是什么原因?

    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    06-09-2019 08:30:46.906 [restartedMain] ERROR o.s.boot.SpringApplication.reportFailure - Application run failed
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alertController': Unsatisfied dependency expressed through field 'alertService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alertService': Unsatisfied dependency expressed through field 'companyClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xyz.staffjoy.company.client.CompanyClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: RequestParam.value() was empty on parameter 1
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
    展开

    作者回复: 很奇怪,网上找了一下可能和编译设置或者feign版本有关,可以尝试在ide里头加-parameters编译参数:

    https://stackoverflow.com/questions/44313482/feign-client-with-spring-boot-requestparam-value-was-empty-on-parameter-0

    或者把本地缓存的maven cache全清理掉重新加载。

     1
    
  • 王杰
    2019-09-02
    在启动单页应用时候 环境Windows 在运行npm install 没问题,在运行npm start 命令后显示,失败
    ERROR in ./src/components/NotificationManager/index.js
    D:\learn_code\staffjoy\frontend\myaccount\src\components\NotificationManager\index.js
       6:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
      13:5 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
      29:45 error Expected linebreaks to be 'LF' but found 'CRLF' l
    ✖ 60 problems (60 errors, 0 warnings)
            [0] ./~/favicons-webpack-plugin/lib/favicons.js?{"outputFilePrefix":"assets/icons/","icons":{"android":true,"appleIcon":true,"appleStartup":true,"coast":false,"favicons":true,"firefox":true,"opengraph":true,"twitter":true,"yandex":false,"windows":true},"background":"#fff","persistentCache":true,"appName":"Staffjoy | App"}!./staffjoy-favicon.png 5.92 kB {0} [built]
    Child html-webpack-plugin for "index.html":
        chunk {0} index.html 542 kB [rendered]
            [0] ./~/html-webpack-plugin/lib/loader.js!./index.template.ejs 1.66 kB {0} [built]
            [1] ./~/lodash/lodash.js 540 kB {0} [built]
            [2] (webpack)/buildin/module.js 251 bytes {0} [built]
    webpack: Failed to compile.
    展开

    作者回复: 你好,staffjoy的两个单页应用要求linux或mac环境编译,windows环境暂不支持。所以,如果你是windows环境,staffjoy ide部署这个环节暂时做不了,不过后面的docker compose和k8s部署可以不受影响,只要你的win操作系统能正常能装docker/k8s即可。

    不过如果你有兴趣,在windows可以尝试自己hack一下,有学员说编译成功的(但不能保证)。上面的错误一个是eslint造成,webpack.config.js里头配置的eslint要求unix格式,你可以把eslint相关配置都去掉,另外前端引用的npm-zepto需要替换一下,参考这里:https://github.com/spring2go/staffjoy/issues/6

    
    
  • chun1123
    2019-09-02
    老师,myaccount使用npm start构建时报错
    ERROR in ENOENT: no such file or directory, scandir 'C:\Users\shi1123\Documents\GitHub\staffjoy\frontend\myaccount\node_modules\node-sass\vendor'
     @ ./src/main.scss 4:14-111 13:2-17:4 14:20-117

    ERROR in ENOENT: no such file or directory, scandir 'C:\Users\shi1123\Documents\GitHub\staffjoy\frontend\myaccount\node_modules\node-sass\vendor'
     @ ./src/components/LoadingScreen/loading-screen.scss 4:14-133 13:2-17:4 14:20-139

    ERROR in ENOENT: no such file or directory, scandir 'C:\Users\shi1123\Documents\GitHub\staffjoy\frontend\myaccount\node_modules\node-sass\vendor'
     @ ./src/components/StaffjoyButton/staffjoy-button.scss 4:14-134 13:2-17:4 14:20-140

    ERROR in ENOENT: no such file or directory, scandir 'C:\Users\shi1123\Documents\GitHub\staffjoy\frontend\myaccount\node_modules\node-sass\vendor'
     @ ./src/components/SingleAttributeField/single-attribute-field.scss 4:14-141 13:2-17:4 14:20-147


    能帮忙看看是什么原因吗?
    展开

    作者回复: 你这个看上去是npm install没执行?另外,staffjoy的两个单页应用要求linux或mac环境编译,windows环境暂不支持。所以,如果你是windows环境,staffjoy ide部署这个环节暂时做不了,不过后面的docker compose和k8s部署可以不受影响,只要你的win操作系统能正常能装docker/k8s即可。

     6
    
  • 飞翔
    2019-08-24
    老师 或者我能不能把farada网关改成别的端口 比如8090 这样对前端有什么影响 比如前端需要改什么

    作者回复: staffjoy是要求用域名+标准80端口去访问faraday网关的。

    在某些版本的mac os中,非root用户可能是无法使用小于1024的常用端口的。如果开发中需要用到80端口, 就要设置端口转发。这样可以把faraday配置的80端口改掉(如8090),然后还是可以用域名+80去转发访问。

    参考这个:
    https://blog.csdn.net/good007boy/article/details/92029335

    
    
  • 飞翔
    2019-08-24
    老师 别的都启动正常, 除了 faraday 报错 我port 是80 我查了下说是 Ports below 1024 can be opened only by root. 我的问题是用intellij 如果设置root运行呀

    23-08-2019 12:00:11.434 [restartedMain] ERROR o.apache.catalina.util.LifecycleBase.log - Failed to start component [Connector[HTTP/1.1-80]]
    org.apache.catalina.LifecycleException: Protocol handler start failed
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1004)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.addConnector(StandardService.java:226)
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:259)
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:197)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:311)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:164)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
    Caused by: java.net.SocketException: Permission denied
    Description:

    The Tomcat connector configured to listen on port 80 failed to start. The port may already be in use or the connector may be misconfigured.
    展开

    作者回复:
    在某些版本的mac os中,非root用户可能是无法使用小于1024的常用端口的。如果开发中需要用到80端口, 就要设置端口转发。这个需要把faraday配置的80端口改掉。参考这个:
    https://blog.csdn.net/good007boy/article/details/92029335


    
    
  • Carl-Zhou
    2019-08-23
    杨波老师,我本地是win10 64位企业操作系统,app这个前端应用npm install 失败,zepto的引入有问题。
    以下是部分log:
    25080 verbose pkgid npm-zepto@1.1.7
    25081 verbose cwd E:\DEV\Project\JAVA\staffjoy\frontend\app
    25082 verbose Windows_NT 10.0.17763
    25083 verbose argv "C:\\DevTool\\nodejs\\node.exe" "C:\\DevTool\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
    25084 verbose node v10.15.3
    25085 verbose npm v6.4.1
    25086 error code ELIFECYCLE
    25087 error errno 1
    25088 error npm-zepto@1.1.7 install: `script/build`
    25088 error Exit status 1
    25089 error Failed at the npm-zepto@1.1.7 install script.
    25089 error This is probably not a problem with npm. There is likely additional logging output above.
    25090 verbose exit [ 1, true ]
    展开

    作者回复: 你好,我确认了一下,目前staffjoy的前端reactjs应用是依赖于linux环境的,暂不支持win环境构建。

    如果在win环境下,建议安装vagrant+linux,在虚拟机里头构建。或者采用docker构建,前端项目里头有Dockerfile,课程后面也会演示docker构建镜像。

    
    
  • favoorr
    2019-08-20
    这里应该加个 shell 来一键启动,要不然好麻烦

    作者回复: 嗯,可以加一个shell简化启动,课程的目的是演示纯手工启动繁琐,对比后续用docker compose或k8s一键部署的方便性。

    
    
我们在线,来聊聊吧