GVKun编程网logo

将Laravel 7和Vue SPA应用程序部署到共享托管中(vue与laravel如何结合)

6

对于想了解将Laravel7和VueSPA应用程序部署到共享托管中的读者,本文将是一篇不可错过的文章,我们将详细介绍vue与laravel如何结合,并且为您提供关于asp.net–如何将新的Web应用

对于想了解将Laravel 7和Vue SPA应用程序部署到共享托管中的读者,本文将是一篇不可错过的文章,我们将详细介绍vue与laravel如何结合,并且为您提供关于asp.net – 如何将新的Web应用程序部署到IIS站点的子目录,而不必单击“转换为应用程序”?、ios – 在没有Apple开发者帐户的情况下将Apache Cordova应用程序部署到iPad、java-使用war将spring-boot和angular 7应用程序部署到tomcat 8.5中、Java应用程序部署/安装程序选项?的有价值信息。

本文目录一览:

将Laravel 7和Vue SPA应用程序部署到共享托管中(vue与laravel如何结合)

将Laravel 7和Vue SPA应用程序部署到共享托管中(vue与laravel如何结合)

您需要将应用程序文件夹添加到路由路径

或者您可以添加基本路径

导出默认的新路由器({

mode: "history",baseurl: "/api/v1",base: 'deliverywebapp',

常量路由= [

{
    path: '/home',component: home 
},{
    path: '/login',component: login 
}

]

})

