加泰罗尼亚.2014-04-21.日志:
kwi 21, 2017 3:33:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
kwi 21, 2017 3:33:55 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
kwi 21, 2017 3:33:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 709 ms
kwi 21, 2017 3:33:55 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
kwi 21, 2017 3:33:55 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
kwi 21, 2017 3:33:55 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive spring-boot-web-thymeleaf-1.0.war
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive demo-0.0.1-SNAPSHOT.war
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
kwi 21, 2017 3:33:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
kwi 21, 2017 3:33:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
kwi 21, 2017 3:33:56 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/28 config=null
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1141 ms
加泰罗尼亚。out:
kwi 21, 2017 3:33:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
kwi 21, 2017 3:33:55 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
kwi 21, 2017 3:33:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 709 ms
kwi 21, 2017 3:33:55 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
kwi 21, 2017 3:33:55 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
kwi 21, 2017 3:33:55 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive spring-boot-web-thymeleaf-1.0.war
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive demo-0.0.1-SNAPSHOT.war
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
kwi 21, 2017 3:33:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
kwi 21, 2017 3:33:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
kwi 21, 2017 3:33:56 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/28 config=null
kwi 21, 2017 3:33:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1141 ms
localhost.2017-04-21.log:
kwi 21, 2017 3:33:56 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
kwi 21, 2017 3:33:56 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
我是否错过了一些额外的配置?
我添加了spring-boot-legacy依赖项:
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-legacy -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-legacy</artifactId>
<version>1.1.0.RELEASE</version>
</dependency>
然后,我在webapp/WEB-INF/目录中创建了web.xml,并填充了:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>com.mkyong.SpringBootWebApplication</param-value>
</context-param>
<listener>
<listener-class>org.springframework.boot.legacy.context.web.SpringBootContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextAttribute</param-name>
<param-value>org.springframework.web.context.WebApplicationContext.ROOT</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
最后,/logs/中的catalina.out文件:
INFO: Deploying web application archive spring-boot-web-thymeleaf-1.0.war
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.2.RELEASE)
2017-04-21 16:45:46.240 INFO 13420 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1492785946240 ms
2017-04-21 16:45:46.263 INFO 13420 --- [ main] org.apache.catalina.startup.Bootstrap : Starting Bootstrap v6.0.35 on aleksander-K56CB with PID 13420 (/home/aleksander/apache-tomcat-6.0.35/bin/bootstrap.jar started by aleksander in /home/aleksander/apache-tomcat-6.0.35/bin)
2017-04-21 16:45:46.267 INFO 13420 --- [ main] org.apache.catalina.startup.Bootstrap : No active profile set, falling back to default profiles: default
2017-04-21 16:45:46.778 INFO 13420 --- [ main] onConfigNonEmbeddedWebApplicationContext : Refreshing org.springframework.boot.legacy.context.web.AnnotationConfigNonEmbeddedWebApplicationContext@6a8658ff: startup date [Fri Apr 21 16:45:46 CEST 2017]; root of context hierarchy
2017-04-21 16:45:49.969 INFO 13420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.legacy.context.web.AnnotationConfigNonEmbeddedWebApplicationContext@6a8658ff: startup date [Fri Apr 21 16:45:46 CEST 2017]; root of context hierarchy
2017-04-21 16:45:50.064 INFO 13420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String com.mkyong.WelcomeController.welcome(java.util.Map<java.lang.String, java.lang.Object>)
2017-04-21 16:45:50.070 INFO 13420 --- [ 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.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-04-21 16:45:50.070 INFO 13420 --- [ 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.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-04-21 16:45:50.132 INFO 13420 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-04-21 16:45:50.132 INFO 13420 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-04-21 16:45:50.208 INFO 13420 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-04-21 16:45:51.215 INFO 13420 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-04-21 16:45:51.244 INFO 13420 --- [ main] org.apache.catalina.startup.Bootstrap : Started Bootstrap in 6.368 seconds (JVM running for 8.515)
2017-04-21 16:45:51.274 INFO 13420 --- [ main] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'appServlet': initialization started
2017-04-21 16:45:51.296 INFO 13420 --- [ main] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'appServlet': initialization completed in 22 ms
kwi 21, 2017 4:45:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
kwi 21, 2017 4:45:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
kwi 21, 2017 4:45:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
kwi 21, 2017 4:45:51 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
kwi 21, 2017 4:45:51 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
kwi 21, 2017 4:45:51 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/21 config=null
kwi 21, 2017 4:45:51 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7930 ms
给java类一些东西 我有一张物品清单 我希望能够对它们进行排序,这样它们就可以按照每个父对象的虚数的累积和排序,然后再按照虚数排序。 所以我最终 我知道用parentKey和sum of noThings映射它是 我想,也许包装我的Something类并获得每个父项的总密钥可能会在某种程度上起作用。 但看起来工作量很大,不太优雅。 如有任何意见/想法,将不胜感激。
我有一个对象列表,如下所示,我想将它们按3个属性分组,并将第4个属性相加 我做了如下类似的事情,但它生成了许多地图,我无法得到求和的方法,因为它也需要一些逻辑 如何使用和逻辑获取分组列表列表?
问题内容: 我想知道是否有人可以向我解释以下怪异现象。我正在使用Java 8 Update 11。 给定这种方法 如果我首先构造一个函数Object,并将其传递给上面的方法,那么事情就会编译。 但是,如果我以lambda形式内联函数,则编译器会说 未报告的异常X; 必须被抓住或宣布被抛出 更新 :原来错误消息由maven缩写。如果直接使用javac编译,则错误为: 另请参阅此处以获取可运行的测试代
我想知道是否有人能向我解释以下奇怪之处。我正在使用Java8更新11。 给定此方法 如果我首先构造一个函数对象,并将其传递给上面的方法,事情就会编译。 但是,如果我将函数作为lambda内联,编译器会说 未报告的异常X;必须被抓到或宣布被抛出 更新:原来错误消息是由maven缩写的。如果直接使用javac编译,错误是: 另请参阅此处以获取可运行的测试代码。
在java 8中,流API帮助我们以非常干净和更少的代码完成工作。我是这些流API的忠实粉丝。但是很少有操作能够帮助解决同一类型的问题,也不确定何时使用哪种操作,虽然在两者之间进行选择并不困难,但只想知道任何一种操作都有针对这些操作的特定用例。我所说的操作是:- 中间操作:-最小值和最大值 终端操作:
问题内容: 关于它们有很多传说。我想知道真相。以下两个示例之间有什么区别? 问题答案: 不确定从何处获得传说,但: 提交按钮 与: IE6将在标记之间提交此按钮的所有文本,其他浏览器将仅提交值。使用可使您在按钮的设计上享有更大的布局自由度。从各种意图和目的看,它乍一看似乎很棒,但是各种浏览器怪癖使它有时很难使用。 在您的示例中,IE6将发送到服务器,而其他大多数浏览器将不发送任何内容。要使其跨浏览
什么区别以及如何正确重写代码?
我想得到以下数据结构:Map 给定的是一个包含字段als原语(位置、目标、距离)或作为键(位置)加映射(目标)的类。从每个独特的位置,一个人可以瞄准多个目的地(按距离)。 关于第二个代码段:结果应该与第一个代码中的结果相同。唯一的区别是,LocationPair中提供的数据已被进一步处理,因此目的地和距离已被放入其目标地图中。 我知道这一定是可能的,但不知何故,我无法弄清楚如何完成它。上面的流代码