Giter VIP home page Giter VIP logo

nfsx's People

Contributors

sloppycoder avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nfsx's Issues

AuditTrailTests in test-webapp fails when @EnableWebMvc is used

Adding @EnableWebMvc to TestWebAppApplication class causes the AuditTrailTests test fail, with

Caused by: java.lang.IllegalArgumentException: A ServletContext is required to configure default servlet handling
    at org.springframework.util.Assert.notNull(Assert.java:115)
    at org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer.<init>(DefaultServletHandlerConfigurer.java:53)
    at org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.defaultServletHandlerMapping(WebMvcConfigurationSupport.java:450)
    at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration$$EnhancerBySpringCGLIB$$6df018b4.CGLIB$defaultServletHandlerMapping$28(<generated>)
    at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration$$EnhancerBySpringCGLIB$$6df018b4$$FastClassBySpringCGLIB$$eaa49619.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:318)
    at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration$$EnhancerBySpringCGLIB$$6df018b4.defaultServletHandlerMapping(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 46 more

refactor needed for profile-dao

the current structure does not make much sense. the JpaRepository class should implement the CustomerService interface. need to refactor that.

Bonus, use Jersey to replace Spring MVC here in order to take advantage of WADL auto-generation.

Unable to merge spring-session branch into master

78092df

adding spring-boot-starter-redis dependency onto class path will trigger spring-boot to initialize redis connectivity, which fails when redis is not running. this happens even when spring-session @EnableRedisHttpSession is not present anywhere in the code.

This behavior basically prevent merging spring-session support into master because it makes all the tests dependent on Redis. Though it is possible to use embedded redis to support testing it is undesirable since it requires extra code in all modules but without much benefits.

It will be desirable to merge spring-session support into master, and enable it with a configuration item in application.yml.

web app does not have logout mechanism

Need a logout mechanism for web app. currently once login it'll be valid even after close and re-open the browser (why?). there should at least be a logout mechanism.

Need mechanism to disable cloud-config download during unit tests

When cloud-server is running, the configuration are downloaded from config-server even when running test cases, thus causing test case to fail due to inconsistency of configuration between cloud-config server and local applicantion.yml.

There should be a way to disable config-config server download during test run to ensure repeatability of test results.

Application always forward https request to http behind nginx proxy

When using nginx as reverse proxy to front-end web-app, the web-app always redirect to https request to http.

Reproduce:

  1. run auth-server with proxied profile
  2. run web-app server with proxied profile.
  3. configure ngnix with the following configuration:
http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$scheme $remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forward_proto""$http_x_forwarded_for"';


  server {
    listen 443 ssl;
    server_name some_domain_that_matches_config_below;

    ssl on;
    ssl_certificate         /usr/local/etc/nginx/certs/ssl_bundle.crt;
    ssl_certificate_key     /usr/local/etc/nginx/certs/www_vino9_net.key;

    access_log /usr/local/etc/nginx/logs/m_vino9_access.log main;
    error_log /usr/local/etc/nginx/logs/m_vino9_error.log;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    location /app {
        proxy_pass http://localhost:8000/app;
    }

    location /uaa {
        proxy_pass http://localhost:19999/uaa;
    }
  }
}

tomcat configuration contains:

spring:
  profiles: proxied

  tomcat:
    protocol-header: X-Forwarded-Proto
    protocol-header-https-value: https
    remote-ip-header:   X-Forwarded-For

but access log shows tomcat still redirect https login request to http. since nginx is not configured to handle http at all, the login page cannot load.

SSO token relay not working

The web-app does not pass credential correctly to profile-service. When profit-service enables oauth2 authorization calling service will fail.

spring cloud documentation describes this behavior should be automatically when configurations are in place. However sine oauth2 implementation is moving out of spring-cloud and into spring-boot, the documentation may not be most relevant.

massive code duplication in pom.xml

for modules that uses docker-maven-plugin, the plugin configuration must be specific at each module level, not at parent level, causes massive duplication.

this is caused by an issue in the plugin that the plugin will run even when packing type is POM, which causes error at parent pom level. The issue seems to have been fixed in upstream. pull request.

the configuration should be moved into parent pom when the new release arrives.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.