有没有人在Grails 3应用程序中安装Cloudinary插件并成功.
该插件的说明在这里,我做了我认为是Grails的3个正确的修改:https://bitbucket.org/sbuettner/grails-cloudinary
下面是build.grade文件
但是,grails命令行util报告:
| 错误无法解析配置':testRuntime'的所有依赖项.输入'gradle dependencies'以获取更多信息
谁能看到我做错了什么?
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
// Custom maven repo for the cloudinary plugin
maven { url "http://dl.bintray.com/infinit/infinit-opensource" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0'
}
}
plugins {
id "io.spring.dependency-management" version "0.5.2.RELEASE"
}
version "0.1"
group "mchq.admin"
apply plugin: "spring-boot"
apply plugin: "war"
apply plugin: "asset-pipeline"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp" …Run Code Online (Sandbox Code Playgroud) 抱歉,如果某个地方回答了这个问题。
我可以将Angular应用程序部署到heroku,但是尽管采取了本文中的步骤,但它不会在PRODUCTION模式下运行。
https://medium.com/@hellotunmbi/how-to-deploy-angular-application-to-heroku-1d56e09c5147
我们的环境文件夹中有两个文件:
从本质上讲,似乎Heroku使用了名为environment.ts的第二个环境文件,而不是使用environment.prod.ts
在environment.ts中,有一个env变量:
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false,
};
Run Code Online (Sandbox Code Playgroud)
fileReplacements也正确设置。
environment.prod.ts文件还包含变量production,其值为true。
使用以下简单代码,我们知道它不是生产模式:
export class SettingsComponent implements OnInit {
environmentIsProduction: boolean = false;
constructor() {
}
ngOnInit() {
this.environmentIsProduction = environment.production;
console.warn('Environment is PRODUCTION: ' + environment.production);
} …Run Code Online (Sandbox Code Playgroud)