Yes it's awesome and I've also been thought for long time to add boot
and auto-config (because I've seen people have concerns about Struts
flexibility) but can't find enough time :( wdyt? Looks a huge workload
for me. Basically we should get rid off XMLs to annotations, add
auto-configs, make plugins better and easier to match each other, and as
you mentioned, improve score in benchmarks; to being adapted to modern
cloud-native environments I think.
Regards
On 7/6/2020 6:32 PM, Lukasz Lenart wrote:
> Hi,
>
> What do you think about implementing such a simple boot project? I was
> able create an embedded Jetty server with these lines:
>
> public static void main(String[] args) throws Exception {
> int port = 8080;
> if (args.length == 2 && "--port".equals(args[0])) {
> port = Integer.parseInt(args[1]);
> }
>
> LOG.info("Running Http server on port " + port);
>
> Server server = new Server();
>
> ServerConnector connector = new ServerConnector(server);
> connector.setPort(port);
>
> HttpConfiguration https = new HttpConfiguration();
> https.addCustomizer(new SecureRequestCustomizer());
>
> WebAppContext context = new WebAppContext();
> context.setServer(server);
> context.setContextPath("/");
>
> ProtectionDomain protectionDomain = App.class.getProtectionDomain();
> URL location = protectionDomain.getCodeSource().getLocation();
> context.setWar(location.toExternalForm());
>
> server.setHandler(context);
> while (true) {
> try {
> server.start();
> break;
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> try {
> System.in.read();
> server.stop();
> server.join();
> } catch (Exception e) {
> e.printStackTrace();
> System.exit(100);
> }
> }
>
> Regards
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]