服务器开发问题
2020-9-5
问题:gradle下载缓慢
解决:使用阿里云仓库,在C:\Users\***\.gradle\wrapper\dists\gradle-6.4.1-bin\***\gradle-6.4.1\init.d这个目录下新建init.gradle文件,内容:
allprojects{
repositories {
def ALIYUN_REPOSITORY_URL = 'https://maven.aliyun.com/repository/public/'
def ALIYUN_JCENTER_URL = 'https://maven.aliyun.com/repository/jcenter/'
def ALIYUN_GOOGLE_URL = 'https://maven.aliyun.com/repository/google/'
def ALIYUN_GRADLE_PLUGIN_URL = 'https://maven.aliyun.com/repository/gradle-plugin/'
all { ArtifactRepository repo ->
if(repo instanceof MavenArtifactRepository){
def url = repo.url.toString()
if (url.startsWith('https://repo1.maven.org/maven2/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL."
remove repo
}
if (url.startsWith('https://jcenter.bintray.com/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL."
remove repo
}
if (url.startsWith('https://dl.google.com/dl/android/maven2/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_GOOGLE_URL."
remove repo
}
if (url.startsWith('https://plugins.gradle.org/m2/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_GRADLE_PLUGIN_URL."
remove repo
}
}
}
maven { url ALIYUN_REPOSITORY_URL }
maven { url ALIYUN_JCENTER_URL }
maven { url ALIYUN_GOOGLE_URL }
maven { url ALIYUN_GRADLE_PLUGIN_URL }
}
}
2018-12-18
问题: eclipse javaee 不能生成在 WEB-INF/classes 中生成 .class文件,导致 class not found.
解决:右键项目 》properties 》java build path 》修改缺省输出文件夹,改为WEB-INF/classes
2018-8-19
问题:tomcat7 报 Java.lang.OutOfMemoryError:Metaspace 错误,重启 tomcat7 无效
解决:删除 tomcat7 目录下 work 文件夹,重启 tomcat7 。 (清除了项目缓存)