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
... | |
return { | |
... | |
devServer: { | |
host: '127.0.0.1', | |
port: 8081, | |
progress: true, | |
inline: true, | |
hot: false, | |
proxy: [{ |
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
... | |
return { | |
... | |
externals: { | |
jquery: 'jQuery' | |
}, | |
... | |
} |
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
const path = require('path'); | |
module.exports = (env) => { | |
const clientPath = path.resolve(__dirname, 'src/main/client'); | |
const outputPath = path.resolve(__dirname, (env == 'production') ? | |
'src/main/webapp' : '.webpack'); | |
const publicPath = '/bundles'; | |
return { | |
mode: env, |
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
public void addURL(URL url) { | |
jarList.add(url); | |
jarMap.put(url.getPath(), new URLClassLoader(new URL[] { url })); | |
} |
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
Thread thread = Thread.currentThread(); | |
ClassLoader clsLoader = thread.getContextClassLoader(); | |
URLClassLoader urlLoader = new URLClassLoader(new URL[] { jarFile1, jarFile2, ... }), clsLoader); | |
thread.setContextClassLoader(urlLoader); |
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
URLClassLoader sysloader = (URLClassLoader) Thread.currentThread().getContextClassLoader(); |
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
package com.example.loader; | |
import org.apache.commons.io.IOUtils; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; |
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
package com.example.loader; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; |
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
import Styles from './index.css' | |
import $ from 'jquery' | |
import mt from 'moment' | |
import {file, math, parse} from '../../../lib/utils.js' | |
$(function() { | |
$("strong > div").html(mt().format('MMMM Do YYYY, h:mm:ss a')); | |
console.log(file) | |
parse(); |
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
... | |
, { | |
test: path.resolve(__dirname, 'lib', 'utils.js'), | |
use: 'exports-loader?file,math,parse=helpers.parse' | |
}] | |
}, | |
... | |
} | |
} |