- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我尝试将 maven jetty 插件配置为在 8443 (TLS) 端口上运行。
我读了很多关于包括官方文档的东西。
这个手册https://www.eclipse.org/jetty/documentation/9.4.x/jetty-maven-plugin.html#configuring-security-settings建议用XML文件来配置它,但是我没有成功在那里配置keystore的路径。
所以我从这里继续 application.properties
方式 https://drissamri.be/blog/java/enable-https-in-spring-boot/
问题是 jetty 无法识别 application.properties
。
当我启动应用程序时,8443 端口是空闲的。
这是application.properties
:
server.port = 8445
server.ssl.key-store = classpath:keystore.jks
server.ssl.key-store-password = 123456
server.ssl.key-password = 123456
这是 mvn jetty:run
的输出:
[INFO] Scanning elapsed time=653ms
[INFO] 2 Spring WebApplicationInitializers detected on classpath
18:20:56.634 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding PropertySource 'servletConfigInitParams' with lowest search precedence
18:20:56.637 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding PropertySource 'servletContextInitParams' with lowest search precedence
18:20:56.640 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding PropertySource 'jndiProperties' with lowest search precedence
18:20:56.640 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding PropertySource 'systemProperties' with lowest search precedence
18:20:56.640 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding PropertySource 'systemEnvironment' with lowest search precedence
18:20:56.641 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Initialized StandardServletEnvironment with PropertySources [StubPropertySource@760604710 {name='servletConfigInitParams', properties=java.lang.Object@4d1ff6b1}, StubPropertySource@1173837542 {name='servletContextInitParams', properties=java.lang.Object@329548d0}, JndiPropertySource@805536380 {name='jndiProperties', properties=org.springframework.jndi.JndiLocatorDelegate@29b40b3}, MapPropertySource@2099541600 {name='systemProperties', properties={java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=/usr/local/java/jdk1.8.0_121/jre/lib/amd64, java.vm.version=25.121-b13, maven.multiModuleProjectDirectory=/home/opshenichnikova/NetBeansProjects/bot-integrity, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, guice.disable.misplaced.annotation.check=true, path.separator=:, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=US, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/home/opshenichnikova/NetBeansProjects/bot-integrity, java.runtime.version=1.8.0_121-b13, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.endorsed.dirs=/usr/local/java/jdk1.8.0_121/jre/lib/endorsed, os.arch=amd64, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Oracle Corporation, os.name=Linux, classworlds.conf=/usr/share/maven/bin/m2.conf, sun.jnu.encoding=UTF-8, jetty.git.hash=82b8fb23f757335bb3329d540ce37a2a2615f0a8, java.library.path=/opt/oracle/instantclient:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib, java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=4.4.0-119-generic, user.home=/home/opshenichnikova, user.timezone=Europe/Moscow, java.awt.printerjob=sun.print.PSPrinterJob, file.encoding=UTF-8, java.specification.version=1.8, java.class.path=/usr/share/maven/boot/plexus-classworlds-2.x.jar, user.name=opshenichnikova, java.vm.specification.version=1.8, sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher -e jetty:run, java.home=/usr/local/java/jdk1.8.0_121/jre, sun.arch.data.model=64, user.language=en, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.awt.X11.XToolkit, java.vm.info=mixed mode, java.version=1.8.0_121, securerandom.source=file:/dev/./urandom, java.ext.dirs=/usr/local/java/jdk1.8.0_121/jre/lib/ext:/usr/java/packages/lib/ext, sun.boot.class.path=/usr/local/java/jdk1.8.0_121/jre/lib/resources.jar:/usr/local/java/jdk1.8.0_121/jre/lib/rt.jar:/usr/local/java/jdk1.8.0_121/jre/lib/sunrsasign.jar:/usr/local/java/jdk1.8.0_121/jre/lib/jsse.jar:/usr/local/java/jdk1.8.0_121/jre/lib/jce.jar:/usr/local/java/jdk1.8.0_121/jre/lib/charsets.jar:/usr/local/java/jdk1.8.0_121/jre/lib/jfr.jar:/usr/local/java/jdk1.8.0_121/jre/classes, java.vendor=Oracle Corporation, maven.home=/usr/share/maven, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=gnome, sun.cpu.isalist=}}, SystemEnvironmentPropertySource@1701798620 {name='systemEnvironment', properties={PATH=/opt/oracle/instantclient:/home/opshenichnikova/bin:/home/opshenichnikova/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-9-oracle/bin:/usr/lib/jvm/java-9-oracle/db/bin:/usr/local/java/jdk1.8.0_121//bin:/usr/local/java/jdk1.8.0_121//bin:/opt/proclog/:/opt/cprocsp/bin/amd64/:/opt/cprocsp/sbin/amd64/:/opt/proclog, XAUTHORITY=/home/opshenichnikova/.Xauthority, XMODIFIERS=@im=ibus, XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop, GDMSESSION=ubuntu, MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path, GTK_IM_MODULE=ibus, TNS_ADMIN=/etc, DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-EWkFlV90x8, DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path, XDG_CURRENT_DESKTOP=Unity, JRE_HOME=/usr/local/java/jdk1.8.0_121/, LD_LIBRARY_PATH=/opt/oracle/instantclient, UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1001/2482, QT4_IM_MODULE=xim, SESSION_MANAGER=local/IAS-WS-UX02:@/tmp/.ICE-unix/2735,unix/IAS-WS-UX02:/tmp/.ICE-unix/2735, QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1, LOGNAME=opshenichnikova, JOB=unity-settings-daemon, PWD=/home/opshenichnikova/NetBeansProjects/bot-integrity, DERBY_HOME=/usr/lib/jvm/java-9-oracle/db, IM_CONFIG_PHASE=1, LANGUAGE=en_US, WINDOWID=54525962, SHELL=/bin/bash, LESSOPEN=| /usr/bin/lesspipe %s, UNITY_HAS_3D_SUPPORT=true, GTK2_MODULES=overlay-scrollbar, INSTANCE=, J2SDKDIR=/usr/lib/jvm/java-9-oracle, GOPATH=/home/opshenichnikova/go:/home/opshenichnikova/NetBeansProjects/islps/core/goLibs, OLDPWD=/home/opshenichnikova/NetBeansProjects/bot-integrity, GNOME_DESKTOP_SESSION_ID=this-is-deprecated, UPSTART_INSTANCE=, GTK_MODULES=gail:atk-bridge:unity-gtk-module, J2REDIR=/usr/lib/jvm/java-9-oracle, CLUTTER_IM_MODULE=xim, XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0, COMPIZ_BIN_PATH=/usr/bin/, SESSIONTYPE=gnome-session, XDG_SESSION_DESKTOP=ubuntu, LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:, SHLVL=1, LESSCLOSE=/usr/bin/lesspipe %s %s, COMPIZ_CONFIG_PROFILE=ubuntu, QT_IM_MODULE=ibus, UPSTART_JOB=unity7, JAVA_HOME=/usr/local/java/jdk1.8.0_121/, TERM=xterm-256color, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg, LANG=en_US.UTF-8, GNOME_KEYRING_CONTROL=, XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0, XDG_SESSION_ID=c2, XDG_SESSION_TYPE=x11, DISPLAY=:0, UNITY_DEFAULT_PROFILE=unity, ORACLE_HOME=/opt/oracle/instantclient, NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript, MAVEN_CMD_LINE_ARGS= -e jetty:run, _=/usr/bin/mvn, GDM_LANG=en_US, XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/opshenichnikova, UPSTART_EVENTS=xsession started, GPG_AGENT_INFO=/home/opshenichnikova/.gnupg/S.gpg-agent:0:1, MAVEN_PROJECTBASEDIR=/home/opshenichnikova/NetBeansProjects/bot-integrity, DESKTOP_SESSION=ubuntu, SESSION=ubuntu, USER=opshenichnikova, XDG_MENU_PREFIX=gnome-, VTE_VERSION=4205, QT_ACCESSIBILITY=1, SSH_AUTH_SOCK=/run/user/1001/keyring/ssh, XDG_SEAT=seat0, NLSPATH=/opt/cprocsp/share/locale/%L/LC_MESSAGES/%N:/usr/dt/lib/nls/msg/%L/%N.cat, QT_QPA_PLATFORMTHEME=appmenu-qt5, XDG_VTNR=7, XDG_RUNTIME_DIR=/run/user/1001, HOME=/home/opshenichnikova, GNOME_KEYRING_PID=}}]
18:20:56.643 [main] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Replacing PropertySource 'servletContextInitParams' with 'servletContextInitParams'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.0.RELEASE)
2018-04-09 18:20:57.058 INFO 17478 --- [ main] ru.ias.Main : Starting Main on IAS-WS-UX02 with PID 17478 (/home/opshenichnikova/NetBeansProjects/bot-integrity/target/classes started by opshenichnikova in /home/opshenichnikova/NetBeansProjects/bot-integrity)
2018-04-09 18:20:57.060 INFO 17478 --- [ main] ru.ias.Main : No active profile set, falling back to default profiles: default
2018-04-09 18:20:57.113 INFO 17478 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1860f3be: startup date [Mon Apr 09 18:20:57 MSK 2018]; root of context hierarchy
2018-04-09 18:20:57.855 INFO 17478 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[INFO] Initializing Spring embedded WebApplicationContext
2018-04-09 18:20:57.938 INFO 17478 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 828 ms
2018-04-09 18:20:58.189 INFO 17478 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-04-09 18:20:58.192 INFO 17478 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-04-09 18:20:58.192 INFO 17478 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'errorPageFilter' to: [/*]
2018-04-09 18:20:58.192 INFO 17478 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-04-09 18:20:58.192 INFO 17478 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-04-09 18:20:58.192 INFO 17478 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-04-09 18:20:58.525 INFO 17478 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1860f3be: startup date [Mon Apr 09 18:20:57 MSK 2018]; root of context hierarchy
2018-04-09 18:20:58.604 INFO 17478 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin/account/list],methods=[GET]}" onto public java.util.List<ru.ias.orm.Account> ru.ias.controllers.admin.AdminController.getAccounts()
2018-04-09 18:20:58.606 INFO 17478 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin/invoices],methods=[GET]}" onto public java.util.List<ru.ias.orm.Invoice> ru.ias.controllers.admin.InvoiceController.getInvoices(javax.servlet.http.HttpServletResponse)
2018-04-09 18:20:58.609 INFO 17478 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-04-09 18:20:58.610 INFO 17478 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-04-09 18:20:58.651 INFO 17478 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-09 18:20:58.651 INFO 17478 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-09 18:20:58.699 INFO 17478 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-09 18:20:58.900 INFO 17478 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-04-09 18:20:58.916 INFO 17478 --- [ main] ru.ias.Main : Started Main in 2.266 seconds (JVM running for 5.815)
[INFO] DefaultSessionIdManager workerName=node0
[INFO] No SessionScavenger set, using defaults
[INFO] Scavenging every 660000ms
[INFO] Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-04-09 18:20:58.983 INFO 17478 --- [ main] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2018-04-09 18:20:58.998 INFO 17478 --- [ main] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 15 ms
[INFO] Started o.e.j.m.p.JettyWebAppContext@165e389b{/,file:///home/opshenichnikova/NetBeansProjects/bot-integrity/target/webapp-tmp/,AVAILABLE}{file:///home/opshenichnikova/NetBeansProjects/bot-integrity/target/webapp-tmp/}
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.005 s
[INFO] Finished at: 2018-04-09T18:20:59+03:00
[INFO] Final Memory: 42M/669M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.4.8.v20171121:run (default-cli) on project bot-integrity: Failure: Address already in use -> [Help 1]
应用程序的结构是:
├── pom.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── ru
│ │ │ └── ias
│ │ │ └── Main.java
│ │ └── resources
│ │ ├── application.properties
pom 是:
<?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>
<groupId>ru.ias</groupId>
<artifactId>bot-integrity</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>bot-integrity</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>3.6</version>
<exclusions>
<exclusion>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.1.3</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</dependency>
<!--<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>-->
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<type>jar</type>
</dependency>
<!--<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
<type>jar</type>
</dependency>-->
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.8.v20171121</version>
<configuration>
<!--jettyXml>jetty.xml,jetty-ssl.xml,jetty-https.xml</jettyXml>-->
<webAppConfig>
<allowDuplicateFragmentNames>
true
</allowDuplicateFragmentNames>
</webAppConfig>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<warName>botintegrity</warName>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<!--<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>-->
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!--<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>-->
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repository.spring.release</id>
<name>Spring GA Repository</name>
<url>https://repo.spring.io/plugins-release/</url>
</pluginRepository>
</pluginRepositories>
</project>
最佳答案
你检查过你打包后的jar包里是否有你需要的资源吗?检查 target/classes
目录。如果是这样,那么 jetty-plugin 配置显然有问题。
据我所知,为了捆绑资源,您必须使用 Maven 资源插件并声明这些资源。这是 link to documentation .
用法很简单
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/application.properties</include>
</includes>
</resource>
</resources>
</build>
希望对你有帮助。
关于java - 带有 maven jetty 插件的 applcation.properties,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49736945/
我想使用 li 和 ul 制作一个多级下拉列表,以便显示我博客中按年和月排序的所有文章。我希望我的下拉菜单看起来像 Google Blogspot 下拉菜单: 这是我的 CSS 和 HTML 代码 u
我在 Win 7 64 机器上将 CodeBlocks 与 gcc 4.7.2 和 gmp 5.0.5 结合使用。开始使用 gmpxx 后,我看到一个奇怪的段错误,它不会出现在 +、- 等运算符中,但
我正在使用 tern 为使用 CodeMirror 运行的窗口提供一些增强的智能感知,它工作正常,但我遇到了一个问题,我想添加一些自定义“types”,可以这么说,这样下拉列表中它们旁边就有图标了。我
我正在尝试让我的 PC 成为 Android 2.3.4 设备的 USB 主机,以便能够在不需要实际“附件”的情况下开发 API。为此,我需要将 PC 设置为 USB 主机和“设备”(在我的例子中是运
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 9
我在设置服务器方面几乎是个新手,但遇到了一个问题。我有一个 Ubuntu 16.04 VPS 并安装了 Apache2 和 Tomcat7。我正在为 SSL 使用 LetsEncrypt 和 Cert
我在一个基于谷歌地图的项目上工作了超过 6 个月。我使用的是 Google Maps API V1 及其开发人员 API key 。当我尝试发布应用程序时,我了解到 Google API V1 已被弃
我是 Python 的新手,所以如果我对一些简单的事情感到困惑,请原谅。 我有一个这样的对象: class myObject(object): def __init__(self):
这个问题已经有答案了: How can I access object properties containing special characters? (2 个回答) 已关闭 9 年前。 我正在尝
我有下面的 CSS。我想要的是一种流体/液体(因为缺乏正确的术语)css。我正在为移动设备开发,当我改变模式时 从纵向 View 到陆地 View ,我希望它流畅。现在的图像 在陆地 View 中效
我正在尝试使用可以接受参数的缓存属性装饰器。 我查看了这个实现:http://www.daniweb.com/software-development/python/code/217241/a-cac
这个问题在这里已经有了答案: Understanding slicing (36 个答案) 关闭 6 年前。 以a = [1,2,3,4,5]为例。根据我的直觉,我认为 a[::-1] 与 a[0:
mysqldump -t -u root -p mytestdb mytable --where=datetime LIKE '2014-09%' 这就是我正在做的事情,它会返回: mysqldum
我正在制作销售税计算器,除了总支付金额部分外,其他一切都正常。在我的程序中,我希望能够输入一个数字并获得该项目的税额我还希望能够获得支付的总金额,包括交易中的税金。到目前为止,我编写的代码完成了所有这
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为
我是否必须进行任何额外的设置才能让 apache-airflow 在任务失败时向我发送电子邮件。我的配置文件中有以下内容(与默认值保持不变): [email] email_backend = airf
这个问题在这里已经有了答案: What does the $ symbol do in VBA? (5 个回答) 3年前关闭。 使用返回字符串(如 Left)的内置函数有什么区别吗?或使用与 $ 相同
我有一个用VB6编写的应用程序,我需要使用一个用.NET编写的库。有什么方法可以在我的应用程序上使用该库吗? 谢谢 最佳答案 这取决于。您可以控制.NET库吗? 如果是这样,则可以修改您的库,以便可以
当我创建一个以 ^ 开头的类方法时,我尝试调用它,它给了我一个错误。 class C { method ^test () { "Hi" } } dd C.new.test; Too m
我已经使用 bower 安装了 angularjs 和 materialjs。 凉亭安装 Angular Material 并将“ngMaterial”注入(inject)我的应用程序,但出现此错误。
我是一名优秀的程序员,十分优秀!