导出默认的新路由器({

mode: "history",

常量路由= [

{
    path: '/deliverywebapp/home',{
    path: '/deliverywebapp/login',component: login 
}

]

})

asp.net – 如何将新的Web应用程序部署到IIS站点的子目录,而不必单击“转换为应用程序”?

asp.net – 如何将新的Web应用程序部署到IIS站点的子目录,而不必单击“转换为应用程序”?

我正在尝试编写一个在一个盒子上运行但部署到远程QA服务器的自动部署应用程序.基本上每次在源代码管理中创建分支时,我的自动部署工具都会部署应用程序.现在代码都部署但IIS不喜欢嵌套的web.config文件,除非我使用“转换为应用程序”功能.

在下面的截图请注意,对于这是只为新的“试验场”的分支,该文件夹的“分析”,“调查”,“测量”和“分数”创建的测试站点都没有像RevECurrent和应用RevENew上面有这些文件夹.在没有实际单击每个文件夹的“转换为应用程序”的情况下,如何在部署像“Test-Site”这样的新子目录时使web.config文件不会生成错误?

解决方法

检查 System.Web.Administration namespace,它将允许您与IIS交互.我用它来添加/删除绑定,添加网站等…我认为它会让你在网站下创建应用程序文件夹.

ios – 在没有Apple开发者帐户的情况下将Apache Cordova应用程序部署到iPad

ios – 在没有Apple开发者帐户的情况下将Apache Cordova应用程序部署到iPad

在使用带有 Apache Cordova Extension的Visual Studio 2013 Pro为朋友开发应用程序之后,我希望它能够像在Android上一样快速地在iPad 3上运行.然而,事情被证明比原先想象的要复杂得多:对于单个设备开发来说,Apple开发者帐户的99美元太高了(该应用程序仅用于一台设备,没有商业意图).

至少我现在能够使用Mac OSX和XCode,它通过网络连接到Visual Studio.在iOS模拟器中安装应用程序按预期工作,但我正在努力将其部署在iPad上.我已经考虑过对设备进行监控,因为保修期已经过期,对我的朋友来说这不是问题.根据信息,我发现它将be possible;但是,我找不到如何做到这一点.

提前致谢.

解决方法

几个月后,我终于找到了一个有效的解决方案
最新的XCode版本(7 Beta 2)能够使用普通的AppleID而不是100美元的开发者许可证来签署iOS应用程序.

首先,您需要在Mac上准备vs-mda-remote节点插件,并能够构建applications [See here how].在Visual Studio中使用适当的部署目标,可以在虚拟化iOS环境中测试该应用程序.

但是,如果您尚未订阅Apple Developer Program,则远程设备和本地设备的部署选项都将失败.需要越狱设备的其他方法(描述为here或here)对我来说也没有用.

有趣的是,Apple似乎已经改变了他们的策略not much time ago,最终允许在非root用户设备上签署和部署应用程序.

每当为iOS模拟器构建应用程序时,vs-mda-remote将创建一个位于〜/ remote-builds / builds中的全新构建文件夹(使用3-5位数的随机数命名).在该构建文件夹中,您需要找到一个使用XCode 7打开XCode项目文件(示例路径:〜/ remote-builds / builds / 654 / cordovaApp / platforms / ios / YOUR_PROJECT_NAME.codeproj).

连接并检测到iOS设备后,您应该可以选择它作为部署目标.然后你应该按照这些instructions,基本上只是添加一个应该用来签署应用程序的AppleID.对于早期的XCode版本来说这是不可能的,并且肯定比使用一种类似“黑客”的技术更容易,这种技术涉及越狱你的设备并几乎取消它的保修.

最后,您只需要将代码签名标识设置为已注册的AppleID(对于项目和目标),您就可以部署应用程序了.

这种方法适用于我使用iOS 8.3和Mac OSX Yosemite 10.10.4.如果还有其他问题,请随时提出.

java-使用war将spring-boot和angular 7应用程序部署到tomcat 8.5中

java-使用war将spring-boot和angular 7应用程序部署到tomcat 8.5中

我正在尝试使用war将Angular 7 Spring Boot应用程序部署到tomcat中.我遵循了一些步骤来用角度代码发动战争.使用UI代码成功创建了战争.但是我无法调用UI代码.
当我尝试打电话时

>本地主机:8080 / war-name
>本地主机:8080 / war-name / index.html
>本地主机:8080 / index.html

它显示404.

Web服务正常运行.我可以打电话给他们.

如何调用应用程序的index.html?

注意:-我没有使用spring-boot-starter-web

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.3.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.hackthon</groupId>
    <artifactId>pmoconnect</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>pmoconnect</name>
    <description>PMO Connect</description>
    <packaging>war</packaging>
    <properties>
        <java.version>1.8</java.version>
        <start-class>com.hackthon.HackthonApplication</start-class>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jersey</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>MysqL</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>4.0.1</version>
        </dependency>
        <!-- excel 2007 over -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.0.1</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-multipart</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.5.5</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-envers</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.3</version>

                <configuration>
                    <nodeVersion>v8.11.3</nodeVersion>
                    <npmVersion>6.3.0</npmVersion>
                    <workingDirectory>src/main/ngapp/</workingDirectory>
                </configuration>

                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>npm run build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>

                        <configuration>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>prod</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run-script build</arguments>
                        </configuration>
                        <phase>generate-resources</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/classes/static/</outputDirectory>
                            <!-- <outputDirectory>${project.build.directory}/../src/main/resources/static/</outputDirectory> -->
                            <resources>
                                <resource>
                                    <directory>/src/main/ngapp/dist/</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>
                    <warName>pmoconnect</warName>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

application.properties

spring.datasource.url = jdbc:MysqL://localhost:3306/elite_db?allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.username = <username>
spring.datasource.password = <password>


## Hibernate Properties
# The sql dialect makes Hibernate generate better sql for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MysqL5InnoDBDialect
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update
org.hibernate.envers.audit_table_suffix = _AUDIT_LOG

HackthonApplication.java

@SpringBootApplication
@ComponentScan
public class HackthonApplication {
    public static void main(String[] args) {
        SpringApplication.run(HackthonApplication.class, args);
    }
}

index.html

<!doctype html>
<html lang="en">
<head>
  <Meta charset="utf-8">
  <title>PMO Connect</title>
  <base href="./">

  <Meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
 <body>
  <app-root></app-root>
  <script type="text/javascript" src="runtime.js"></script>
  <script type="text/javascript" src="es2015-polyfills.js" nomodule></script>
  <script type="text/javascript" src="polyfills.js"></script>
  <script type="text/javascript" src="styles.js"></script>
  <script type="text/javascript" src="vendor.js"></script>
  <script type="text/javascript" src="main.js"></script>
  </body>
</html>

战争档案

war file

Tomcat日志

2019-03-27 10:34:19.134  INFO 18464 --- [ost-startStop-2] com.hackthon.HackthonApplication         : No active profile set, falling back to default profiles: default
    2019-03-27 10:34:19.291  INFO 18464 --- [ost-startStop-2] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the ''logging.level.web'' property to ''DEBUG''
    2019-03-27 10:34:22.558  INFO 18464 --- [ost-startStop-2] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
    2019-03-27 10:34:22.977  INFO 18464 --- [ost-startStop-2] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 372ms. Found 6 repository interfaces.
    2019-03-27 10:34:24.386  INFO 18464 --- [ost-startStop-2] o.a.c.c.C.[.[localhost].[/pmoconnect]    : Initializing Spring embedded WebApplicationContext
    2019-03-27 10:34:24.386  INFO 18464 --- [ost-startStop-2] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 5094 ms
    2019-03-27 10:34:24.809  INFO 18464 --- [ost-startStop-2] o.s.b.a.jersey.JerseyAutoConfiguration   : Configuring existing registration for Jersey servlet ''com.hackthon.config.JerseyConfiguration''
    2019-03-27 10:34:25.046  INFO 18464 --- [ost-startStop-2] o.s.boot.web.servlet.RegistrationBean    : Servlet com.hackthon.config.JerseyConfiguration was not registered (possibly already registered?)
    2019-03-27 10:34:25.628  INFO 18464 --- [ost-startStop-2] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
    2019-03-27 10:34:26.473  INFO 18464 --- [ost-startStop-2] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
    2019-03-27 10:34:26.815  INFO 18464 --- [ost-startStop-2] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
        name: default
        ...]
    2019-03-27 10:34:27.465  INFO 18464 --- [ost-startStop-2] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.7.Final}
    2019-03-27 10:34:27.472  INFO 18464 --- [ost-startStop-2] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
    2019-03-27 10:34:28.996  INFO 18464 --- [ost-startStop-2] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
    2019-03-27 10:34:30.597  INFO 18464 --- [ost-startStop-2] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MysqL5InnoDBDialect
    2019-03-27 10:34:30.951  INFO 18464 --- [ost-startStop-2] o.h.e.boot.internal.EnveRSServiceImpl    : Envers integration enabled? : true
    2019-03-27 10:34:41.272  INFO 18464 --- [ost-startStop-2] j.LocalContainerEntityManagerfactorybean : Initialized JPA EntityManagerFactory for persistence unit ''default''
    2019-03-27 10:34:43.158  INFO 18464 --- [ost-startStop-2] o.h.h.i.QueryTranslatorFactoryInitiator  : HHH000397: Using ASTQueryTranslatorFactory
    2019-03-27 10:34:46.554  INFO 18464 --- [ost-startStop-2] com.hackthon.HackthonApplication         : Started HackthonApplication in 29.239 seconds (JVM running for 143.14)
    2019-03-27 10:34:46.944  INFO 18464 --- [ost-startStop-2] org.apache.jasper.servlet.TldScanner     : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    2019-03-27 10:34:50.219  WARN 18464 --- [ost-startStop-2] org.glassfish.jersey.internal.Errors     : The following warnings have been detected: WARNING: A HTTP GET method, public javax.ws.rs.core.Response com.hackthon.service.WSFGMapping.getMappings(java.lang.String), should not consume any entity.

    2019-03-27 10:34:50.348  INFO 18464 --- [ost-startStop-2] org.apache.catalina.startup.HostConfig   : Deployment of web application archive [C:\Users\kaukhare\myWorkspace\.Metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\pmoconnect.war] has finished in [68,229] ms

