Giter Club home page Giter Club logo

Comments (3)

hank-cp avatar hank-cp commented on July 17, 2024 1

因为我这边网络的原因, maven工程build不起来, 所以目前还没有办法重现.

从你的日志里面看是因为缺少了WebProperties这个类, 应该是插件的配置出了问题, 导致web-mvc的AutoConfiguration没有启动.

有几个方法你可以先试试看能不能解决:

  1. 给插件的Application加上@EnableWebMvcConfiguration
  2. PluginX工程补上application.yaml.

from sbp.

hank-cp avatar hank-cp commented on July 17, 2024 1

经过测试, 可以确认这是一个bug.

SpringBootstrap中, 引入WebPropertiesWebMvcAutoConfiguration被禁用了. 这边demo工程能启动的原因是WebProperties被其它AutoConfiguration引入了.

可以先通过@EnableConfigurationProperties(WebProperties.class)绕开这个问题.

感谢反馈!

from sbp.

Xeriou avatar Xeriou commented on July 17, 2024

老哥,感謝您撥空測試與回覆

  1. 在我的倉庫中,PluginX 確實沒有 application.yaml ,但只是因為我 ignore 而已,實際上,在本地端我是有這個檔案的,但造成您檢查錯誤的思路實在很不好意思。
  2. 經過測試後,確實在 Application 補上 @EnableWebMvcConfiguration 有效,但我在我得專案中找不到這個 annotation,因此我加了 @EnableConfigurationProperties(WebProperties.class) 後就能正常跑了...

老實說,我目前不太清楚為甚麼會有這種原因,理論上如果 application.yaml 中有 spring.web 的 tag,應該是會自動啟用這些設定檔
但我不管在 外部的 config 資料夾中新增,或是在 PluginX 的 resource 新增,似乎都沒有讀取到;最終,還是直接在 Application 中 Enable 這個方法才正確(可能也不是最正確的選擇)。我會繼續測試下去的!

from sbp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.