Spring Boot Different ways to start an application
Spring Boot - Different ways to start an application
Spring Boot - Different ways to start an application
I was using this wrapper around PWA(Progress Web Apps) APIs register-service-worker and was wondering how does it detect when there is a new build and the pa...
Sometimes in java you get an inputstream, you need to process it the first time to process the data then you need it again to output the contents. To do thi...
Sometimes when you’re working on jsp pages and you need to set a base url for all pages, and this value needs to be available for use, then use the followin...
If you use jenkins and you have a project that uses gradle, how do you create a task that builds the project and deploy the artifact to tomcat? For this exa...
If you need to setup ssl (‘https’) connections to your apache2 webserver then use the following steps. sudo mkdir /etc/apache2/ssl sudo openssl req -x509...
If you tried the gcm playground and it does not work then try gcm quickstart tutorial. git clone https://github.com/googlesamples/google-services.git You ...
use jetty to run program To use the Jetty Plugin just add the following in your pom.xml: <project> ... <build> <plugins> &l...
How to add search to blog goto www.google.com/cse google custom search engine add your website do verification, put google html onto your website, c...
Here are some basic maven commands for setting up your project: JavaWebapp mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp -DgroupId=co...
Requirement: Got a video that was encoded using HEVC, couldn’t play it on my device so have to convert it to mpeg4. The tool ffmpeg was replaced in previous...
Java SE 6 Support for web services JSR 224 - Java API for XML-Based Web Services (JAX-WS) 2.0 Support for scripting languages JSR 223 - Scripting for the J...
The Template pattern formalizes the idea of defining an algorithm in a class, but leaving some of the details to be implemented in subclasses. Reasons for ...
Observer pattern - one subject many observers, state changes in the subject must be notified to all observers. Observers first register with the subject, on...
What is encapsulation? Encapsulation can be used to hide implementation details but it can also be used to separate your application into logical parts. Fin...
Method overloading, is when method with same name co-exists in same class but they must have different method signature. Method overloading is done via ...
String is immutable StringBuffer and StringBuilder is mutable StringBuffer is synchronized thread safe. StringBuilder is not thread safe but operation is fa...
maven commands to run program mvn exec:java -Dexec.mainClass="com.example.Main" maven commands to run program with args mvn exec:java -Dexec.mainClass="c...
Here are some new features inside Java 8 Lambda expressions - provides the ability to pass code as data to methods ... public static void main(String[] a...
To build owncloud android you need a JDK and the Android SDK Start the SDK Manager and make sure to install the API 19 and API 23 platform and the SDK Buil...
Been using custom installation of ownCloud since it first came out. But now see that they have Ubuntu repos installation option so moving custom installatio...
If you want to create github project sites follow the instructions as Github Pages. Create your project repository. Add files to repository Push cha...
Using ang-starter to create sample AngularJS app. The structure is easily understandable and is using a later version of angular. Modified the js/Controlle...
After investigating different comment system Comment System Comparison decided to use Disqus. To use apply for account then setup website, use the website ...
Trying to modify an angularjs dashboard app angular-material-dashboard to use the RESTful ContactService. This is a node.js program so requirements are: N...
Trying out Jekyll Bootstrap because it contains comments, categories and other utilities such as analytics. Came across some problems with this plugin, it ...
Trying to port spring project to run on google app engine came across some stumbling blocks. The following is a list of things that didn’t worked and one tha...
My spring project needed to have two access points http://localhost:8080/springwebapp/ and http://localhost:8080/springwebapp/contact/jsonlist.json one for w...
In order to support my android project I needed a backend. Chose openshift because it is free, have login capabilities and can run jboss. First go through th...
Starting an android project to call some webservices. Using android studio 2.0. Android studio will install the android sdk for you but if you have already a...
If you are blogging using github and are using syntax highlighting then watch out for this. Github does not support pygments anymore. You will get this emai...
I wanted to see if it was possible to import blogger posts into github blog. Found this tool that makes it simple to do so: jekyll-import Instructions: i...
This post is a guide on how to install ‘snort’ and Intrusion Detection Software for ubuntu 12.04.Install snort: sudo apt-get install snortMak...
The page.title is included in the layout template. To check out how to do syntax highlighting see the source for this file RAW. This is an example of synta...
The page.title is included in the layout template. This is an example of syntax highlighting. Github does not support rouge so have to change to Pygments. ...
Three solutions1. Use online code formatter http://codeformatter.blogspot.tw/ copy code to there translate then copy the results into code formatter.2. Use j...
Maven dependency management Scenario: jar file from repository not in the format you want. <pre style="background-color: #eeeeee; border: 1px dashed rgb(1...
infoqredbooksstackoverfloww3schoolshttp://java-source.net/
This is a simple example of webservices using jax-ws spring component.It is a contact application that allows you to store your addresses.The webservice retr...
This is a blog on how I implemented webservices using the spring framework.In part 1 we setup a simple spring web application. A simple contactapplication wh...
Must have constant improvement.Go over each topic.Create examples for each topic.Doesn’t matter if it takes time, that is what improvement means.
How to get the date in bat? Windows XP.for /f “tokens=1-4 delims=/ “ %%a in (‘date /t’) do (set year=%%a& set month=%%b& set day=%%c& set weekd...
change directory in preferencesgoto file -> consolidate library to move files
How to link wireless to nas?What are the different ways to connect wireless router to nas securely?use vpn? or just configure passwords?Things done:setup web...
Must have:basic encryption and decryption algorithms utils available for company to use.study md5, des and encryption providers.
Things NOT to do:how not to do thingsdon’t just do, confirm the requirements in writing before implementing.reduce the risk of customers saying i didn’t ask ...
If you want to use the image manipulation toolkit included with the JDK.when using this in eclipse:Image image = Toolkit.getDefaultToolkit().getImage(“tray.g...
Tool tip for windowsHide: ‘regsvr32 /u zipfldr.dll’Show again: ‘regsvr32 zipfldr.dll’
<ul><li>install jdk 1.6.0_13</li><li>install netbeans 6.7.1 with java web capabilities and install glassfish to /sun/AppServer</li...
web 1.0 people just put their static information on the webweb 1.5 some interactivity mainly online shoppingweb 2.0 is all about interactivity and communicat...
favour composition over inheritance. even though you have common code in the base class and child classes uses those methods it is better to move those com...
Alias /pds /packaging/sun/pds <directory packaging="" pds="" sun=""> Options Indexes Order allow,deny Allow from all </directory> Make changes ...
Hi All I am looking for a java package that will help me in checking a stream of data.This will be used on the network and will probably do the checking on ...
case insensitive search for a string Properties properties = System.getProperties(); properties.list(System.out); String osname = (String)pr...
Use prstat to see the Processes and CPU loadUse vmstat 2 2 to indicate the free memoryUse iostat to see internal disksUse netstat to see network infoUse mpst...
use template method when you need a base class to contain a certain behaviour with some base algorithms while having the subclasses implement those other b...
use delegation when you need an object to contain behaviour of two other objects containing the same methods.some object pretending to be another object but...
use abstract factory if you need platform independence, for example if you have an api that creates buttons and you need to modify the library so that you ...
How to setup a virtualhost in Apache for example same ip apache 80 port -> tomcat 8080 port (use reverse proxy) apache 19080 port -> tomcat 9080 port(...
This is an example on writing a Message Driven Bean in JBossif you decide to use jboss as your application servercomponents usedjboss-4.0.5.GAeclipse 3.2xdo...
struts redirect howto different web contextswebappA sendredirect to webappBString url = response.encodeRedirectURL(“urlwithparameters”);System.out.println(“...
for tomcatadd crossContext=”true” to server.xml for the web applications context:<pre><Context docBase=”C:/eclipse/workspace/WebAppA/WebContent” p...
apache httpd reverse proxy settings howtoLoadModule proxy_module modules/mod_proxy.soLoadModule proxy_ajp_module modules/mod_proxy_ajp.soLoadModule proxy_ba...
struts tags usageusing arraylist and mapsdefine in your action<pre>List urlName = new ArrayList();for (Iterator i = st.iterator(); i.hasNext();) {Str...
close projectopen .project fileadd<nature>org.eclipse.wst.common.project.facet.core.nature</nature>open projectright click project -> proper...
saving to application scoperequest.getSession().getServletContext().setAttribute(“applicationmap”, map);retrieving from application scopeMap smap = (Map)r...
using tomcat to connect to ldapedit server.xml<Realm className=”org.apache.catalina.realm.JNDIRealm”debug=”99”connectionName=”cn=root”connectionPassword=...
add security-constraint, login-config, security-role into web.xml<security-constraint> <display-name>securityconstraint</display-name...
Hibernate annotations - hibernate without the mapping filesnote: you must use jdk1.5, hibernate 3.2 core and annotationscreate hibernate.cfg.xml<pre st...
Create a struts action - LogoutAction.java<pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;back...
Must have a environment setup so that the company can run right.Must have a file server where commonly used files can be stored eg. slide templates.This ca...
Clearing logs or file purging should be done at the systems level and not at the programming or applications level because cleaning logs or deleting files ...
public static String getPreviousDN(String dn) { String retString = null; try { DirContext DirCtx = DriverLocator.getInstance().get...
http://www.itconversations.com/