michael-simons / biking2

This is the source code of http://biking.michael-simons.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error in WebConfig

mikezang opened this issue · comments

When I compile it I got as error as below:
Multiple markers at this line
- ConfigurableEmbeddedServletContainerFactory cannot be resolved to a type
- This lambda expression refers to the missing type
ConfigurableEmbeddedServletContainerFactory
- Line breakpoint:WebConfig [line: 169] -
embeddedServletContainerCustomizer(String, int)

@Bean
@Conditional(NeedsCustomizedConnectorCondition.class)
public EmbeddedServletContainerCustomizer embeddedServletContainerCustomizer(
    final @Value("${biking2.connector.proxyName}") String proxyName,
    final @Value("${biking2.connector.proxyPort:80}") int proxyPort
) {
return (ConfigurableEmbeddedServletContainerFactory factory) -> {
    if (factory instanceof TomcatEmbeddedServletContainerFactory) {
    final TomcatEmbeddedServletContainerFactory containerFactory = (TomcatEmbeddedServletContainerFactory) factory;
    containerFactory.addConnectorCustomizers(connector -> {
        connector.setProxyName(proxyName);
        connector.setProxyPort(proxyPort);
    });
    }
};
}

Hi Mike,

I've just checked myself with a fresh copy:

 git clone https://github.com/michael-simons/biking2
 cd biking2/
 mvn clean compile

(downloads half the Internet if you didn't do much Spring lately) but i end up with BUILD SUCCESS.

Maybe you're on an old JDK 8?
I'm using

java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Hi Michael

I just downloaded your newest copy and installed JRebel, but I still met errors like old version.
You can find there are a lot of errors, by the way, I am on Mac OS 10.9 with Java as below!
But it is very strange, I don't why that I still can compile it and run it with a popup warning! I proceed it then I got that screen what you created!

Why? Can you explain for me? I don't like those errors, how can I solve them?

Br
Mike

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

On 2015/12/28, at 21:23, Michael Simons notifications@github.com wrote:

Hi Mike,

I've just checked myself with a fresh copy:

git clone https://github.com/michael-simons/biking2
cd biking2/
mvn clean compile

(downloads half the Internet if you didn't do much Spring lately) but i end up with BUILD SUCCESS.

Maybe you're on an old JDK 8?
I'm using

java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)


Reply to this email directly or view it on GitHub.

Sorry, I can't help you. That project works just fine as is. How to you compile it? I don't do support for IDE problems. The project is a maven project. Do you compile it using Maven? And you won't need Jrebel, the plugin does nothing if there's no Jrebel installed.

Well, I am in eclipse, that is ok.
I have another question, after I run it in eclipse, it keeps in localhost:8080, I can use that port for other app, how can I stop it?

Br
Mike

On 2015/12/29, at 1:31, Michael Simons notifications@github.com wrote:

Sorry, I can't help you. That project works just fine as is. How to you compile it? I don't do support for IDE problems. The project is a maven project. Do you compile it using Maven? And you won't need Jrebel, the plugin does nothing if there's no Jrebel installed.


Reply to this email directly or view it on GitHub.

I've just double checked. It compiles flawless using Maven 3.3.3 as well as Maven 3.2.5 and i guess some older versions as well.

I'm developing with NetBeans (8.1) and i only can recommend it. But anyway, should run in Eclipse or the STS Suite as well.

To get everything straight, i've replaced the JRebel plugin with Spring Boot Devtools, their free and often enough.

Regarding the port: Read the official docs, for example here are all properties that can be configured: https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html Your searching for "server.port"

I don't know your IDE but the only thing you've gotta do is to stop / kill the Java Process started by the IDE, than the port is free.

Thanks for your advice, I will follow them.

In fact, I found your article because I want to connect to Internet after proxy server!
I checked your source but I am not sure about that usage, does your project can be run only I configed proxyHost and proxyPort?
Tell me more information if you don't mind...

On 2015/12/29, at 2:04, Michael Simons notifications@github.com wrote:

I've just double checked. It compiles flawless using Maven 3.3.3 as well as Maven 3.2.5 and i guess some older versions as well.

I'm developing with NetBeans (8.1) and i only can recommend it. But anyway, should run in Eclipse or the STS Suite as well.

To get everything straight, i've replaced the JRebel plugin with Spring Boot Devtools, their free and often enough.

Regarding the port: Read the official docs, for example here are all properties that can be configured: https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html Your searching for "server.port"

I don't know your IDE but the only thing you've gotta do is to stop / kill the Java Process started by the IDE, than the port is free.


Reply to this email directly or view it on GitHub.

That project can run as is and behind arbitrary proxies. I close this now.