startup

How to roll the log file on startup in logback

爱⌒轻易说出口 提交于 2019-12-17 15:29:37
问题 I would like to configure logback to do the following. Log to a file Roll the file when it reaches 50MB Only keep 7 days worth of logs On startup always generate a new file (do a roll) I have it all working except for the last item, startup roll. Does anyone know how to achieve that? Here's the config... <appender name="File" class="ch.qos.logback.core.rolling.RollingFileAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -

Speed up Spring Boot startup time

元气小坏坏 提交于 2019-12-17 15:09:09
问题 I have a Spring Boot application. I've added a lot of dependencies (unfortunately, looks I need all of them) and the startup time went up quite a lot. Just doing a SpringApplication.run(source, args) takes 10 seconds. While that might not be much compared to what are "used" to, I'm unhappy that it takes that much, mostly because it breaks the development flow. The application itself is rather small at this point, so I assume most of the time is related to the added dependencies, not the app

Speed up Spring Boot startup time

耗尽温柔 提交于 2019-12-17 15:08:03
问题 I have a Spring Boot application. I've added a lot of dependencies (unfortunately, looks I need all of them) and the startup time went up quite a lot. Just doing a SpringApplication.run(source, args) takes 10 seconds. While that might not be much compared to what are "used" to, I'm unhappy that it takes that much, mostly because it breaks the development flow. The application itself is rather small at this point, so I assume most of the time is related to the added dependencies, not the app

What handles dynamics:// URLs?

半世苍凉 提交于 2019-12-17 13:07:14
问题 I'm trying to create my own custom drilldown functionality, where a URL dynamics://0?myfunction_123456 will launch my own code. In C\SysStartupCmd\construct , this base code: case 'viewalert': sysStartupCmd = new SysStartUpCmdViewAlert(s,parm); break; case 'drilldown': sysStartupCmd = new SysStartUpCmdDrillDown(s,parm); break; case 'viewalertrule': sysStartupCmd = new SysStartUpCmdViewAlertRule(s,parm); break; I've tested and these all get fired with these URLs: dynamics://0/?DrillDown_382576

What handles dynamics:// URLs?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 13:06:33
问题 I'm trying to create my own custom drilldown functionality, where a URL dynamics://0?myfunction_123456 will launch my own code. In C\SysStartupCmd\construct , this base code: case 'viewalert': sysStartupCmd = new SysStartUpCmdViewAlert(s,parm); break; case 'drilldown': sysStartupCmd = new SysStartUpCmdDrillDown(s,parm); break; case 'viewalertrule': sysStartupCmd = new SysStartUpCmdViewAlertRule(s,parm); break; I've tested and these all get fired with these URLs: dynamics://0/?DrillDown_382576

How to create windows service from java jar?

拜拜、爱过 提交于 2019-12-17 07:12:32
问题 I have an executable JAR file. Is it possible to create a Windows service of that JAR? Actually, I just want to run that on startup, but I don't want to place that JAR file in my startup folder, neither in the registry. 回答1: This article should tell you all you need to know: "Running Java Applications as a Windows Service"; it mentions using "Java Service Wrapper" (there is a community edition called YAJSW) 回答2: The easiest solution I found for this so far is the Non-Sucking Service Manager

Is there a way to run a method/class only on Tomcat/Wildfly/Glassfish startup?

匆匆过客 提交于 2019-12-17 07:10:26
问题 I need to remove temp files on Tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml. Is there a way to run a method/class only on Tomcat startup? 回答1: You could write a ServletContextListener which calls your method from the contextInitialized() method. You attach the listener to your webapp in web.xml, e.g. <listener> <listener-class>my.Listener</listener-class> </listener> and package my; public class Listener implements javax.servlet

Run automatically program on startup under linux ubuntu [closed]

穿精又带淫゛_ 提交于 2019-12-17 04:09:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Possible Duplicate: Linux equivalent for Windows Startup I'd need a program to be run every time I startup my ubuntu linux. So I'd need to add it to my startup programs list. Just one problem: I'd need to do it via terminal. 回答1: sudo mv /filename /etc/init.d/ sudo chmod +x /etc/init.d/filename sudo update-rc.d

Spring Boot application as a Service

元气小坏坏 提交于 2019-12-17 03:45:01
问题 How to configure nicely Spring Boot application packaged as executable jar as a Service in linux system? Is this recommended approach, or should I convert this app to war and install into Tomcat? Currently I can run Spring boot application from screen session, what is nice, but requires manual start after server reboot. What I'm looking for is general advice/direction or sample init.d script, if my approach with executable jar is proper. 回答1: The following works for springboot 1.3 and above:

Error: Selection does not contain a main type

心不动则不痛 提交于 2019-12-16 21:01:53
问题 I am trying to run some java files in a new project. So I make the project, put the files in it and I try to run the main file so my game starts. I get an error that says selection does not contain a main type . I have tried several ways to run it: Some say to launch eclipse again, tried this a dozen times. Somewhere else someone pointed to open a new project and make a build path to the old project. Didn't work either. I am pretty sure it must work because I ran it a few hours ago at school.