Comments (3)
因为我这边网络的原因, maven工程build不起来, 所以目前还没有办法重现.
从你的日志里面看是因为缺少了WebProperties
这个类, 应该是插件的配置出了问题, 导致web-mvc的AutoConfiguration没有启动.
有几个方法你可以先试试看能不能解决:
- 给插件的Application加上
@EnableWebMvcConfiguration
- 给
PluginX
工程补上application.yaml
.
from sbp.
经过测试, 可以确认这是一个bug.
在SpringBootstrap
中, 引入WebProperties
的WebMvcAutoConfiguration
被禁用了. 这边demo工程能启动的原因是WebProperties
被其它AutoConfiguration引入了.
可以先通过@EnableConfigurationProperties(WebProperties.class)
绕开这个问题.
感谢反馈!
from sbp.
老哥,感謝您撥空測試與回覆
- 在我的倉庫中,
PluginX
確實沒有application.yaml
,但只是因為我 ignore 而已,實際上,在本地端我是有這個檔案的,但造成您檢查錯誤的思路實在很不好意思。 - 經過測試後,確實在 Application 補上
@EnableWebMvcConfiguration
有效,但我在我得專案中找不到這個 annotation,因此我加了@EnableConfigurationProperties(WebProperties.class)
後就能正常跑了...
老實說,我目前不太清楚為甚麼會有這種原因,理論上如果 application.yaml
中有 spring.web 的 tag,應該是會自動啟用這些設定檔
但我不管在 外部的 config 資料夾中新增,或是在 PluginX
的 resource 新增,似乎都沒有讀取到;最終,還是直接在 Application 中 Enable 這個方法才正確(可能也不是最正確的選擇)。我會繼續測試下去的!
from sbp.
Related Issues (20)
- auto-start-plugin property doesn't work HOT 2
- Add third-party lib to plugin HOT 4
- Add third-party lib to plugin HOT 2
- How plugins can read application.properties outside plugin jar HOT 1
- Plugin not loading when using Swagger in Application with below error HOT 3
- How to specify multiple plugin folders? HOT 1
- ClassCastException: class org.laxture.sbp.spring.boot.SbpAutoConfiguration$1 HOT 6
- Support multiple Jvm/Spring Boot version HOT 1
- Can i use dubbo in this framework? HOT 9
- Bean with that name has already been defined HOT 4
- Support for Spring Boot 2.7.x HOT 2
- Support Spring Boot 3.0 HOT 2
- Support WebFlux
- Unit tetss for core, etc HOT 3
- Application can't load the plugin's resourse HOT 1
- 关于spring+p4j实现的讨论 HOT 6
- 调用PluginMangaer.startPlugin(pluginId)方法时报错 HOT 11
- 插件如何携带统一路径前缀 HOT 1
- Integrating library that uses RequestMappingHandlerMapping HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbp.