小编pas*_*etz的帖子

NativeScript 故事书或替代品

一年以来,我们一直在使用storybook来开发我们的 angular web 应用程序,以及我们的 ionic cordova 应用程序。

现在我们要评估 NativeScript 是否是满足我们需求的更好解决方案。我们目前想知道是否可以使用 NativeScript 制作故事书,因为它已被证明对 UI 开发非常有用。

我知道故事书官方不支持 NativeScript - 但 React Native 在理论上应该是可能的,尽管我找不到任何关于此的信息。

我现在的问题是:有没有人能够用 NativeScript 制作故事书?或者是否存在我无法找到的替代方案?或者至少有一些概念/工具可以单独开发组件?

typescript nativescript nativescript-angular

8
推荐指数
0
解决办法
304
查看次数

Spring Boot/MVC:如何使用特殊字符在 JAR 之外提供静态文件?

我目前正在从事一个项目,我需要为驻留在文件系统上的静态文件(在 JAR 文件之外)提供服务。

我目前拥有的:

@Configuration
@ComponentScan({"some.package"})
public class MaboConfiguration extends WebMvcConfigurerAdapter {

    /* Irrelevant configs omitted */

    @Value("${application.pdfpath}")
    public String pdfPath;

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/files/**")
           .addResourceLocations("file:" + this.pdfPath);

        super.addResourceHandlers(registry);
     }
} 
Run Code Online (Sandbox Code Playgroud)

这适用于配置的“pdfPath”目录中的大多数文件。现在的问题是,无法找到包含特殊字符(如:“ä”、“ö”、“ü”...)的文件,服务器返回 404。

工作文件示例(假设 pdfPath 为 /opt/tst/):

"/opt/tst/tstdir/with some space/01 - my tst pdf.pdf" -> is served under
"http://localhost:8100/contextRoot/files/tstdir/with some space/01 - my tst pdf.pdf"
Run Code Online (Sandbox Code Playgroud)

不工作文件的示例:

"/opt/tst/tstdir/with some space/01 - my ätst pdf.pdf" -> should be served under
"http://localhost:8100/contextRoot/files/tstdir/with some space/01 - my ätst pdf.pdf"
Run Code Online (Sandbox Code Playgroud)

我认为这可能是编码问题。日志显示传入的请求是正确的 URL …

java spring-mvc static-files spring-boot

5
推荐指数
0
解决办法
1338
查看次数