嗨,我想将我的实际 Vaadin 8 项目更新为 Vaadin 20+ 项目。我在src/main/resources/application.properties
属性下配置vaadin.whitelisted-packages=com/mycompany/myproject
。
在src/main/java/com/mycompany/myproject
我有一ClientApplication.java
堂课
package com.mycompany.myproject;
import com.vaadin.flow.component.page.AppShellConfigurator;
import com.vaadin.flow.server.PWA;
import com.vaadin.flow.theme.Theme;
/**
* Use the @PWA annotation make the application installable on phones, tablets
* and some desktop browsers.
*/
@Theme(value = "mycompany")
@PWA(name = "My Company Fusion", shortName = "Company Fusion", offlineResources = { "images/logo.png" })
public class ClientApplication implements AppShellConfigurator {
}
在src/main/java/mycompany/server
我有 springboot 应用程序应该启动的主要 Application.java 类下。在src/main/java/mycompany
我下面有超过 4K 的 java 文件,这些文件也很重要,并且我积极开发。
package mycompany.server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.vaadin.artur.helpers.LaunchUtil;
import mycompany.server.core.MyConfigs;
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
// 1. Load XML config file
final boolean configRead = MyConfigs.readConfig();
if (configRead) {
System.out.println(MyConfigs.getBackendserverurl());
}
// TODO Helmer -> if debug, add prod
ConfigurableApplicationContext ctx = SpringApplication.run(Application.class, args);
LaunchUtil.launchBrowserInDevelopmentMode(ctx);
}
}
每次我尝试运行mvn -Dmaven.compiler.failOnError=false -Dmaven.test.skip=true -DskipTests spring-boot:run
webpack 服务器都需要 10 多分钟才能启动。有时需要超过 30 分钟。