我需要配置gitlab的CI / CD服务。所以,我创建了一个文件.gitlab-ci.yml
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "26"
ANDROID_BUILD_TOOLS: "26.0.2"
before_script:
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/tools_r${ANDROID_SDK_TOOLS}-linux.zip
- unzip android-sdk.zip
- export ANDROID_HOME=$PWD/
- echo y | $ANDROID_HOME/tools/android --silent update sdk --no-ui --all --filter android-${ANDROID_COMPILE_SDK}
- echo y | $ANDROID_HOME/tools/android --silent update sdk --no-ui --all --filter platform-tools
- echo y | $ANDROID_HOME/tools/android --silent update sdk --no-ui --all --filter build-tools-${ANDROID_BUILD_TOOLS}
- echo y | $ANDROID_HOME/tools/android --silent …Run Code Online (Sandbox Code Playgroud) 我尝试解决编码问题。因此,我从“邮递员”从网络浏览器请求发送到服务器,在服务器中我通过请求中的键在数据库中搜索数据。请求可以是这样的:
\n\nhttp://localhost:8080/books.getBooksByGenre/\xd0\x94\xd0\xbe\xd0\xba\xd1\x83\xd0\xbc\xd0\xb5\xd0\xbd\xd1\x82\xd0\xb0\xd0\xbb\xd1\x8c\xd0\xbd\xd0\xbe\xd0\xb5/0/10\nRun Code Online (Sandbox Code Playgroud)\n\n(在浏览器中)。\n服务器接收字符串,例如
\n\nhttp://localhost:8080/books.getBooksByGenre/%D0%94%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5/0/10\nRun Code Online (Sandbox Code Playgroud)\n\n然后,从 url:\ngenreName: \'\xd0\x94\xd0\xbe\xd0\xba\xd1\x83\xd0\xbc\xd0\xb5\xd0\xbd\xd1\x82\xd0\xb0\xd0 获取参数\xbb\xd1\x8c\xd0\xbd\xd0\xbe\xd0\xb5\'\nstart: 0\ncount: 10.\n然后,此数据发送到 dao:
\n\noverride fun findGenreByName(genreName: String): DatabaseGenre {\n return transaction(db) { getGenreByName(genreName) }\n}\n\nprivate fun getGenreByName(genreName: String): DatabaseGenre {\n return try {\n val foundGenre = GenreEntity.find { Genres.genre eq genreName }.single()\n DatabaseGenre(foundGenre.id.value, foundGenre.genre, foundGenre.link)\n } catch (e: Exception) {\n throw NothingFoundInDatabaseException("no one genre found by \'$genreName\'")\n } catch (e: NoSuchElementException) {\n val m = "Duplicates of genre with name \'$genreName\'"\n throw DuplicatedDataInDatabaseException(m)\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n\n在日志中我看到,用于查找流派的 sql 查询是正确的,但我收到一个异常: …