This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Security.addProvider(new BouncyCastleProvider()); | |
KeyPairGenerator kpGen = KeyPairGenerator.getInstance("Ed25519", "BC"); | |
KeyPair keyPair = kpGen.generateKeyPair(); | |
PrivateKey privateKey = keyPair.getPrivate(); | |
PublicKey publicKey = keyPair.getPublic(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<link rel="manifest" href="/manifest.json"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"background_color":"#ffffff", | |
"description":"It's what's happening. From breaking news and entertainment, sports and politics, to big events and everyday interests.", | |
"display":"standalone", | |
"gcm_sender_id":"49625052041", | |
"gcm_user_visible_only":true, | |
"icons":[ | |
{ | |
"src":"https://ma-0.twimg.com/twitter-assets/responsive-web/web/ltr/icon-default.882fa4ccf6539401.png", | |
"sizes":"192x192","type":"image/png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check for service worker support in the browser | |
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('/sw.js').then(function(registration) { | |
// Registration was successful | |
console.log('ServiceWorker registration successful with scope: ', registration.scope); | |
}, function(err) { | |
// registration failed :( | |
console.log('ServiceWorker registration failed: ', err); | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pre-fetch the assets when the service worker is installed | |
self.addEventListener('install', function(evt) { | |
evt.waitUntil(precache()); | |
}); | |
function precache() { | |
return caches.open(‘your-app-name-cache’).then(function (cache) { | |
// list all your assets in the array | |
return cache.addAll([ | |
'/index.html', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<servlet> | |
<servlet-name>customerServiceExporter</servlet-name> | |
<servlet-class>org.springframework.web.context.support.HttpRequestHandlerServlet</servlet-class> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>customerServiceExporter</servlet-name> | |
<url-pattern>/remoting/CustomerService</url-pattern> | |
</servlet-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="customerService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> | |
<property name="serviceUrl" value="http://localhost:8081/remoting/CustomerService"/> | |
<property name="serviceInterface" value="com.codereanimator.spring.httpinvoke.serviceinterface.CustomerService"/> | |
</bean> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="customerService" class="com.codereanimator.spring.httpinvoke.app1.service.CustomerServiceImpl"/> | |
<bean name="customerServiceExporter" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> | |
<property name="service" ref="customerService"/> | |
<property name="serviceInterface" value="com.codereanimator.spring.httpinvoke.serviceinterface.CustomerService"/> | |
</bean> |