解决方法:

我也遇到了同样的问题,并通过在index.html中添加以下脚本来解决

<base href="/" id="baseHref">
<script>
  (function() {
    document.getElementById(''baseHref'').href = ''/'' + window.location.pathname.split(''/'')[1] + "/";
  })();
</script>

我认为它将解决您的问题.

总结

以上是小编为你收集整理的java-使用war将spring-boot和angular 7应用程序部署到tomcat 8.5中全部内容。

如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。

原文地址:https://codeday.me/bug/20191211/2105511.html

Java应用程序部署/安装程序选项?

Java应用程序部署/安装程序选项?

我正在寻找有关在最终用户系统上部署Java应用程序的良好选项的建议.

我们的最终用户不是技术精湛的专家,而是偶然的计算机用户,他们不能指望找出目录和版本冲突.

> Runnable jar不实用,因为我们需要提供VM参数.批处理文件不实用,因为无论出于何种原因,java.exe不在大量Windows系统的$PATH上.
> Webstart是一个选项,但我们的用户通常会抱怨没有创建快捷方式(显然已经损坏的功能),网站上的每次点击都会提示新的下载,而且过多的其他问题使得这个选项对最终用户来说显得非常不专业.
> google for Java部署时发现的许多内容本身都是用Java构建的,这意味着它们不会在Java安装缺失或损坏的系统上运行.

最佳答案
>如果你不想花钱,一个流行的解决方案是izpack.
>如果您正在寻找商业支持的解决方案,则有install4j(免责声明:我的公司开发install4j).安装程序也是Java应用程序.但是,它由本机启动程序启动,可以动态从服务器下载JRE包.您还可以静态捆绑私有JRE.有关JRE包的更多信息,请参见here.

关于将Laravel 7和Vue SPA应用程序部署到共享托管中vue与laravel如何结合的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于asp.net – 如何将新的Web应用程序部署到IIS站点的子目录,而不必单击“转换为应用程序”?、ios – 在没有Apple开发者帐户的情况下将Apache Cordova应用程序部署到iPad、java-使用war将spring-boot和angular 7应用程序部署到tomcat 8.5中、Java应用程序部署/安装程序选项?的相关信息,请在本站寻找。

本文标签: