小编Rio*_*tin的帖子

无法理解为何无法解决此方法

我正在使用Spring In Action书籍学习Spring,我从书中获得了可以正常使用的代码:

@Slf4j
@Controller
@RequestMapping("/design")
public class DesignTacoController {
    @GetMapping
    public String showDesignForm(Model model) {
        List<Ingredient> ingredients = Arrays.asList(
                new Ingredient("FLTO", "Flour Tortilla", Type.WRAP),
                new Ingredient("COTO", "Corn Tortilla", Type.WRAP),
                new Ingredient("GRBF", "Ground Beef", Type.PROTEIN),
        );

        Type[] types = Ingredient.Type.values();
        for (Type type : types) {
            model.addAttribute(type.toString().toLowerCase(),
                    filterByType(ingredients, type));
        }

        model.addAttribute("design", new Taco());
        return "design";
    }
} 
Run Code Online (Sandbox Code Playgroud)

但是当我在IDEA中键入它时,它说无法解决方法filterByType,但是书中没有这样的问题,也没有对此问题的任何评论。我是春季新手,尝试过很多Google,但找不到有关此问题的任何信息及其来源。您能帮我解决这个问题吗,一个不能因此而继续前进。 IDEA的屏幕截图

java spring

4
推荐指数
1
解决办法
888
查看次数

&lt;v-img&gt; doesn`t work with static image. [Vuetify] Image load failed src: @/assets/img/logo.png

I have simple vuetify image tag which has to load image file from project directory, but it never works

<v-img src="@/assets/img/logo.png"></v-img>
Run Code Online (Sandbox Code Playgroud)

Vue cannot load image neither with relative path, nor with absolute. src with @ and require() also don`t work. When i try to require() image, compiler fails and says

Module not found: Error: Can't resolve './assets/logo.png' in 'D:\Projects\ExpertRestRELEASE\src\main\resources\static\js\pages'
Run Code Online (Sandbox Code Playgroud)

It seems like a webpack problem, but i don`t have any idea how to solve it

Project structure:

在此输入图像描述

webpack.config.js

const path …
Run Code Online (Sandbox Code Playgroud)

webpack vue.js vuetify.js

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

java ×1

spring ×1

vue.js ×1

vuetify.js ×1

webpack ×1